[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Update on community bonding phase: Plans on refactoring ftinspect
From: |
茶栗 chariri |
Subject: |
Update on community bonding phase: Plans on refactoring ftinspect |
Date: |
Thu, 9 Jun 2022 10:25:46 +0800 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 |
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
- Update on community bonding phase: Plans on refactoring ftinspect,
茶栗 chariri <=