-
6b2764f1
by Alexei Podtelezhnikov at 2022-08-25T21:28:17-04:00
[graph] Slight optimization of cached gradients.
This saves about 1% of `ftgrid` execution time.
* graph/gblender.c (gblender_reset_key, gblender_reset_channel_key):
Implement faster gradients, which are rounded anyway.
-
efc6fa2c
by Alexei Podtelezhnikov at 2022-08-27T23:07:15-04:00
[graph] Minor fixes.
(gblender_clear): Initialize with black background, whereas
foreground stays invalid.
(gblender_lookup_channel): Increase cache utilization.
-
8d0e6ac2
by Alexei Podtelezhnikov at 2022-08-27T23:15:32-04:00
* graph/gblender.c (gblender_lookup): Quest for perfect hash function.
-
d8cd0813
by Alexei Podtelezhnikov at 2022-08-27T23:48:59-04:00
[graph] Better hash function and a fix.
* graph/gblender.c (gblender_clear): Initialize recently grown array.
(gblender_lookup_channel): Improve hash function.
-
13200abe
by Alexei Podtelezhnikov at 2022-08-28T22:22:49-04:00
[graph] Rework #ifdef GBLENDER_STORE_BYTES.
This also settles on tripling the number of channel keys, which is
a safe bet in all circumstances. Quadrupling might only work on
64-bit architectures or with added key structure padding, without
GBLENDER_STORE_BYTES defined.
* graph/gblender.h (GBlenderCell): Change definition.
* graph/gblblit.c (GDST_STOREB): Updated accordingly.
* graph/gblender.c (gblender_clear, gblender_reset_key,
gblender_lookup, gblender_lookup_channel): Ditto.
-
44f64424
by Alexei Podtelezhnikov at 2022-08-29T11:37:25-04:00
* Makefile (FTCOMMON_OBJ): Add `graph` dependency, include `rsvg-port`.
-
8aac6a23
by shugaley at 2022-08-29T11:49:01-04:00
* src/ftpngout.c (FTDemo_Display_Print): Declare `code` volatile.
Fixes #18.
-
81bb1415
by Alexei Podtelezhnikov at 2022-09-06T16:41:10-04:00
* graph/gblender.* (GBlenderRec): Cosmetic changes to cache array.
-
af884e3c
by Alexei Podtelezhnikov at 2022-09-06T17:23:31-04:00
[graph] Fortify channel cache.
Using signed short offsets in the channel cache will risk to overflow
if the current cache size is to increase. Here we switch to unsigned
index and express it in the cache units.
* graph/gblender.h (GBlenderChanKeyRec): Update `index`.
* graph/gblender.c (gblender_clear, gblender_lookup_channel,
gblender_reset_channel_key): Updated accordingly.
-
7bf181da
by Alexei Podtelezhnikov at 2022-09-07T23:33:24-04:00
* graph/grobjs.* (grAlloc): Return void pointer.
-
254001a1
by Alexei Podtelezhnikov at 2022-09-08T16:53:13-04:00
* src/*.*: Add const qualifier to the executable basename.
-
441c782f
by Alexei Podtelezhnikov at 2022-09-10T22:18:27-04:00
* src/ftdiff.c (render_state_draw), src/common.d (ft_strdup): Clean up.
-
f634e5c4
by Alexei Podtelezhnikov at 2022-09-11T22:06:49-04:00
* src/ftcommon.c (FTDemo_Display_New): Handle window titles.
* src/ftcommon.h: Update its prototype.
* src/ftgamma.c, src/ftgrid.c, src/ftsdf.c, src/ftstring.c, src/ftview.c
(main): Updated accordingly.
-
2b880d8e
by Alexei Podtelezhnikov at 2022-09-13T07:18:28-04:00
* src/ftdiff.c: Add const qualifier to the executable basename.
-
50de6cec
by Alexei Podtelezhnikov at 2022-09-15T17:36:06+00:00
[graph] Clean up the cache clearance.
Use separate functions to clear the color and channel gradient
caches and call them conditionally instead of passing the switch
around.
* graph/gblender.c (gblender_clear): Separate out...
(gblender_clear_channels): ... this function.
(gblender_use_channels): Removed.
* graph/gblender.h: Update their declarations.
* graph/gblgblit.c (gblender_blit_init, grSetTargetPenBrush):
Updated to call the above functions and formatted.
-
a005039b
by Alexei Podtelezhnikov at 2022-09-15T23:39:08-04:00
* graph/gblblit.c (gblender_blit_init): Fix for negative pitch.
Reported by Anurag Thakur.
-
bac9a530
by Alexei Podtelezhnikov at 2022-09-17T10:51:54-04:00
* src/ftlint.c (Checksum): Accept negative pitch.
-
5f4044b7
by Alexei Podtelezhnikov at 2022-09-17T12:26:16-04:00
Revert "* src/ftlint.c (Checksum): Accept negative pitch."
This reverts commit bac9a53080b24e76a2dfe8def2b15682135b8454.
The pitch is always positive in the converted bitmap.
-
e98e5aff
by Alexei Podtelezhnikov at 2022-09-22T22:39:40-04:00
* graph/meson.build: No macOS driver yet.
Fixes #19.
-
d719135f
by Alexei Podtelezhnikov at 2022-09-23T22:27:04-04:00
* graph/x11/grx11.c (gr_x11_blitter_reset): Minor improvement.
-
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.
-
9ac95b36
by Charlie Jiang at 2022-10-04T00:17:08+08:00
[ftinspect] Change unclear comments.
* src/ftinspect/engine/fontinfo.hpp,
src/ftinspect/glyphcomponents/glyphcontinuous.cpp: Clearify comments.
* src/ftinspect/maingui.cpp: Actually the left widget does more than
setting the margin, so the comment line about removing the left widget and
layout is removed.
-
ee9de687
by Alexei Podtelezhnikov at 2022-10-07T16:28:49+00:00
* graph/x11/grx11.c (gr_x11_surface_init): Ignore border and colormap.
The colormap is unused. The border is set by a window manager.
-
8439fd65
by Alexei Podtelezhnikov at 2022-10-07T22:55:41-04:00
* graph/x11/grx11.c (gr_x11_surface_{init,done}): Use DefaultGC.
-
1b929e4b
by Werner Lemberg at 2022-10-20T19:09:19+02:00
* subprojects/zlib.wrap: Update to zlib version 1.2.13.
-
5b62bcf6
by Werner Lemberg at 2022-10-24T10:15:24+02:00
Replace '1/50th' (and similar entries) with '1/64' in output and comments.
-
201a6bc2
by Alexei Podtelezhnikov at 2022-10-24T23:26:17-04:00
* src/ftview.c (Render_Stroke): Render bitmaps without stroking.
-
000d4ede
by Alexei Podtelezhnikov at 2022-10-25T00:12:36-04:00
[ftview] Improve error tracking.
* src/ftcommon.c (FTDemo_Error_String): Spin off new function from...
(PanicZ): ... this function.
* src/ftcommon.h (FTDemo_Error_String): Declare it.
* src/ftview.c (Process_Error): Count and track persistent errors.
(Render_*): Use it.
(main): Report the persistent error code and description.
-
1bae8dcc
by Alexei Podtelezhnikov at 2022-11-11T11:26:35-05:00
[ftbench] Fix up charmap benchmarking.
* src/ftbench.c (main): Parse and process the charmap index option.
(header): Report the active charmap index.
(usage): Document it.
(test_cmap_cache): Call `FTC_CMapCache_Lookup` with correct argument.
(test_cmap_iter): Do not count idle charmaps.
* man/ftbench.1: Document the charmap selection.
-
c1d91819
by Alexei Podtelezhnikov at 2022-11-11T12:42:56-05:00
* src/ftbench.c (test_get_bbox): Use `FT_Set_Transform`.
-
c446215a
by Alexei Podtelezhnikov at 2022-11-12T22:57:42-05:00
* man/ftbench.1: Minor updates.
-
765ba6b6
by Alexei Podtelezhnikov at 2022-11-14T15:41:15+00:00
* src/ftbench.c: Relocate and undo BBox rotations.
-
dc01c527
by Alexei Podtelezhnikov at 2022-11-29T23:12:34-05:00
* src/ftbench.c (main): Honor render mode with FT_LOAD_RENDER.
-
fae76280
by Alexei Podtelezhnikov at 2022-11-30T22:19:08-05:00
* src/ftbench.c (main): Sync the render mode and the load target.
-
e8b2835f
by Werner Lemberg at 2022-12-07T17:07:00+01:00
* subprojects/zlib.wrap: Micro-update from upstream.
-
9f3ae579
by Werner Lemberg at 2023-01-03T09:30:25+01:00
* src/ftcommon.c (FTDemo_Draw_Header): Handle invalid `size` objects.
-
9277a183
by Alexei Podtelezhnikov at 2023-01-05T17:00:47+00:00
* src/ftlint.c (main): Decorate opening and sizing errors.
-
fdc0f1e7
by Alexei Podtelezhnikov at 2023-01-06T19:48:39+00:00
* src/ftview.c: Fix a warning.
-
2b1606e0
by Alexei Podtelezhnikov at 2023-01-07T21:57:55-05:00
[ftview, ftstring] Prevent locking on broken unsizable fonts.
* src/ftstring.c (Render_Waterfall): Break on error.
* src/ftview.c (Render_Waterfall): Break on error.
-
e1e334bc
by Alexei Podtelezhnikov at 2023-01-08T23:21:50-05:00
* src/ftcommon.c (FTDemo_Draw_Header): Show sizing errors again.
-
657c7b5f
by Alexei Podtelezhnikov at 2023-01-08T23:23:20-05:00
* src/ftview.c: Remove obsolete comments.
-
11362b40
by Alexei Podtelezhnikov at 2023-01-09T22:34:20-05:00
[ftstring] Fix error reporting.
* src/ftstring.c (Render_*): Do not return or overwrite errors.
(main): Updated accordingly.
-
e2165418
by Alexei Podtelezhnikov at 2023-01-10T16:50:21+00:00
* src/ftstring.c (main, write_header): Reset custom header differently.
-
ad6a0fb6
by Alexei Podtelezhnikov at 2023-01-10T21:51:49-05:00
* src/*.c: Pair up `grRefreshSurface` and `grListenSurface` calls.
-
40ff6d71
by Alexei Podtelezhnikov at 2023-01-11T14:59:27+00:00
* src/ftcommon.c (FTDemo_Draw_Header): Minor.
-
dc5926fc
by Alexei Podtelezhnikov at 2023-01-11T15:08:31+00:00
Minor comment.
-
a464f430
by Alexei Podtelezhnikov at 2023-01-11T23:09:11-05:00
Typos.
-
edfbdc8f
by Alexei Podtelezhnikov at 2023-01-13T16:32:13+00:00
* src/ftview.c (Process_Event): Small harmonization.
-
8b44004e
by Alexei Podtelezhnikov at 2023-01-14T00:35:15+00:00
* src/ftview.c (Process_Event): Minor refactoring.
-
a6d97b6b
by Alexei Podtelezhnikov at 2023-01-13T22:51:49-05:00
* src/ftview.c (Process_Event): Trigger screen updates locally.
(main, status): Cleaned up.
-
7ac67ffa
by Alexei Podtelezhnikov at 2023-01-14T12:16:20-05:00
[ftview] Microoptimization.
* src/ftview.c (parse_cmdline, write_header, Process_Event, parse):
Prioritize easy checks.
-
71287e7c
by Alexei Podtelezhnikov at 2023-01-16T14:34:28+00:00
* src/ftview.c (Process_Event): Fix -Wswitch warning.
-
ee37803c
by Werner Lemberg at 2023-01-17T12:47:06+01:00
Minor comment typos.
-
352dcf15
by Werner Lemberg at 2023-01-17T18:43:46+01:00
* src/ftinspect/*.[ch]pp: Normalize copyright notices
This allows the use of FreeType's `update-copyright-year` script.
-
cd704e46
by Werner Lemberg at 2023-01-17T19:05:30+01:00
Update all copyright notices.
-
f1d12d29
by Alexei Podtelezhnikov at 2023-01-18T15:01:59+00:00
Typos.
-
4ec7c98f
by Alexei Podtelezhnikov at 2023-01-20T15:49:56+00:00
[graph] Explain the blender cache.
-
93c2d046
by Alexei Podtelezhnikov at 2023-01-21T15:38:51+00:00
Edit comments.
-
dbb7650b
by Alexei Podtelezhnikov at 2023-01-21T18:41:31+00:00
* graph/win32/grwin32.c (gr_win32_surface_init): Polish gray mode.
-
d0d57891
by Alexei Podtelezhnikov at 2023-01-21T22:35:35-05:00
[ftbench,ftgrid,ftmulti,ftview] Accept hexadecimal glyph indices.
This helps to use charcodes on the command line.
* src/ftbench.c (main): Use sscanf with "%i".
* src/ftgrid.c (parse_cmdline): Ditto.
* src/ftmulti.c (main): Ditto.
* src/ftview.c (parse_cmdline): Ditto.
-
36594710
by Alexei Podtelezhnikov at 2023-01-22T22:33:23-05:00
* src/ftlint.c (Usage): Output to stderr, like others do.
-
cd85fd9c
by Alexei Podtelezhnikov at 2023-01-24T14:00:15+00:00
Typos.
-
147abd3f
by Alexei Podtelezhnikov at 2023-01-24T22:42:41-05:00
[ftgrid,ftstring,ftview] Option to select charmap by index.
* src/ftcommon.c (FTDemo_Install_Font): Accept a charmap index.
(FTDemo_Make_Encoding_Tag): Fall back on a numeric value to return.
* src/ftgrid.c, src/ftstring.c, src/ftview.c (usage): Updated.
* man/ftgrid.1, man/ftstring.1, man/ftview.1: Ditto.
-
702caec5
by Alexei Podtelezhnikov at 2023-01-25T18:04:13+00:00
* src/ftview.c (Render_Waterfall): Fill the right margin.
The waterfall looks better if the string runs over the edge.
-
da9f2a31
by Alexei Podtelezhnikov at 2023-01-26T22:57:38-05:00
* src/ftstring.c (Render_Waterfall): Avoid bitmap reloading.
This hides horrible performance of compressed PCF fonts.
-
3cc67019
by Alexei Podtelezhnikov at 2023-01-27T23:14:54-05:00
* graph/win32/grwin32.c (key_translators): Sort virtual-key codes.
-
ab74662d
by Alexei Podtelezhnikov at 2023-01-27T23:30:25-05:00
* src/ftstring.c (event_render_mode_change): Remove report.
-
4028f9ac
by Alexei Podtelezhnikov at 2023-01-27T23:38:26-05:00
[ftstring] New feature: simple string editor.
It only handles printable ASCII characters and backspace to erase them.
* src/ftstring.c (Process_Event): Use Enter key to initiate this mode.
(Process_TTY): Intercept and handle relevant keys while editing.
(Render_TTY): Special rendering mode while editing.
(main, event_help): Updated.
-
25491e9a
by Alexei Podtelezhnikov at 2023-01-28T23:02:26-05:00
* src/ftstring.c (write_header): Always report kerning info.
-
6b53a219
by Werner Lemberg at 2023-01-30T17:18:01+01:00
* subprojects/libpng.wrap: Updated.
-
d4eb7a9f
by Alexei Podtelezhnikov at 2023-01-30T17:51:32+00:00
[ftstring] Reduce floating point use.
* src/ftcommon.c (FTDemo_String_Load): Use signed integers, not doubles.
* src/ftstring.c (event_angle_change): Minor.
-
8f3891bd
by Alexei Podtelezhnikov at 2023-01-30T19:05:04+00:00
* src/ftlint.c (Analyze): Report void bitmaps.
-
97587ef4
by Alexei Podtelezhnikov at 2023-02-01T05:45:32-05:00
* src/ftstring.c (write_header): Change layout.
-
e08dfe9a
by Alexei Podtelezhnikov at 2023-02-02T10:24:23-05:00
[graph/win32] Improve error handling.
* graph/win32/grwin32.c (gr_win32_surface_resize): Change return type.
(gr_win32_surface_init): Ditto and handle failure gracefully.
-
0e00a682
by Alexei Podtelezhnikov at 2023-02-03T22:44:17-05:00
* graph/win32/grwin32.c (Message_Process): Return TRUE on WM_SIZING.
-
6e609535
by Alexei Podtelezhnikov at 2023-02-03T22:45:49-05:00
* src/ftcommon.c (my_face_requester): Recognize t1 file extension.
-
f6cd0be0
by Werner Lemberg at 2023-02-05T09:21:00+01:00
* graph/grevents.h (grKey): Add `grKeyHash` and `grKeyAmpersand`.
-
0b396f09
by Werner Lemberg at 2023-02-05T15:56:00+01:00
[ftmulti] Change layout to list axes vertically.
* src/ftmulti.c (Render_All, Render_Text): Shift 'upper left corner' for
glyph display up and to the right.
(main): Emit one axis per line at the left side of the screen.
-
56dcc2c3
by Werner Lemberg at 2023-02-05T16:22:45+01:00
[ftmulti] Display up to 15 axes.
Due to the support of the 'avar' version 2 OpenType extension it is expected
that the number of axes in many fonts will increase because adding 'virtual
axes' is cheap now.
* src/ftmulti.c (MAX_MM_AXES): Set to 15.
(Help): Updated.
(Process_Event): Handle keys '7890-=' for axes 6-8, '!@#$%^' for axes 9-11,
and '&*()_+' for axes 12-14.
-
5ed151f3
by Werner Lemberg at 2023-02-06T07:26:34+01:00
[ftmulti] More key reassignments.
This is a try to better harmonize with other demo programs, and to make the
selection of axes more mnemonic.
* src/ftmulti.c (MAX_MM_AXES): Set to 16.
(Process_Event): Use keys 'aA' for axis 0, 'bB' for axis 1, ..., 'pP' for
axis 16.
Use F1 for help, too.
Use 16, 256, and 4096 as the glyph index increments.
Also adjust other keys to avoid collisions.
(Help): Updated.
(main): Show mnemonic letter next to axis.
Updated.
-
f89dd69e
by Werner Lemberg at 2023-02-06T09:35:01+01:00
* src/ftmulti.c (Process_Event): Simplify.
-
a007661e
by Alexei Podtelezhnikov at 2023-02-06T23:35:04-05:00
[graph/win32] Minor driver improvements.
* graph/win32/grwin32.c: (gr_win32_device_init): Do not set icon
or background, which is covered anyway.
(Message_Process) [WM_PAINT]: Paint only updated rectangle.
-
8b71d4ac
by Alexei Podtelezhnikov at 2023-02-07T00:00:43-05:00
[builds/windows] Add ftmulti.
* builds/windows/msvc/ftmulti.vcxproj: New project.
* builds/windows/msvc/ft2demos.sln: Add it to solutions.
-
f1fd7352
by Alexei Podtelezhnikov at 2023-02-07T23:26:40+00:00
* src/ftmulti.c (Render_All): Tighten right margin.
-
e1cacad9
by Werner Lemberg at 2023-02-08T20:07:29+01:00
[ftgrid] Synchronize with FreeType git.
The changes are necessary due to the commit
```
Avoid reserved identifiers that are globally defined.
```
-
2c5abddf
by Werner Lemberg at 2023-02-08T21:56:35+01:00
Fix various minor compiler warnings.
-
fe84b685
by Alexei Podtelezhnikov at 2023-02-08T22:15:33-05:00
* graph/win32/grwin32.c (Message_Process): Drop some sizing messages.
With the window procedure in a separate thread we only need to forward
basic WM_SIZE, which is sent frequently enough.
-
17fdcc3b
by Werner Lemberg at 2023-02-09T07:27:12+01:00
* Version 2.13.0 released.
==========================
Tag sources with 'VER-2-13-0'.
* README: Updated.
* meson.build: Updated.
* man/*.1: Updated.
-
5f4959bd
by Alexei Podtelezhnikov at 2023-02-11T09:33:05-05:00
* src/ftmulti.c (main): Synchronize options with the others.
-
195908f4
by Alexei Podtelezhnikov at 2023-02-11T09:48:09-05:00
* src/ftmulti.c (Init_Display): Use automatic color depth.
-
46b5ae2d
by Alexei Podtelezhnikov at 2023-02-11T18:30:39-05:00
[ftmulti] Enable overlap flag testing.
Variation fonts often relay on overlapping contours, which require
oversampling to render properly. FreeType relies on FT_OUTLINE_OVERLAP
to trigger the expensive mitigation algorithm. This commit enables
tinkering with the overlap flags and, therefore, the oversampling.
Normally, the flags should be set by the font designers sparingly.
The bitmap strike toggle is no longer available, which has never
been important for the variation font testing.
* src/ftmulti.c (Process_Event): Reassign F4 to overlap toggle.
(Render_Glyph): Tinker with the overlap flags before rendering.
-
1833b1d1
by Alexei Podtelezhnikov at 2023-02-11T20:06:16-05:00
* src/ftmulti.c (Render_All, Render_Text, main): Layout tweaks.
-
24f20f39
by Alexei Podtelezhnikov at 2023-02-11T22:06:15-05:00
* src/ftmulti.c (Process_Event): Miscellaneous tweaks.
Set default step at 1/40 which covers most preferable coordinates.
Adjust the step by doubling or halving it. Round all large-range
coordinates, not just MM. Wrap the coordinates around.
-
2c9e077f
by Alexei Podtelezhnikov at 2023-02-12T11:25:08-05:00
* src/ftmulti.c: Clean up and fix warnings.
-
840a3953
by Alexei Podtelezhnikov at 2023-02-12T11:59:21-05:00
[ftmulti] Enable fill rule flag testing.
Variation fonts often relay on overlapping contours. To reveal them,
we enable turning the even-odd fill rule on and off. This flag is
always off in FreeType by default but supported by the anti-aliased
renderer.
* src/ftmulti.c (Process_Event): Reassign F3 to fill rule toggle,
assign Tab to anti-aliasing toggle.
(Render_Glyph): Tinker with the fill rule flags before rendering.
-
65a5404e
by Alexei Podtelezhnikov at 2023-02-12T21:27:23-05:00
* man/ftmulti.1: Updated.
-
772f8f94
by Alexei Podtelezhnikov at 2023-02-12T21:28:15-05:00
* src/ftmulti.c: Clean up and fix MSVC warnings.
-
cc30d687
by Alexei Podtelezhnikov at 2023-02-12T23:34:27-05:00
* src/ftmulti.c (main, Init_Display): Clean up GUI setup.
-
fac96edb
by Alexei Podtelezhnikov at 2023-02-13T00:47:21-05:00
* src/ftmulti.c: Clean up loading and scaling.
-
9843cd9d
by Werner Lemberg at 2023-02-27T05:31:15+01:00
TrueType mode v38 is gone.
Synchronize with FreeType commit 'Hide Infinality.' from 2023-Feb-17.
Both macros `TT_INTERPRETER_VERSION_38` and `TT_INTERPRETER_VERSION_40` have
now the same value, leading to numerous compilation errors because we use
these two macros as (different) case labels in switch statements.
* src/ftbench.c (tt_interpreter_versions, header, usage, main): Don't use
`TT_INTERPRETER_VERSION_38`.
* src/ftcommon.c (FTDemo_Hinting_Engine_Change, FTDemo_Get_Info): Ditto.
* src/ftdiff.c (ColumnStateRec, render_state_init, render_state_draw):
Ditto.
* src/ftmulti.c (tt_interpreter_versions, main): Ditto.
* src/ttdebug.c (tt_interpreter_versions, Usage, main): Ditto.
* src/ftinspect/engine/engine.hpp (EngineDefaultValues): Ditto.
* src/ftinspect/engine/engine.cpp (Engine::queryEngine): Ditto.
* src/ftinspect/models/customcomboboxmodels.hpp (HintingModeComboBoxModel):
Ditto.
* src/ftinspect/models/customcomboboxmodels.cpp
(HintingModeComboBoxModel::HintingModeComboBoxModel): Ditto.
* src/ftinspect/panels/settingpanel.cpp (SettingPanel::setDefaults): Ditto.
-
746d5be5
by Alexei Podtelezhnikov at 2023-03-02T07:25:47-05:00
[graph] Handle glyphs with 4 or 16 grays.
* graph/gblblit.c (gblender_glyph_upgray): Convert to 256 grays.
(gblender_blit_init): Call it if necessary.
-
bf55619d
by Werner Lemberg at 2023-03-02T15:57:15+01:00
* graph/gblblit.c: Include `<stdlib.h>`.
This is for the `abs` function.
-
b33c0ecf
by Charlie Jiang at 2023-03-03T09:52:15+01:00
[ftinspect] Fix uninitialized memory issue and reference misuse.
Fixes issue #23.
* src/ftinspect/engine/rendering.cpp (RenderingEngine::convertBitmapTo8Bpp):
Properly initialize `FT_Bitmap` since it is a value type.
(RenderingEngine::convertBitmapToQImage): Fix the accidental overwriting of
the source bitmap when converting the bitmap format (only happens for
`FT_PIXEL_MODE_GRAY2` and `FT_PIXEL_MODE_GRAY4`) due to a misuse of a C++
reference.
* src/ftinspect/glyphcomponents/glyphcontinuous.cpp
(GlyphContinuous::drawCacheGlyph): Fix a crash when the `QImage` was failed
to produce.
-
0acdc2bc
by Jouk Jansen at 2023-03-10T16:56:43+01:00
Update VMS installation support.
-
9f864441
by Charlie Jiang at 2023-03-15T05:55:46+01:00
[ftinspect] Support gray level scaling.
See commit 746d5be5: Convert to 256 grays. Slightly tweaked code style.
* src/ftinspect/engine/rendering.cpp (RenderingEngine::convertBitmapTo8Bpp):
Implement it.
-
ec7731ec
by Alexei Podtelezhnikov at 2023-03-25T22:36:53-04:00
[ftlint] Examine the outline shape complexity.
Measured as a ratio of the outline half-perimeter to the sum of its
control box dimensions, the shape complexity is a useful metric.
For example, an `I` and an `M` would have complexities of about
1.0 and 2.0, respectively.
* src/ftlint.c (Examine): Implement the shape complexity calculation.
(main) Report the shape complexity.
* man/ftlint.1: Add a brief explanation.
-
c0289e88
by Alexei Podtelezhnikov at 2023-03-26T23:01:27-04:00
* src/ftlint.c (main): Fix segfault with bad command line.
-
8a4879f6
by Alexei Podtelezhnikov at 2023-03-27T13:44:48+00:00
* src/ftlint.c (main): Handle rendering errors differently.
-
602e8c37
by Alexei Podtelezhnikov at 2023-04-21T13:30:28+00:00
* src/ftview.c (main): Remove unnecessary code.
-
b7883d36
by Alexei Podtelezhnikov at 2023-04-21T13:43:05+00:00
[ftview] Use green empty boxes instead.
* src/ftview.c (status): Store green color.
(main): Initialize it.
(Render_*): Use it.
-
86c711ad
by Alexei Podtelezhnikov at 2023-04-22T23:02:27-04:00
* src/ftview.c (Render_{All,Fancy,Stroke}): Tweak zero-width glyphs.
This helps to avoid collisions and unhides zero-width glyphs better.
-
a0c50341
by Alexei Podtelezhnikov at 2023-04-23T09:12:13-04:00
* src/ftview.c (Render_{All,Fancy,Stroke}): Improve zero-width glyphs.
-
44eaa916
by Alexei Podtelezhnikov at 2023-04-23T11:56:23-04:00
* src/ftgrid.c (grid_status_rescale): Use PPEM-based scaling.