Hi everyone,
I roughly finished the analysis of the current codebase of ftinspect.
Because we decide in the proposal not to directly base on the veeki
branch but to selectively reuse code from there, there's barely any bug
or performance issue to "fix" (according to part 1 in the timeline, and
those bugs are basically from the veeki branch).
Therefore, I'm planning to bring forward the next phase (Part 2 in the
timeline), which is refactoring the current base. I would like to begin
by breaking down maingui.cpp . Here's my analysis of the current code base:
* The GUI skeleton is all in maingui.cpp, which may be broken down later.
* The "Engine" is responsible to talk to FreeType2 API, but there's
also some other code in "rendering" part
* You're creating a lot of "extra" widgets by inheriting the original
widgets in Qt. This creates a lot of tiny source files. Should we
move them into one single file?
* The "Engine" class is highly coupled with the main GUI, accessing a
lot of fields in the main GUI. Maybe I should decouple this and try
to sort out the data flow between the GUI and the engine.
* There're some compiler warnings regarding reinterpret_cast. I will
fix them if possible.
* There's a filesystem watcher to monitor and reload font files on the
disk - I hope for further explanation for this. What's its purpose?
* Some "override" modifiers are missing.
* I learned that all management of faces, sizes, and glyphs is through
the Freetype Cache subsystem.
* I learned that all drawing of glyphs is done by passing outlines and
bitmaps to objects such as GlyphPointNumbers, which are all derived
from QGraphicsItem.
* I learned the code style (so different from mine :) )
Cheers,
Charlie Jiang