-
4730301e
by Charlie Jiang
at 2022-09-05T14:52:40+08:00
[ftinspect] Support color layers.
* src/ftinspect/engine/rendering.cpp:
Add implementation of `tryDirectRenderColorLayers`.
* src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
Implement `loadPaletteInfos` and `loadPalette`.
Add `currentFontHasColorLayers` and a group of getters/setters supporting
color layer rendering.
Also reorder fields as the number of fields grows.
* src/ftinspect/panels/settingpanel.cpp,
src/ftinspect/panels/settingpanel.hpp:
Implement `populatePalettes` and reorder functions.
Fix `checkPalette` about combo box enabling state and reset the cache when
the palette settings change.
Uncomment functional code.
* src/ftinspect/engine/paletteinfo.cpp,
src/ftinspect/engine/paletteinfo.hpp: New files adding `PaletteInfo`.
Retrieving palette names using SFNT name tables is not supported yet.
* src/ftinspect/panels/singular.cpp:
Call `Engine::loadPalette` when drawing.
* src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
-
78a8cc49
by Charlie Jiang
at 2022-09-05T14:52:47+08:00
[ftinspect] Support LCD rendering.
* src/ftinspect/engine/rendering.cpp, src/ftinspect/engine/rendering.hpp:
Implement `convertLCDToARGB` and `convertLCDVToARGB`.
Add `lcdUsesBGR` property.
* src/ftinspect/panels/settingpanel.cpp: Uncomment functional code.
-
98cf9606
by Charlie Jiang
at 2022-09-05T14:52:47+08:00
[ftinspect] Support opening files via command-line.
* src/ftinspect/engine/fontfilemanager.cpp,
src/ftinspect/engine/fontfilemanager.hpp:
Add `loadFromCommandLine` func.
* src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp:
Add and call `loadCommandLine` func.
-
18e6626b
by Charlie Jiang
at 2022-09-05T14:52:48+08:00
[ftinspect] Support opening files drag-dropping.
* src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp: Add related code.
-
d0e7dd1f
by Charlie Jiang
at 2022-09-05T14:52:48+08:00
[ftinspect] Add auxiliary lines for the grid view.
The aux lines will show advance and asc/descender.
* src/ftinspect/glyphcomponents/grid.cpp,
src/ftinspect/glyphcomponents/grid.hpp: Implement aux lines.
* src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
Add `currentSizeAscDescPx`.
* src/ftinspect/panels/singular.cpp, src/ftinspect/panels/singular.hpp:
Pass parameters to the `Grid` graphics item.
-
4b4ff5c5
by Charlie Jiang
at 2022-09-05T14:52:48+08:00
[ftinspect] Support MM/GX.
* src/ftinspect/panels/settingpanelmmgx.cpp,
src/ftinspect/panels/settingpanelmmgx.hpp:
Add GUI widgets for MM/GX settings.
* src/ftinspect/engine/mmgx.cpp, src/ftinspect/engine/mmgx.hpp:
Add `MMGXAxisInfo` to retrieve axes info. However, the SFNT name table
isn't implemented, so the SFNT based axis names are unavailable.
* src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
Add `applyMMGXDesignCoords`. Add getters `currentFontMMGXState` and
`currentFontMMGXAxes`. Info is retrieved when loading font.
* src/ftinspect/panels/settingpanel.cpp,
src/ftinspect/panels/settingpanel.hpp: Uncomment functional code.
Remove `checkHintingMode` and `checkStemDarkening`. Applying of delayed
settings is taken care by the `MainGUI`. So emitting `fontReloadNeeded`
simply will do the work.
* src/ftinspect/maingui.cpp: Don't reset the cache so aggressively.
* src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
-
4f87af57
by Charlie Jiang
at 2022-09-05T14:53:39+08:00
[ftinspect] Add SFNT `name` table retrieving.
* src/ftinspect/engine/fontinfo.cpp, src/ftinspect/engine/fontinfo.hpp:
New files, add `SFNTName` to retrieve `name` table.
Conversions to `QString` from mainstream encodings are supported.
* src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
Add `currentFontSFNTNames` and retrieve the `name` table when loading the
font. Also pass the SFNT name table when loading palettes.
* src/ftinspect/engine/mmgx.cpp, src/ftinspect/engine/paletteinfo.cpp:
Uncomment functional code to make use of the `name` table.
* src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
-
96cbc62c
by Charlie Jiang
at 2022-09-05T14:54:19+08:00
[ftinspect] Add "Continuous View".
Most new features in the continuous view are included in the commit, except
the mouse left (details pane)/right (go to singular) click behaviour.
* src/ftinspect/panels/continuous.cpp, src/ftinspect/panels/continuous.hpp:
New files, the main continuous tab.
* src/ftinspect/glyphcomponents/glyphcontinuous.cpp,
src/ftinspect/glyphcomponents/glyphcontinuous.hpp:
New files, adding the `GlyphContinuous` as the actual canvas for
continuous rendering.
* src/ftinspect/engine/stringrenderer.cpp,
src/ftinspect/engine/stringrenderer.hpp:
New files, adding `StringRenderer` to layout the strings and produce
glyphs for the canvas to draw.
* src/ftinspect/widgets/charmapcombobox.cpp,
src/ftinspect/widgets/charmapcombobox.hpp:
New files, add the `CharMapComboBox` widget.
* src/ftinspect/engine/charmap.cpp,src/ftinspect/engine/charmap.hpp:
New files, adding `CharMapInfo` class.
* src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
Add necessary fields and getters for string rendering.
Retrieve charmap when loading fonts.
* src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp:
Add the continuous view to the main window.
Call `ContinuousTab::highlightGlyph` when switching from singular to
continuous view.
* src/ftinspect/panels/settingpanel.cpp: Uncomment functional code.
* src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
-
27848b03
by Charlie Jiang
at 2022-09-05T14:54:20+08:00
[ftinspect] Add left/right click behaviour to the continuous view.
Left clicking will open the glyph details pane, and right clicking will
switch to the singular tab.
* src/ftinspect/panels/glyphdetails.cpp,
src/ftinspect/panels/glyphdetails.hpp:
New files, add the `GlyphDetails` class.
* src/ftinspect/glyphcomponents/glyphcontinuous.cpp,
src/ftinspect/glyphcomponents/glyphcontinuous.hpp:
Add `mouseReleaseEvent` event handler which emits the new
`updateGlyphDetails` and `rightClickGlyph` signals.
* src/ftinspect/glyphcomponents/glyphbitmap.cpp,
src/ftinspect/glyphcomponents/glyphbitmap.hpp:
Add `GlyphBitmapWidget` to show the enlarged bitmap.
* src/ftinspect/panels/continuous.cpp, src/ftinspect/panels/continuous.hpp:
Add code to update the details panel, and wire up events.
* src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp:
Add code to initialize the glyph details panel, and wire up components and
events.
* src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
-
b075b49a
by Charlie Jiang
at 2022-09-05T14:54:20+08:00
[ftinspect] Add "Comparator View".
* src/ftinspect/panels/comparator.cpp, src/ftinspect/panels/comparator.hpp:
New files, adding the `ComparatorTab`.
* src/ftinspect/panels/settingpanel.cpp,
src/ftinspect/panels/settingpanel.hpp: Add comparator mode.
* src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp:
Add comparator tab and modify `switchTab` to prevent unwanted window
resizing, and to fix the tab bar position.
Modify `applySettings` to skip applying for comparator tab.
* src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
-
de878a06
by Charlie Jiang
at 2022-09-05T14:54:20+08:00
[ftinspect] Add "Font Info" tab.
* src/ftinspect/panels/info.cpp, src/ftinspect/panels/info.hpp:
New files, add the `InfoTab` class.
* src/ftinspect/engine/fontinfo.cpp, src/ftinspect/engine/fontinfo.hpp:
Add `SFNTTableInfo`, `FontBasicInfo`, `FontTypeEntries`, `FontFixedSize`
and `CompositeGlyphInfo`. The `SFNTTableInfo` and `CompositeGlyphInfo`
classes retrieve info without the related FreeType API, but directly
parse the font data.
* src/ftinspect/models/fontinfomodels.cpp,
src/ftinspect/models/fontinfomodels.hpp:
New files. Add models for the tables and the tree view in the info tab to
use.
* src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
Add `loadDefaults` function for the composite glyphs view to draw its
small icon.
Add `currentFontHasGlyphName`, `currentFontPSInfo`,
`currentFontPSPrivateInfo` and `currentFontSFNTTableInfo` to obtain info.
Add getters.
* src/ftinspect/engine/fontinfonamesmapping.cpp: New file for name mapping.
* src/ftinspect/engine/fontfilemanager.cpp,
src/ftinspect/engine/fontfilemanager.hpp:
Add `currentReloadDueToPeriodicUpdate` so the composite glyph tree isn't
refreshed (which is a very expensive process) for the periodic updating of
symbolic font files.
* src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp:
Add the font info tab info the main window and wire events.
* src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
-
7597fcfb
by Charlie Jiang
at 2022-09-05T14:58:32+08:00
[ftinspect] Fix random crash when closing fonts.
* src/ftinspect/widgets/tripletselector.cpp: Disallow font indices below 0.
It seems the CFF driver can't handle this properly.