kc3-lang/freetype

Branch :


Log

Author Commit Date CI Message
cda418a4 2025-06-13 11:23:14 [autofit] Speed up computation of `af_reverse_character_map_new`. (1/4) Using HarfBuzz's API functions to construct the reverse map is too slow; we have to call `hb_ot_layout_lookup_get_glyph_alternates` far too often because it can only handle a single glyph at a time. For this reason we are going to parse the GSUB table by ourselves. The new non-local functions are `af_parse_gsub` and `af_map_lookup`. * src/autofit/afgsub.c, src/autofit/afgsub.h: New files for parsing, validating, and mapping the `SingleSubst` and `AlternateSubst` subtable types of a GSUB table. * src/autofit/autofit.c, src/autofit/rules.mk (AUTOF_DRV_SRC): Updated.
2ab0357d 2025-06-12 23:15:22 [base] Add no-overwrite hash insert functions. * src/base/fthash.c (ft_hash_num_insert_no_overwrite, ft_hash_str_insert_no_overwrite): New functions. * include/freetype/internal/fthash.h: Updated.
820df387 2025-06-02 16:16:06 [base] Add iterators for `FT_Hash`. * src/base/fthash.c (ft_hash_num_iterator, ft_hash_str_iterator): New functions. * include/freetype/internal/fthash.h: Updated.
58be4879 2025-06-24 13:31:10 [truetype] Add comment to explain heuristic limit for twilight points.
43940e4c 2025-06-23 11:04:43 [truetype] Restore non-persistent CVT and storage. According to specifications, CVT and storage area may or may not be persistent after modifications by a glyf program. FreeType had always reset them, which was broken by the last commit. * src/truetype/ttinterp.c (TT_Load_Context): Set CVT and storage here. * src/truetype.ttobjs.c (tt_size_run_prep): Prioritize TT_Load_Context. (tt_size_init_bytecode): Allocate but not set CVT and storage area.
36ddd0cb 2025-06-22 12:13:48 [truetype] Deduplicate 'codeRangeTable'. * src/truetype/ttinterp.c (TT_Load_Context, TT_Save_Context): Do not copy 'codeRangeTable'. * src/truetype/ttobjs.h (TT_Size): Remove 'codeRangeTable'. (TT_CodeRange_Tag, TT_CodeRange, TT_DefArray): Moved to... * src/truetype/ttinterp.h: ... this header.1
c9cbfacb 2025-06-21 23:30:24 [truetype] Simplify bytecode allocations. To avoid repeated synchronization, some TT_Size allocations are moved TT_ExecContext for good. The memory blocks are also consolidated. * src/truetype/ttinterp.c (TT_{Load,Save,Done}_Context): Remove synchronization and stack management. * src/truetype/ttobjs.c (tt_size_{init,done}_bytecode): Manage allocations and assign them to the execution context. (tt_size_run_prep): Updated.
4c2437ef 2025-06-21 22:59:29 [truetype] Rework handling of rendering mode in bytecode. This replaces a large number of confusing boolean constructs that describe the target rendering mode in the execution context with the straight mode variable. It might fix some hidden bugs when FT_LOAD_TARGET_XXX were used as flags, which they are not. The condition that triggers the CV program re-execution is simplified. These events due the rendering mode change are rather rare and unexpected and, therefore, should not be over-analyzed. In v40, all mode changes now trigger the CV program. In v35, only switches to/from mono do. * src/truetype/ttinterp.h (TT_ExecContext): Replace 'grayscale', 'grayscale_cleartype', 'subpixel_hinting_lean', and 'vertical_lcd_lean' with the rendering 'mode'. * src/truetype/ttinterp.c (Ins_GETINFO): Updated. * src/truetype/ttgload.c (tt_loader_init): Replace 'prep' re-execution trigger and update 'backward_compatibility' condition. (tt_loader_set_pp): Updated.
0e38fa75 2025-06-20 22:22:05 * src/truetype/{ttinterp.c,ttobjs.c}: Minor.
19770604 2025-06-20 21:48:14 [truetype] Clean up bytecode execution triggers. This avoids executing the CV program twice and cleans up the use of 'fpgm' and 'prep' triggers * src/truetype/ttgload.c (tt_loader_init): Call 'tt_size_init_bytecode' and 'tt_size_run_prep' explicitly and avoid the call repetition. * src/truetype/ttobjs.c (tt_size_ready_bytecode): Removed as unused. (tt_size_init, tt_size_init_bytecode, tt_size_done_bytecode): Remove some 'fpgm' and 'prep' triggers and update. (tt_size_run_fpgm, tt_size_run_prep): Do not set the pedantic flag here. * src/truetype/ttobjs.h: Update signatures.
b647de09 2025-06-20 20:34:10 * src/truetype/ttgload.c (tt_loader_init, load_sbit_image): Clean up.
2041c65c 2025-06-20 20:20:54 [truetype] Simplify twilight zone management. * include/freetype/internal/tttypes.h (TT_GlyphZone): Remove 'memory'. * src/truetype/ttobjs.c (tt_glyphzone_done): Use 'memory' as argument. (tt_glyphzone_new, tt_glyphzone_done): Allocate/free as a single block. (tt_size_init_bytecode, tt_size_done_bytecode): Updated. * src/truetype/ttobjs.h (tt_glyphzone_done): Updated signature.
3ccc27dc 2025-06-19 08:06:53 [autofit] Really fix handling of `RTLD_DEFAULT`. This commit actually implements what commit 43ec023e1a7 describes. * src/autofit/ft-hb.c (FT_RTLD_FLAGS): New macro for `dlopen`; it uses `RTLD_GLOBAL` only if `RTLD_DEFAULT` is available.
738905b3 2025-06-14 20:18:48 [truetype] Revise twilight zone initiation. This assures that twilight zone is reset before each CV program execution, including after the rendering mode switch. Fixes #1344. * src/truetype/ttobjs.c (tt_size_ready_bytecode): Relocate the GS the twilight zone initiation from here... (tt_size_run_prep): ... to this function, sho that it is always done prior to the CV program execution. * src/truetype/ttobjs.c (TT_Run_Context): Set twilight zone here... (TT_Load_Context): ... rather than here, as it used to be.
04f68052 2025-06-12 21:02:57 * src/base/ftrfork.c (FT_Raccess_Get_DataOffsets): Remove check. The highest (sign) attribute bit is reserved and should be zero. It is harmless to omit this check however. Fixes #1342.
fc051dc0 2025-06-12 10:20:07 [autofit] Ignore virtual glyph indices from GSUB lookups. Reported as https://issues.chromium.org/issues/420401651 * src/autofit/afadjust.c (af_reverse_character_map_new): Implement it.
3c14c525 2025-06-11 15:32:11 [truetype] Clean up TT_GlyphZone. * include/freetype/internal/tttypes.h (TT_GlyphZone): Delete fields. * src/truetype/ttobjs.c (tt_glyphzone_new, tt_glyphzone_done, tt_size_init_bytecode): Updated.
1529bc6e 2025-06-11 07:41:01 [truetype] Use FT_ARRAY_ZERO. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Updated. * src/truetype/ttobjs.c (tt_check_trickyness_sfnt_ids, tt_size_ready_bytecode): Updated.
5ab9e5c5 2025-06-08 07:51:08 [truetype] Rearrange bytecode run. This is a minor change with large code rearrangements. * src/truetype/ttinterp.c (TT_RunIns): Just loop through instructions and move all setup to... (TT_Run_Context): ... here; relocated. (Compute_Round): Replaced by simple assignment, removed.
68c62e19 2025-06-07 22:15:18 [truetype] Relocate the interpreter pointer. This reduces dereferencing when calling the interpreter. * include/freetype/internal/tttypes.h (TT_Face): Move it from here... * src/truetype/ttinterp.h (TT_ExecContext): ... to here. * src/truetype/ttobjs.c (tt_size_init_bytecode): Move its initialization * src/truetype/ttinterp.c (TT_New_Context): ... to here. (TT_Run_Context): Updated.
ecfefd8c 2025-06-07 22:12:45 [truetype] Clean up the loader initiation. * include/freetype/internal/tttypes.h (TT_LoaderRec): Remove unused field. * src/truetype/ttgload.c (tt_loader_init): Refactor.
5631650b 2025-06-07 22:09:28 [truetype] Modify bytecode initiation. This reduces the number of function calls and data copying events. * src/truetype/ttinterp.c (TT_Goto_CodeRange): Merge into... (TT_Set_CodeRange): ... this function. (TT_Load_Context): Do not set up any zones, copy GS, or prepare the execution... (TT_Run_Context): ... do this here instead.. * src/truetype/ttinterp.c (TT_Set_CodeRange): Update signature. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Call TT_Run_Context. * src/truetype/ttgload.c (TT_Hint_Glyph, tt_loader_init): Updated.
70281e0f 2025-06-07 21:59:50 [truetype] Modify the graphics state management. Instead of restoring persistent GS variables, we only save modifications permitted by the CVT program. This reduces the context manipulations. * src/truetype/ttobjs.h (TT_GraphicsState): Reorder fields. * src/truetype/ttobjs.c (tt_size_run_fpgm, tt_size_run_prep): Do not alter the context. * src/truetype/ttgload.c (TT_Hint_Glyph): Do not reset GS. (tt_loader_init): Fix potential issue in 'instruct_control' handling. * src/truetype/ttinterp.c (TT_Run_Context): Fully reset GS. (TT_Load_Conext): Rearrange and remove the 'size' check, already performed in FT_Load_Glyph. (TT_Save_Context): Save only modifiable GS parts. (tt_default_graphics_state): Updated. * src/truetype/ttinterp.h (TT_Run_Context): Update signature.
a67b2bab 2025-06-10 12:11:41 [gxvar] Really fix setting of named-instance to Regular. This fixes an ommission in commit cf06661c51. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Initialize `error`.
d736e741 2025-06-10 05:09:58 Two more link fixes.
7f559fbe 2025-06-10 04:55:43 Update links. Found with `linkchecker --check-extern index.html` running locally in the 'freetype-web' repository.
cf06661c 2025-05-31 15:57:41 Fix setting of named-instance to Regular Fixes https://gitlab.freedesktop.org/freetype/freetype/-/issues/1341 And more elaborate avoidance of loading face->blend if all coords are zero.
320b72a2 2025-06-04 07:51:46 * src/type42/t42objs.c (T42_Size_Init): Fix uninitialized use. Found by Ozkan Sezer.
bd28cf7a 2025-06-04 08:55:04 [autofit] Fix `-Wunused-but-set-variable` warning in Windows builds. With this commit, the following warning gets removed. ``` In file included from src/autofit/autofit.c:21:0: src/autofit/ft-hb.c: In function 'ft_hb_funcs_init': src/autofit/ft-hb.c:75:35: warning: variable 'version_atleast' set but not used [-Wunused-but-set-variable] ft_hb_version_atleast_func_t version_atleast = NULL; ^~~~~~~~~~~~~~~ ``` * src/autofit/ft-hb.c (ft_hb_funcs_init): Move `NULL` check of `version_atleast` out of ifdefs.
5bc20817 2025-06-04 08:21:50 [build] Revise visibility attributes usage in autotools and CMake. * CMakeLists.txt: Set `C_VISIBILITY_PRESET` to hidden for non-Windows only. Windows handles exports with `DLL_EXPORT` defined, and old MinGW toolchains emit a lot of warnings about visibility attributes not being supported in this configuration. * build/unix/configure.raw: Revise visibility attributes checks by compiling a better test program with `-Werror` in `CFLAGS` so that warnings correctly indicate unsupported configurations.
81f839a7 2025-06-03 23:15:32 * CMakeLists.txt: Add support for `FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC`. This commit introduces a new CMake option `FT_DYNAMIC_HARFBUZZ`.
1518bc83 2025-06-03 12:38:38 * src/autofit/ft-hb.c: Fix definition of `_GNU_SOURCE`. Commit 43ec023e1a730f defined the macro too late.
2adb5361 2025-06-03 10:35:16 Replace 'www.freetype.org' with 'freetype.org'.
f0679e75 2025-05-29 07:20:04 * builds/unix/configure.raw: Fix HarfBuzz library detection for MinGW. Set `have_harfbuzz*` variables explicitly to dynamic for MinGW, since Windows uses its own `LoadLibrary` call. This fixes a MinGW configuration error: ``` checking for HARFBUZZ... no checking for dlopen in -lc... no checking for dlopen in -ldl... no configure: error: harfbuzz support requested but library not found ```
3eb5188e 2025-05-29 04:00:30 * builds/unix/configure.raw: Improve check for `dlopen`. Look for `dlopen` first in 'libc', then in 'libdl'.
43ec023e 2025-06-03 07:56:13 * src/autofit/ft-hb.c: Fix usage of `RTLD_DEFAULT`. Using `RTLD_DEFAULT` we see whether the process already has HarfBuzz linked in, and reuse it. If this symbol is not defined it is tempting to use `RTLD_GLOBAL` instead, which would make the library available to the whole process. However, without `RTLD_DEFAULT`, we would risk loading a second HarfBuzz library, and if the linker mixes them up, probably giving symbols from the new library to other clients, we might get into trouble. For this reason, we do not pass `RTLD_GLOBAL` to `dlopen`; the default is `RTLD_LOCAL`, and the rest of the process won't see the loaded HarfBuzz and hopefully all be happy.
5a07f41d 2025-05-28 09:52:44 [sfnt] `FT_Load_Sfnt_Table` can now also load a font's table directory. Closes issue #1263. * src/sfnt/ttload.c (tt_face_load_any): Implement it.
3aeabbf8 2025-05-28 07:09:40 [gzip] Update sources to zlib 1.13.1. Fixes issue #1294.
202297eb 2025-05-25 12:15:11 * src/base/ftobjs.c (FT_Load_Glyph): Loosen auto-hinting constraints. Fixes issue #1320.
d629c8bf 2025-05-27 08:41:13 Update `CHANGES` file.
f7fba637 2025-05-24 02:47:23 [gxvar] Optimize out more bounds checking. Big win, ~20% in measured mega-var font, HarfBuzz's `benchmark-font` 'glyph_h_advances' benchmark. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Implement it in loops.
c0625140 2025-05-22 22:21:18 * src/truetype/ttgload.c (load_truetype_glyph): Use `IS_DEFAULT_INSTANCE`.
f64c7db2 2025-05-27 06:59:16 [gxvar] Set `doblend` to `FALSE` if at default location. * src/truetype/ttgxvar.c (tt_set_mm_blend, TT_Get_Var_Design): Do it.
fa412cf5 2025-05-23 15:41:26 [mm/gxvar] Always detect default instance and use optimized codepath. Even if it was explicitly set by either design or normalized APIs. Also update documentation. * src/truetype/ttgxvar.c (TT_Set_MM_Blend, TT_Set_Var_Design): Use value -2 of `error` to indicate that we have a non-default instance. (TT_Set_Named_Instance): Updated. * src/base/ftmm.c (FT_Set_Var_Design_Coordinates, FT_Set_Var_Blend_Coordinates): Updated.
deef6d2a 2025-05-26 23:16:30 Typo.
31d05d08 2025-05-26 23:13:52 * src/truetype/ttinterp.c (TT_Load_Context): Clean up.
c6abd1e4 2025-05-26 20:24:55 [autofit] Fix integer overflow. Reported as https://issues.oss-fuzz.com/issues/420401635 * src/autofit/aflatin.c (af_latin_stretch_top_tilde, af_latin_stretch_bottom_tilde): Use `SUB_LONG`.
e07e56c7 2025-05-26 17:20:12 [gxvar] Speed up handling of deltas in `ItemVariationStore`. (3/3) * src/base/ftcalc.c (FT_MulAddFix): Removed, no longer needed. * include/freetype/internal/ftcalc.h: Updated.
86ab14e0 2025-05-26 08:20:21 [gxvar] Speed up handling of deltas in `ItemVariationStore`. (2/3) Do all math in fixed integer and do a single divide at the end. Also don't use an array to read deltas; just read them as we go, and skip (branch-free) when scalar is 0. 30% speedup in measured mega-var font, HarfBuzz's `benchmark-font` 'glyph_h_advances' benchmark.
fe6854ba 2025-05-26 08:18:00 [gxvar] Speed up handling of deltas in `ItemVariationStore`. (1/3) * src/truetype/ttgxvar.c (ft_mul_add_delta_scalar, ft_round_and_shift16): New functions, reusing code from `ftcalc.c`.
8eae0399 2025-05-26 08:16:53 Lift `FT_Int64` type to global (internal) FreeType use. * src/base/ftcalc.c (FT_Int64) [!FT_INT64]: Move declaration to... * include/freetype/config/integer-types.h: ... this file. (FT_UInt64) [!FT_INT64]: New structure. (FT_INT64_ZERO): New macro.
b8444f2f 2025-05-26 07:47:10 [gxvar] Move scalar computation into its own function. * src/truetype/ttgxvar.c (tt_var_get_item_delta): Split off affected code into... (tt_calculate_scalar): ...this new function.
57a87304 2025-05-26 06:28:09 [autofit] Make the accent database work for more glyphs (again). See the added comment for an explanation. This partially undoes commit f68733d4a8. * src/autofit/afadjust.c (af_reverse_character_map_new): Always loop over all elements of the adjustment database. (in_range): Removed, no longer needed.
87501e2e 2025-05-25 22:21:21 [trueetype] Remove useless assignments. * src/truetype/ttobjs.c (tt_size_run_fpgm): Remove assignment that is ignored and overridden later in 'Compute_Funcs'. * src/truetype/ttinterp.c (TT_RunIns): Ditto. (Ins_MIAP): Formatting.
47e35a58 2025-05-16 08:08:53 [autofit] Simplify return value of `af_adjustment_database_lookup`. * src/autofit/adfadjust.h (af_adjustment_database_lookup): Return integer. (AF_AdjustmentDatabaseEntry): Move structure to... * src/autofit/afadjust.c: ...this file. (af_adjustment_database_lookup, af_reverse_character_map_new): Updated. * src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Updated.
94e93c7c 2025-05-16 07:46:43 [autofit] Remove no longer used functions and structures. This is the clean-up from the previous commit. * src/autofit/afadjust.c (af_reverse_character_map_entry_compare, af_reverse_character_map_lookup, af_reverse_character_map_expand): Removed. * src/autofit/afadjust.h: Updated. * src/autofit/aftypes.h (AF_ReverseMapEntry, AF_ReverseCharacterMap): Removed.
2492b547 2025-05-16 07:39:06 [autofit] Use a hash for handling vertical accent adjustments. This greatly simplifies the code. * src/autofit/afadjust.c (af_reverse_character_map_new): Implement it. (af_reverse_character_map_done): Updated. * src/autofit/afadjust.h: Updated. * src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Updated. * src/autofit/aftypes.h: Include `fthash.h`. (AF_StyleMetrics): Change type of `reverse_charmap` to `FT_Hash`.
70154166 2025-05-16 07:20:57 * src/autofit/aflatin.c (af_latin_hints_apply): Improve code legibility.
9dc66cbd 2025-05-20 05:36:49 [autofit] Use `FT_LONG_MIN` and `FT_LONG_MAX` for `FT_Pos` variables. * src/autofit/aflatin.c (af_latin_metrics_init_blues, af_compute_vertical_extrema, af_find_highest_contour, af_find_second_highest_contour, af_find_lowest_contour, af_find_second_lowest_contour, af_check_contour_horizontal_overlap): Updated.
d6e087d1 2025-05-19 16:13:06 [autofit] Fix uninitialized variables. * src/autofit/aflatin.c (af_latin_stretch_top_tilde, af_latin_stretch_bottom_tilde): Initialize `min_measurement`.
ed0ab879 2025-05-21 07:56:08 [autofit] Minor code cleanup. * src/autofit/afadjust.c (af_reverse_character_map_new): Rename `result_set` to `glyph_alternates` and move its clearing to... (af_get_glyph_alternates): ...this function. (af_get_glyph_alternates_helper): s/result/helper_result/.
a312820c 2025-05-21 07:17:11 [autofit] Speed up construction of reverse character map. (4/4) * src/autofit/afadjust.c (af_get_glyph_alternates): Move creation and deletion of the `helper_result` set to... (af_reverse_character_map_new): ...this function. Gain for `arial.ttf` version 7.00: approx. 1%.
c0e7df61 2025-05-20 18:59:00 [autofit] Speed up construction of reverse character map. (3/4) * src/autofit/afadjust.c (af_reverse_character_map_new): Fold two loops into one. Gain for `arial.ttf` version 7.00: approx. 1%.
3dd7fc42 2025-05-19 05:37:23 [autofit] Speed up construction of reverse character map. (2/4) This commit, together with the previous one, makes the startup of the auto-hinter much faster. Note, though, that the startup time for handling the diacritic database is still rather large. For example, loading `arial.ttf` version 7.00 followed by auto-hinting a first Latin glyph is still approx. three times slower than before the introduction of the database (this is because function `hb_ot_layout_lookup_get_glyph_alternates` is called very often). * src/autofit/afshaper.c (scripts): Rename this array to... (af_hb_scripts): ...this and export it. (af_shaper_get_coverage_hb): Updated. * src/autofit/afshaper.h: Updated. * src/autofit/afadjust.c (af_reverse_character_map_new): Pass the current script to `hb_ot_layout_collect_lookups` to make HarfBuzz check less lookups while searching for glyph alternates.
f68733d4 2025-05-19 05:23:29 [autofit] Speed up construction of reverse character map. (1/4) Build reverse cmap for characters of the current script style only. * src/autofit/afadjust.c (in_range): New function. (af_reverse_character_map_new): Pass `AF_StyleMetrics` instead of `AF_FaceGlobals` so that we can access the current script style. Use `in_range` to limit tested code points. * src/autofit/afadjust.h: Updated. * src/autofit/aflatin.c (af_latin_metrics_init): Updated.
4514f051 2025-05-18 08:08:25 [autofit] Avoid variable shadowing. * src/autofit/afadjust.c (af_reverse_character_map_new): Do it.
fd33c037 2025-05-18 08:00:54 [autofit] Minor speedup of reverse charmap creation. * src/autofit/afglobal.h (AF_HAS_CMAP_ENTRY): New flag. (AF_STYLE_MASK): Update value. * src/autofit/afglobal.c (af_face_globals_compute_style_coverage): Set `AF_HAS_CMAP_ENTRY`. * src/autofit/afadjust.c (af_reverse_character_map_new): For the creation of the reverse map, change code to handle glyphs with cmap entries before glyphs without cmap entries. Doing so avoids some code redundancy and reduces the number of hash lookups.
541ad3d3 2025-05-18 19:09:19 [autofit] Whitespace.
72e0c071 2025-05-16 14:35:51 [autofit] Use `FT_Offset`. * src/autofit/afadjust.c (af_adjustment_database_lookup, af_reverse_character_map_new): Do it.
5987a9f5 2025-05-22 02:51:36 [ttmtx] Fix check for being non-default variation position. If user explicitly sets variations to `NULL` after it being set to something else, `face->blend` will still be non-`NULL`. The intention here however is correctly captured by `FT_IS_VARIATION`. * src/sfnt/ttmtx.c (tt_face_get_metrics): Use `FT_IS_VARIATION`.
75b84313 2025-05-23 08:03:59 [gxvar] Optimize loading of 'gvar' table. * src/truetype/ttgxvar.c (tt_var_load_item_variation_store, tt_var_load_delta_set_index_mapping, ft_var_load_gvar): Use frames to reduce bounds checking. (TT_Vary_Apply_Glyph_Deltas): Better macro usage.
42a649be 2025-05-21 14:35:40 [mm] Short-circuit setting face to default instance if already is so. I found that in hb-ft I need to sometime reset the face to the default instance. However, calling `FT_Set_Var_Design_Coordinates` with no coords was still slowing down at least the glyph-advance code by processing variations. Perhaps there's a better fix, but this handles the easy cases. * src/base/ftmm.c (FT_Set_Var_Design_Coordinates): Implement it.
702e4a1d 2025-05-21 14:55:25 * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Fix allocation. Bug was introduced in commit 582de1a4b6f.
013adc82 2025-05-21 17:28:52 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Remove redundant test. This was erroneously added in commit e6e9110a8.
11fa9da7 2025-05-19 21:07:10 [sdf] Skip neighbor comparison for pixels near edges. If the distance of the current pixel to the edge is less than or equal to 0.5, skip further neighbor comparisons to avoid unnecessary calculations. When the `USE_SQUARED_DISTANCES` macro is defined, compare to 0.25 instead. * src/sdf/ftbsdf.c (compare_neighbor): Add early return for pixels close to edges to avoid unnecessary neighbor checks.
d7b6e947 2025-05-21 01:34:08 [gxvar] Cache shared-tuple scalar values. GoogleSansFlex HB benchmark-font draw results: Before: 2.13ms After: 1.65ms Speedup: 22% * src/truetype/ttgxvar.h (GX_BlendRec): Add `tuplescalars` field. * src/truetype/ttgxvar.c (ft_var_load_gvar): Allocate `tuplescalars` array. (tt_set_mm_blend): Set its values. (TT_Vary_Apply_Glyph_Deltas): Use it. (tt_done_blend): Deallocate it.
582de1a4 2025-05-20 23:09:16 [gxvar] Reduce number of mallocs. 8% speed up in drawing GoogleSansFlex variable in HB benchmark-font. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Use an allocation pool instead of individual allocations.
fd92af79 2025-05-20 16:55:38 [gxvar] Another optimization in computing scalar. Another ~6% speedup in GoogleSansFlex var drawing. * src/truetype/ttgxvar.c (ft_var_apply_tuple): Test `ncv` for being zero.
e7cc14ba 2025-05-21 01:33:22 [gxvar] Remove stale comment. The code *does* check against start/end!
e6e9110a 2025-05-20 16:51:25 * src/truetype/ttgxvar.c (ft_var_apply_tuple): Micro-optimize.
14399c73 2025-05-20 16:17:00 [gxvar] Inline two USHORT reads. Speeds up GoogleSansFlex variable glyph drawing by ~13%. Before: 2.95ms After: 2.57ms * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Do it.
0a574d50 2025-05-20 15:56:05 [gxvar] Micro-optimize loop end condition. * src/truetype/ttgxvar.c (TT_Vary_Apply_Glyph_Deltas): Do it.
dc8efeff 2025-05-20 19:33:34 [truetype] Don't process `mvar` metrics if default instance. GoogleSansFlex default-instance HarfBuzz benchmark-font draw: Before: 0.610ms After: 0.435ms Speedup: 28% * src/truetype/ttobjs.c (tt_face_init) [TT_CONFIG_OPTION_GX_VAR_SUPPORT]: Check `instance_index`.
22511643 2025-05-20 22:18:19 * src/truetype/ttinterp.c (Ins_MIRP,DELTAP,DELTAC): Minor.
8b4dcd93 2025-05-20 17:27:43 [truetype] Update bytecode error handling. * src/truetype/ttinterp.c (Ins_SHP,SHPIX,ALIGNRP): Return appropriate error in case of stack underflow. (Ins_IP): Ditto and remove redundant check.
b87f48a7 2025-05-19 15:48:24 * src/aflatin.c (af_latin_hint_edges): Refine fix for serif handling. Commit 11432424 (from 2025-May-12) was too aggressive; it is now restricted to edges that are not too far away.
46edeb32 2025-05-13 23:36:00 * src/afadjust.c (adjustment_database): Make it complete up to U+FFFF. Also fix two entries. This is for Unicode 17.0.
d3fbbed9 2025-05-13 14:44:20 [autofit] Fix vertical adjustment of (mainly) double diacritics. The series of commits that introduced this adjustment support had some flaws. - If there were two diacritics on top of a base glyph, and the upper diacritic was a tilde, the vertical centering correction was incorrectly applied to the lower, non-tilde glyph instead of the tilde. - The maximum value allowed to shift a glyph was too strict (and also not handling rounding issues), causing some diacritics and combinations of diacritics to be not shifted at all. * src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Correctly handle vertical centering correction.
4c9f14f4 2025-05-12 18:04:14 [autofit] Code hygiene. * src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Use more flag variables and improve trace messages.
11432424 2025-05-12 08:52:19 * src/autofit/aflatin.c (af_latin_hint_edges): Fix handling of serifs. This has been discovered while inspecting the auto-hinting results of character 'Ễ' in font `arial.ttf` (version 7.00) at 13ppem.
87f0b694 2025-05-12 14:02:31 [autofit] Minor. * src/autofit/aflatin.c (af_latin_hint_edges): Rename `has_serifs` to `has_non_stem_edges` and make it of type `FT_Bool`.
fd66a29d 2025-05-12 08:28:55 [autofit] New algorithm for preventing hinting of tilde glyphs. The old algorithm removed segments from edges to make the auto-hinter ignore a tilde. However, the implementation had two flaws. - Edge array elements were moved around without reordering them afterwards. - The linking between edges and segments wasn't correctly updated for moved edges, which could cause endless loops. Correcting both problems are non-trivial; additionally, a fix would make the auto-hinter slower. For these reasons, a new, simpler approach is taken: A new flag allows points to be tagged as being ignored, and if such a point is enountered, it doesn't get added to a segment. Fixes issue #1333. * src/autofit/afhints.h (AF_FLAG_IGNORE): New macro. * src/autofit/aflatin.c (af_latin_hints_compute_segments, af_touch_contour): Use it. (af_remove_segments_containing_point, af_remove_top_points_from_edges, af_remove_bottom_points_from_edges): Removed. (af_latin_stretch_top_tilde): Call `af_touch_top_contours` and `af_touch_bottom_contours` unconditionally. (af_latin_hints_apply): Updated.
89e3e98e 2025-05-16 13:19:26 * src/truetype/ttinterp.c (TT_DotFix14): Silence UBSAN.
8082aba5 2025-05-15 22:27:52 * src/truetype/ttinterp.c (Ins_DELTAP): Flip if-else.
7172bd11 2025-05-14 23:17:23 [truetype] Optimize DELTAP and DELTAC. * src/truetype/ttinterp.c (Ins_DELTAP,DELTAC): Perform PPEM range- checking and manipulations outside the loop.
8a152c82 2025-05-14 14:56:21 * src/truetype/ttinterp.c (Compute_Funcs): Replace shifts.
82891652 2025-05-14 12:45:53 [truetype] Tighten code overflow checks. Fixes #1336. * src/truetype/ttinterp.c (Ins_NPUSHB,NPUSHW,PUSHB, PUSHW): Tighten conditions.
0fcd10ee 2025-02-18 13:50:36 [type1] Fix memory leak on CharString error. In the event that a CharString retrieved via the incremental interface caused an error, the memory for that CharString was not being freed. * src/type1/t1gload.c (T1_Parse_Glyph_And_Get_Char_String): Free charstring.
15b7e8c3 2025-05-14 10:20:04 Whitespace, formatting, minor spelling fix.
8d18acba 2025-05-14 09:16:03 Adminstrativa.