freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Git][freetype/freetype-demos][master] 41 commits: [ftinspect] Update bu


From: Werner Lemberg (@wl)
Subject: [Git][freetype/freetype-demos][master] 41 commits: [ftinspect] Update build system settings.
Date: Mon, 03 Oct 2022 15:26:37 +0000

Werner Lemberg pushed to branch master at FreeType / FreeType Demo Programs

Commits:

  • a49b9be2
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Update build system settings.
    
    * src/ftinspect/CMakeLists.txt: Fix MSVC-only options. Require Qt 5.15 and
      enable higher warning level.
    
    * src/ftinspect/meson.build: Set C++ version. Require Qt 5.15.
    
  • 7ff9de6d
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Move out font file managing/watching out to a new class.
    
    Introduce the feature that rejects invalid files.
    
    * src/ftinspect/maingui.hpp, src/ftinspect/maingui.cpp: Move `fontList`,
      `fontWatcher`, `timer` and other code related to font file managing to
      new class `FontFileManager`.
    
    * src/ftinspect/engine.hpp, src/ftinspect/engine.cpp:
      `Engine` class now holds `FontFileManager`.
      Also, make `MainGUI` open and close fonts indirectly via `Engine`.
    
    * src/ftinspect/fontfilemanager.hpp, src/ftinspect/fontfilemanager.cpp:
      New files.
    
    * src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
    
  • a2429a23
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Refactor `Engine`.
    
    This commit decouples `Engine` so it no longer depends on `MainGUI`.
    
    Because of that, a lot of getters and setters are added to `Engine`, and
    `MainGUI` call setters in its `applySettings` function, which makes applying
    of the settings lazy (only happen when the glyph repaints).
    
    In the later commits, options will be divided into two types: mostly lazy
    ones, and a few eager ones which need to be immediately applied, because
    they need the cache to be purged.
    
    Some code in `MainGUI` is moved into `Engine`, as well.
    
    Functions in the `Engine` are re-ordered. Constructor is greatly reduced to
    `queryEngine`.
    
    * src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
      As described.
    
    * src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp:
      As described.
    
    * src/ftinspect/ftinspect.cpp: Remove dependency of `Engine` against
      `MainGUI`.
    
  • da068f1e
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Rename all private member variables with an underscore suffix.
    
    (pure mechnical commit)
    
    * src/ftinspect/**: Renaming. Also some variables with abbreviations
    were renamed.
    
    This will enable nicer getter/setters, as discussed in #13.
    
  • 5459a6d6
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Use custom `QAbstractListModel` instead of manually mapping.
    
    In `maingui.cpp`, mapping between `QComboBox` indices and actual FreeType
    values was done manually. The enabled statuses of individual ComboBox items
    were also maintained in `maingui.cpp`.
    
    In this commit, those code was moved to seperate custom classes
    implementating `QAbstractListModel`. All mapping was done there.
    Enable/Disable states was maintained in the classes as well.
    By doing this, the reason why some items were disabled was made more clear
    and explicit. Adding more items is easier.
    
    The `QComboBoxx` custom widget is no longer needed since disable flag can
    be provided by the custom model by overriding the `flags` function.
    
    `SimpleComboBoxModel` is a basic class for Key-Value-DisplayName mapping.
    Other models could extend this class if no complicated mapping (e.g.
    `HintingModeComboBoxModel`) is needed.
    
    * src/ftinspect/models/customcomboboxmodels.cpp,
      src/ftinspect/models/customcomboboxmodels.cpp: New files.
    
    * src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
      `Engine` now accepts "load target" value of certain anti-aliasing mode
      instead of the anti-aliasing enum value. The mapping was moved into
      `AntiAliasingComboBoxModel`.
    
    * src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp: Move all mappings
      and enabled/disabled statuses to separate models.
      Remove mapping `QHash`es. Use `QComboBox` instead of `QComboBoxx`.
    
    * src/ftinspect/meson.build, src/ftinspect/CMakeLists.txt: Updated.
    
  • 75504d30
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Re-organize custom widgets.
    
    * src/ftinspect/widgets/customwidgets.cpp,
      src/ftinspect/widgets/customwidgets.cpp: New files.
      Include `QGraphicsViewx`, `ZoomSpinBox` and `UnboundScrollArea` (for later
      use).
    
    * src/ftinspect/widgets/qspinboxx.hpp, src/ftinspect/widgets/qspinboxx.hpp:
      Changed into `ZoomSpinBox` in `customwidgets.cpp`.
    
    * src/ftinspect/widgets/qgraphicsviewx.cpp,
      src/ftinspect/widgets/qgraphicsviewx.hpp:
      Merged into `customwidgets.cpp`
    
    * src/ftinspect/widgets/qcomboboxx.hpp,
      src/ftinspect/widgets/qcomboboxx.cpp: Removed. No longer needed.
      We're using custom `QAbstractListModel`'s `flags` func to disable items..
    
    * src/ftinspect/widgets/qpushbuttonx.hpp,
      src/ftinspect/widgets/qpushbuttonx.cpp: Removed. No longer needed.
      We're using `setButtonNarrowest` in `uihelper.cpp`.
    
    * src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp: Updated to use new
      custom widgets.
    
    * src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
    
  • 439d2397
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Rename `rendering` dir to `glyphcomponents`.
    
    All classes in `rendering` directory will be responsible for draw
    glyphs, either as independent widgets or as `QGraphicsItem`. However, the
    actual drawing part will be placed into `RenderingEngine`. Therefore, we
    rename it to `glyphcomponents`.
    
    * src/ftinspect/rendering/**: Renamed.
    
    * src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build,
      src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp: Updated.
    
  • 996dbf27
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] WIP: Rewrite `MainGUI`.
    
    Note: This commit doesn't compile. This change is splitted into 2 commits
    to avoid a complicated diff.
    
    * src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp: Old version removed.
    
  • 515cea4e
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Rewrite `MainGUI`.
    
    Note: This commit compiles, but the main view is removed, so you will get a
    blank right panel. The singular view will be added back with major changes
    in the next commit.
    
    This commit mainly introduces below changes:
    
    1. The original `MainGUI` contains almost all GUI elements. Most of them are
       taken out to modular components. The current `MainGUI` serves only as
       a skeleton provides coordinate between components, greatly shortened.
       It also provides some auxiliary code such as calling to file chooser.
    2. The left panel is moved to `SettingPanel` class. The current
       `settingpanel.[ch]pp` are directly modified from the latest code, so they
       contains some options not implemented in the `Engine`.
       Structural code that is only added accompanying later change is removed,
       such as the comparator mode. Such code will be added back with the
       related feature. However, code for unimplemented options are simply
       commented out.
    3. The main part is transformed into a tabbed view. The original code is
       removed. Refactored, it will be added back in the next commit.
    4. The navigation buttons (Next/Prev Font/Face/NI) are changed into the new
       triplet-selector, which is a major UI improvement.
    
    * src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp: As described.
    
    * src/ftinspect/panels/abstracttab.hpp: Add `AbstractTab` which is an
      interface for all tabs listening for font reloading and repainting.
    
    * src/ftinspect/panels/settingpanel.cpp,
      src/ftinspect/panels/settingpanel.hpp:
      As described, this is the left panel. This requires intensive reviewing
      since many bugs had rooted here.
    
    * src/ftinspect/widgets/tripletselector.cpp,
      src/ftinspect/widgets/tripletselector.hpp:
      As described, this is the triplet (Font/Subface/NI) selector.
      This component is also responsible for repopulating triplet information
      and keep up with the font file change (i.e. the
      `FontFileManager::currentFileChanged` event is captured here).
    
    * src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
      Add `fontValid` and `namedInstanceName` since `TripletSelector` requires
      them. However, they'll subject to change later.
    
    * src/ftinspect/ftinspect.cpp: Remove call to `MainGUI::setDefaults`.
    
    * src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
    
  • eb1faf59
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Add the `SingularTab` and related widgets.
    
    This introduces the new singular tab. However, because the new tab heavily
    depend on the new engine structure, it's current not functional. No bitmap
    or outline will be displayed. This would be fixed after the `Engine` was
    refactored in the next commit.
    
    The new singular tab has the size and glyph index selector moved out as
    modular widgets to be reused.
    
    The new scroll and shortcut behaviours are introduced in this commit, which
    depend on scroll events introduced in the custom `QGraphicsViewx`.
    
    The infinity panning of grid is implemented mainly via
    `SingularTab::updateGrid` and `Grid::updateRect`.
    
    This commit is introducing new features since it would be unfavorable to
    "backport" old version of glyph components, and add those new features in
    future commits - this is way too complex.
    
    * src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
      Add `currentFontNumberOfGlyphs` and `dpi` functions.
    
    * src/ftinspect/widgets/fontsizeselector.cpp,
      src/ftinspect/widgets/fontsizeselector.hpp:
      This is the new font size selector to replace the old size/DPI/zoom boxes.
      This widget is capable of handling wheel and key events delegated from
      other widgets.
      The support for fixed sizes and bitmap-only font is not yet added.
    
    * src/ftinspect/widgets/glyphindexselector.cpp,
      src/ftinspect/widgets/glyphindexselector.hpp:
      This is the new glyph index selector to replace the old navi buttons.
      This selector is aware of index min/max, consists of a group of navi
      buttons, a text box (actually a spin box without buttons) to directly
      input glyph index.
    
    * src/ftinspect/glyphcomponents/graphicsdefault.cpp,
      src/ftinspect/glyphcomponents/graphicsdefault.hpp:
      This struct contains all default graphical settings (mainly for singular
      view, e.g. the grid line color).
    
    * src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp:
      Add the new tab into the main window.
    
    * src/ftinspect/glyphcomponents/glyphbitmap.cpp,
      src/ftinspect/glyphcomponents/glyphbitmap.hpp:
      This will now delegate rendering to the engine instead of doing rendering
      itself. However, since the rendering part of the `Engine` is not
      implemented, code initializing `image_` is left commented.
      Also add another constructor for initializing directly from a `QImage`.
    
    * src/ftinspect/glyphcomponents/glyphoutline.cpp,
      src/ftinspect/glyphcomponents/glyphoutline.hpp,
      src/ftinspect/glyphcomponents/glyphpointnumbers.cpp,
      src/ftinspect/glyphcomponents/glyphpointnumbers.hpp,
      src/ftinspect/glyphcomponents/glyphpoints.cpp,
      src/ftinspect/glyphcomponents/glyphpoints.hpp:
      Constructors of those items now accept a `FT_Glyph` instead of
      `FT_Outline`. The conversion is done inside the view, and the view won't
      be displayed if the glyph isn't outline glyph.
      This simplifies the code of `SingularTab`.
    
    * src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
    
  • 631161f1
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Refactor `Engine` and fix the singular tab.
    
    This comment brings the new glyph loading and bitmap rendering code.
    The bitmap rendering part is in `RenderingEngine` which can be obtained
    from the `Engine`. The `Engine` now supports loading the glyph by loading
    with image cache and without image cache.
    The `loadOutline` function is removed.
    
    Accompanying this change, some new features are introduced as well. Most
    notable the improvements in rendering: back/foreground color and gamma,
    support bitmap glyphs (not enabled in the UI). Support for LCD and color
    layer font is absent yet.
    
    The singular tab is now enabled by uncommented functional code that was
    commented in the last commit.
    
    In `Engine`, a `ftFallbackFace_` is introduced for all non-rendering work,
    and the old `ftSize_` is only used for rendering. This helps dealing with
    non-scalable fonts since we can safely retrieve info with the fallback face.
    
    * src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
      Integrate the `RenderingEngine`.
      Change `loadFont` to update the `ftFallbackFace_` as well.
      Change all info-retrieving functions to use `ftFallbackFace_`.
      Add `loadGlyph`, `loadGlyphIntoSlotWithoutCache` and
      `loadGlyphWithoutUpdate`, and remove `loadOutline`.
      Extract code about "get a face object from the cache and do sth."
      into a new function `withFace`.
      Add property `antiAliasingEnabled` and `renderMode` for the rendering
      engine.
      Some minor changes are included.
    
    * src/ftinspect/engine/rendering.cpp, src/ftinspect/engine/rendering.hpp:
      New files, as described.
    
    * src/ftinspect/panels/settingpanel.cpp,
      src/ftinspect/glyphcomponents/glyphbitmap.cpp,
      src/ftinspect/panels/singular.cpp: Uncomment functional code.
    
    * src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Updated.
    
  • f374d2f4
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Support embedded bitmap and bitmap-only fonts.
    
    Bitmap glyphs are already supported in the new rendering engine, so we make
    the option effective in the GUI. Also support bitmap-only fonts by coercing
    sizes to available ones and force embedded bitmaps.
    
    * src/ftinspect/widgets/fontsizeselector.cpp,
      src/ftinspect/widgets/fontsizeselector.hpp:
      Retrieve fixed sizes info from the engine and coerce to nearest available
      sizes when using bitmap-only fonts.
    
    * src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
      Add `embeddedBitmapEnabled` property and `currentFontHasEmbeddedBitmap`,
      `currentFontBitmapOnly` and `currentFontFixedSizes` getters.
    
    * src/ftinspect/panels/settingpanel.cpp: Uncomment functional code.
    
  • d5ce3790
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Support tricky fonts.
    
    For tricky fonts, we disable auto-hinter and limit the TT interpreter
    version.
    
    * src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
      Add `currentFontTricky` function and turn off hinting forcibly when the
      user turns it off in the GUI for tricky fonts.
    
    * src/ftinspect/panels/settingpanel.cpp: As described.
    
  • 56c63590
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Support stem darkening.
    
    * src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
      Add `setStemDarkening` func.
    
    * src/ftinspect/panels/settingpanel.cpp: Uncomment function code.
    
  • 1d3d8628
    by Charlie Jiang at 2022-09-25T23:38:10+02: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.
    
  • 2aa1763c
    by Charlie Jiang at 2022-09-25T23:38:10+02: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.
    
  • 74abe305
    by Charlie Jiang at 2022-09-25T23:38:10+02: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.
    
  • 2342b6b7
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Support opening files drag-dropping.
    
    * src/ftinspect/maingui.cpp, src/ftinspect/maingui.hpp: Add related code.
    
  • 970446fe
    by Charlie Jiang at 2022-09-25T23:38:10+02: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.
    
  • 9f70ceb3
    by Charlie Jiang at 2022-09-25T23:38:10+02: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.
    
  • 0a44f99b
    by Charlie Jiang at 2022-09-25T23:38:10+02: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.
    
  • e9aa456e
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    # This is a combination of 2 commits.
    # This is the 1st commit message:
    
    [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.
    
    # This is the commit message #2:
    
    * src/ftinspect/engine/stringrenderer.cpp: Fix infinite loop.
    
    Don't limit the glyph position and exit too early, or the loop in `render`
    function won't stop forever. Also, since the string can be moved by the
    mouse, there's no point to limit the line position in the canvas viewport..
    
  • fbc7269c
    by Charlie Jiang at 2022-09-25T23:38:10+02: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.
    
  • 8969c8a2
    by Charlie Jiang at 2022-09-25T23:38:10+02: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.
    
  • 440920e1
    by Charlie Jiang at 2022-09-25T23:38:10+02: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.
    
  • bf88f4d1
    by Charlie Jiang at 2022-09-25T23:38:10+02: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.
    
  • 9eba3d58
    by Charlie Jiang at 2022-09-25T23:38:10+02: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.
    
  • 5e0e3f68
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    * src/ftinspect/engine/engine.cpp: Minor formatting.
    
  • 80dc6343
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Modify the about text and add actual version.
    
    * src/ftinspect/maingui.cpp: As described.
    
    * src/ftinspect/ftinspect.cpp: Pass the actual version.
    
    * src/ftinspect/engine/engine.cpp, src/ftinspect/engine/engine.hpp:
      Add `dynamicLibraryVersion` func.
    
  • 531d0069
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Improve bitmap display in the glyph details pane.
    
    Now the ppem square is displayed as light gray, ink box as blue,
    xy-axis as thin black lines.
    Adding ppem square improves displaying of non-spacing glyphs.
    
    * src/ftinspect/panels/glyphdetails.cpp:
      Pass the ppem box to the `GlyphBitmap` widget.
    
    * src/ftinspect/glyphcomponents/glyphbitmap.cpp,
      src/ftinspect/glyphcomponents/glyphbitmap.hpp:
      Add a `placeholderRect` to store the ppem square info. Layout the glyph
      bitmap on the basis of the ppem square.
      Draw auxiliary lines on the canvas.
    
  • 9a746eea
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Add transformation and scaling info to the composite glyph view.
    
    Note: Untested since no font with non-1.0 scale subglyphs is found.
    
    * src/ftinspect/engine/fontinfo.cpp, src/ftinspect/engine/fontinfo.hpp:
      Fetch transformation and scaling info from the font.
    
    * src/ftinspect/models/fontinfomodels.cpp,
      src/ftinspect/models/fontinfomodels.hpp:
      Change the "Position" column to "Position and Transformation".
      Display the transformation info.
    
  • 4e87d42d
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Fix memory-related crash, and refactor outline-retaining...
    
    graphics items. Also fix some compiler warnings.
    
    * src/ftinspect/glyphcomponents/glyphoutline.cpp,
      src/ftinspect/glyphcomponents/glyphoutline.hpp:
      Don't retain the `FT_Outline*` whose lifetime is bound to the glyph.
      Prepare the path in the ctor so the outline isn't saved.
      Add `GlyphUsingOutline` as the base class for all classes that have to
      retain a `FT_Outline` object.
    
    * src/ftinspect/glyphcomponents/glyphpointnumbers.cpp,
      src/ftinspect/glyphcomponents/glyphpointnumbers.hpp,
      src/ftinspect/glyphcomponents/glyphpoints.cpp,
      src/ftinspect/glyphcomponents/glyphpoints.hpp: Refactored.
    
    * src/ftinspect/engine/engine.hpp, src/ftinspect/panels/singular.hpp,
      src/ftinspect/engine/rendering.hpp
      Add default values to initialize member fields.
    
    * src/ftinspect/panels/singular.cpp:
      Pass the `FT_Library` into the graphics items.
    
    * src/ftinspect/models/fontinfomodels.cpp: Fix warning.
    
  • 214a82cf
    by Charlie Jiang at 2022-09-25T23:38:10+02:00
    [ftinspect] Activate the color layers by default.
    
    Don't deactivate it when color layers are absent. Also fix typo.
    
    * src/ftinspect/panels/settingpanel.cpp: Updated.
    
  • f736c77d
    by Werner Lemberg at 2022-10-02T08:00:01+02:00
    [ftinspect] Format build files for cmake and meson.
    
    * src/ftinspect/CMakeLists.txt, src/ftinspect/meson.build: Do it.
    Also sort entries.
    
  • f107b3ff
    by Werner Lemberg at 2022-10-03T16:11:37+02:00
    [ftinspect] Format `src/ftinspect/engine/*`.
    
  • a4d3a279
    by Werner Lemberg at 2022-10-03T16:11:42+02:00
    [ftinspect] Format `src/ftinspect/glyphcomponents/*`.
    
  • 552ce602
    by Werner Lemberg at 2022-10-03T16:11:44+02:00
    [ftinspect] Format `src/ftinspect/models/*`.
    
  • 6e71c996
    by Werner Lemberg at 2022-10-03T16:11:47+02:00
    [ftinspect] Format `src/ftinspect/panels/*`.
    
  • d980c71d
    by Werner Lemberg at 2022-10-03T16:11:50+02:00
    [ftinspect] Format `src/ftinspect/widgets/*`.
    
  • 138f8b25
    by Werner Lemberg at 2022-10-03T16:11:53+02:00
    [ftinspect] Format `src/ftinspect/*`.
    
  • 89baba53
    by Charlie Jiang at 2022-10-03T17:23:19+02:00
    * src/ftinspect/engine/engine.cpp: Fix CBDT/CBLC colored fonts.
    
    Add `FT_LOAD_COLOR` for those fonts.
    

16 changed files:

The diff was not included because it is too large.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]