kc3-lang/freetype

Branch :


Log

Author Commit Date CI Message
97bb53ee 2025-04-28 07:24:41 [autofit] Enable dynamic loading of HarfBuzz. (2/2) Handle the case where loading HarfBuzz dynamically fails. * src/autofit/ft-hb.c, src/autofit/ft-hb.h (ft_hb_enabled): New function. * src/autofit/afglobal.c (af_face_globals_new, af_face_globals_free): Guard HarfBuzz functions with `ft_hb_enabled`. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_check_digits): Simplify setup of `shaper_buf`. Guard calls of `af_shaper_buf_create` with `ft_hb_enabled`. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Dito. * src/autofit/afshaper.c: Guard all HarfBuzz function calls with `ft_hb_enabled`.
7651fe00 2025-04-27 18:44:49 [autofit] Enable dynamic loading of HarfBuzz. (1/2) This commit activates the mini-HarfBuzz header files and provides the necessary infrastructure for dynamically loading HarfBuzz if `FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC` is defined (this macro gets set up in a follow-up commit). * src/autofit/ft-hb.c: New file, providing `ft_hb_funcs_init` and `ft_hb_funcs_done` for loading HarfBuzz dynamically. The name of the library is hold in the macro `FT_LIBHARFBUZZ`, which can be overridden. * src/autofit/ft-hb.h: Don't include `hb.h` but `ft-hb-types.h`. (hb): Modified to handle both standard linking and dynamically loading of HarfBuzz. (HB_EXTERN): New macro to load `ft-hb-decls.h`. * src/autofit/afadjust.c [FT_CONFIG_OPTION_USE_HARFBUZZ]: For the sake of dynamically loading the HarfBuzz library, replace the compile-time macro `HB_VERSION_ATLEAST` with a call to the run-time function `hb_version_atleast` where necessary – a follow-up commit will set the minimum version of HarfBuzz to 2.6.8, which provides all necessary functions needed by FreeType. * src/autofit/afmodule.h: Include `ft-hb.h`. (AF_ModuleRec) [FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC]: Add `hb_funcs` structure to hold pointers to the dynamically loaded HarfBuzz functions. * src/autofit/afmodule.c (af_autofitter_init, af_autofitter_done) [FT_CONFIG_OPTION_USE_HARFBUZZ_DYNAMIC]: Call `ft_hb_funcs_init` and `ft_hb_funcs_done`. * src/autofit/afshaper.h: Updated. * src/autofit/autofit.c: Include `ft-hb.c`. * src/autofit/rules.mk (AUTOF_DRV_SRC, AUTOF_DRV_H): Updated.
9242c88f 2025-04-26 21:46:51 [autofit] Some preparations for loading HarfBuzz dynamically. (3/4) * src/autofit/afshaper.c: Move around code so that the non-HarfBuzz code is present even if `FT_CONFIG_OPTION_USE_HARFBUZZ` is not defined. This is a preliminary step to allow deactivation of HarfBuzz at run-time.
e9d03072 2025-04-26 19:05:31 [autofit] Some preparations for loading HarfBuzz dynamically. (2/4) Pass `AF_FaceGlobals` to many functions, or provide it, tagged with `FT_UNUSED`. We need this later on to access a dynamically linked HarfBuzz library. * src/autofit/ft-hb-ft.h (ft_hb_ft_font_create): Use `globals` argument. Drop unused `destroy` argument. * src/autofit/ft-hb-ft.c (ft_hb_ft_face_create, ft_hb_ft_font_create): Use `globals` argument. Drop unused `destroy` argument. (ft_hb_ft_face_create, ft_hb_ft_reference_table): Cast `user_data` to `AF_FaceGlobals`. * src/autofit/afadjust.c (af_get_glyph_alternates_helper, af_get_glyph_alternates): Add `globals` argument. Update callers. * src/autofit/afshaper.c, src/autofit/afshaper.h (af_shaper_buf_create, af_shaper_buf_destroy): Use `globals` argument. * src/autofit/afglobal.c (af_face_globals_new): Updated. * src/autofit/afcjk.c (af_cjk_metrics_init_widths, af_cjk_metrics_init_blues, af_cjk_metrics_check_digits): Updated. * src/autofit/aflatin.c (af_latin_metrics_init_widths, af_latin_metrics_init_blues, af_latin_metrics_check_digits): Updated.
b512ce3e 2025-04-26 22:31:22 [autofit] Some preparations for loading HarfBuzz dynamically. (4/4) Add 'mini' HarfBuzz declarations to make FreeType independent on HarfBuzz header files. The files get activated in a follow-up commit. * src/autofit/ft-hb-decls.h, src/autofit/ft-hb-types.h: New files, holding verbatim (or slightly massaged) entries from public HarfBuzz header files. * src/autofit/hb-script: New file. A verbatim copy of a public HarfBuzz header file.
8b443d70 2025-04-26 12:22:23 [autofit] Some preparations for loading HarfBuzz dynamically. (1/4) * src/autofit/ft-hb.h: New file, defining the `hb` macro. Later on, we provide a different definition of this macro depending on a yet-to-come configuration option to support dynamic loading of HarfBuzz functions. * src/autofit/afadjust.c, src/autofit/afglobal.c, src/autofit/afshaper.c, stc/ft-hb-ft.c: Use it.
3eb4eade 2025-04-12 00:44:46 [autofit] Rename 'ft-hb' to 'ft-hb-ft'. Since it's a (shrinked) copy of 'hb-ft'. * src/autofit/afglobal.c (af_face_globals_new), src/autofit/afshaper.h, src/autofit/autofit.c: Updated. * src/autofit/ft-hb.c, src/autofit/ft-hb.h: Renamed to... * src/autofit/ft-hb-ft.c, src/autofit/ft-hb-ft.h: ...this; updated. * src/autofit/rules.mk (AUTOF_DRV_SRC): Updated.
f35bb759 2025-04-29 21:14:21 * src/autofit/aflatin.c (af_latin_stretch_top_tilde): Don't divide by zero. Reported as https://issues.oss-fuzz.com/issues/414320186
619305c4 2025-04-23 17:35:21 [autofit] Routines for finding the second highest/lowest contour. * src/autofit/aflatin.c (af_find_second_highest_contour, af_find_second_lowest_contour): New functions.
7a2646e6 2025-04-23 06:47:33 [autofit] Use more functions to reduce code. * src/autofit/aflatin.c (af_find_highest_contour, af_find_lowest_contour): Updated. (af_glyph_hints_apply_vertical_separation_adjustments): Use `af_compute_vertical_extrema`, `af_find_highest_contour`, and `af_find_lowest_contour`. (af_latin_hints_apply): Use `af_compute_vertical_extrema`,
2d1abd3b 2025-04-25 18:05:41 [autofit] Extend adjustment database with characters up to U+1FFF. This adds many pre-combined Latin glyphs, Cyrillic, Greek, and some characters from other scripts (or rather, Unicode blocks). Fixes issues #112 and #471.
387c2d80 2025-04-23 06:44:10 * src/autofit/aflatin.c (af_compute_vertical_extrema): New function. To be used in a follow-up commit.
357032d1 2025-04-22 19:48:16 * src/autofit/aflatin.c: Some variable renaming.
d38a13dd 2025-04-25 17:58:56 [autofit] Support diacritics with special vertical minima. This code catches situations like U+1F90 ('ᾐ'), where some fonts have exactly the same vertical minimum for the lower accent as for the base glyph. * src/autofit/aflatin.c (af_find_highest_contour, af_find_lowest_contour): Handle it.
25369eca 2025-04-22 18:24:25 [autofit] Avoid recomputation of highest and lowest contour. * src/autofit/aflatin.c (af_latin_hints_apply): Compute highest and lowest contour in this function. (af_latin_remove_top_tilde_points_from_edges, af_latin_remove_bottom_tilde_points_from_edges, af_latin_stretch_top_tilde, af_latin_stretch_bottom_tilde, af_latin_align_top_tilde, af_latin_align_bottom_tilde): Updated.
64da9d47 2025-04-22 18:10:26 * src/aflatin.c (af_latin_trace_height): Remove. Update caller. The algorithm works fine.
9eb6548d 2025-04-25 12:28:18 [autofit] More tilde stretch support. (3/3) The auto-hinter now supports up to four tilde glyphs (two above and two below a base character). Note that diacritics above (or below) a tilde are now also ignored by the auto-hinter. * src/autofit/afadjust.h (AF_ADJUST_TILDE_TOP2, AF_ADJUST_TILDE_BOTTOM2): New macros. * src/autofit/afadjust.c (af_reverse_character_map_new): Updated. * src/autofit/aflatin.c (af_remove_top_points_from_edges, af_remove_bottom_points_from_edges): Make functions also handle all contours higher (or lower) of the given one in the argument. (af_touch_top_contours, af_touch_bottom_contours): New functions. (af_latin_stretch_top_tilde, af_latin_stretch_bottom_tilde): Use it to also handle all contours higher (or lower) than the tilde contour. * (af_latin_hints_apply): Handle more tilde glyphs.
ba94c954 2025-04-22 12:43:55 [autofit] Support vertical stretching of tilde below base glyph. (2/2) * src/autofit/afadjust.h (AF_ADJUST_TILDE_BOTTOM): New macro. * src/autofit/afadjust.c (af_reverse_character_map_new): Updated. * src/autofit/aflatin.c (af_find_lowest_contour, af_latin_remove_bottom_tilde_points_from_edges, af_latin_stretch_bottom_tilde, af_latin_align_bottom_tilde): New functions in analogy to the top tilde versions. (af_glyph_hints_apply_vertical_separation_adjustments): Add support in analogy to the top tilde code. (af_latin_hints_apply): Updated.
ec28f488 2025-04-21 13:38:17 [autofit] Support vertical stretching of tilde below base glyph. (1/2) * src/autofit/aflatin.c (af_latin_remove_tilde_points_from_edges, af_latin_stretch_tilde, af_latin_align_tilde): Rename to... (af_latin_remove_top_tilde_points_from_edges, af_latin_stretch_top_tilde, af_latin_align_top_tilde): ...this. Update all callers. (af_latin_hints_apply): Rename `is_tilde` to `is_top_tilde`.
c6b45a76 2025-04-25 12:26:45 [autofit] More tilde stretch support. (2/3) * src/autofit/aflatin.c (af_latin_stretch_top_tilde, af_latin_stretch_bottom_tilde): Return vertical size difference between stretched and original contour. (af_latin_align_top_tilde, af_latin_align_bottom_tilde): Return applied delta. (af_latin_hints_apply): Updated; the return values are not used yet.
8d1f5156 2025-04-21 09:55:44 [autofit] Allow vertical adjustment at the top and bottom simultaneously. This will be used to hint characters like U+1FB7 ('ᾷ'). * src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Implement it.
5e0b0871 2025-04-21 07:52:42 * src/autofit/afadjust.c (af_reverse_character_map_new): Update tracing.
cbce230d 2025-04-24 08:13:54 [autofit] More tilde stretch support. (1/3) Move some existing code that we soon need elsewhere into separate functions. * src/autofit/aflatin.c (af_move_contours_up, af_move_contours, down): New functions. (af_glyph_hints_apply_vertical_separation_adjustments): Use them. (af_touch_contour): New function. (af_latin_stretch_top_tilde, af_latin_stretch_bottom_tilde): Use it. (af_latin_remove_top_tilde_points_from_edges, af_latin_remove_bottom_tilde_points_from_edges): Renamed to... (af_remove_top_points_from_edges, af_remove_bottom_points_from_edges): ...this. Update callers.
162a93b1 2025-04-21 07:00:07 [autofit] Indicate tilde handling with a flag macro, too. * src/autofit/afadjust.h (AF_ADJUST_TILDE_TOP): New macro. (AF_AdjustmentDatabaseEntry): Remove field `apply_tilde`. * src/autofit/afadjust.c (adjustment_database, af_reverse_character_map_new), src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments, af_latin_hints_apply): Updated.
582cc21b 2025-04-21 06:37:45 [aflatin] Convert adjustment database enum to macros. We are going to add more values, and we want to use combinations of them. * src/autofit/afadjust.h (AF_VerticalSeparationAdjustmentType): Replace with... (AF_ADJUST_UP, AF_ADJUST_DOWN, AF_ADJUST_NONE): ... new macros. (AF_AdjustmentDatabaseEntry): Rename field `vertical_separation_adjustment_type` to `flags`. * src/autofit/afadjust.c (af_reverse_character_map_new), src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Updated.
7722a5b2 2025-04-23 19:29:59 [autofit] Support two below/above accents for vertical adjustment. (2/2) * src/autofit/afadjust.h (AF_ADJUST_UP2, AF_ADJUST_DOWN2): New macros. * src/autofit/afadjust.c (af_reverse_character_map_new): Updated. * src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Implement it.
566e30c1 2025-04-21 05:47:41 [autofit] Shorten adjustment enum names. * src/autofit/afadjust.h (AF_VERTICAL_ADJUSTMENT_TOP_CONTOUR_UP, AF_VERTICAL_ADJUSTMENT_BOTTOM_CONTOUR_DOWN, AF_VERTICAL_ADJUSTMENT_NONE): Renamed to... (AF_ADJUST_UP, AF_ADJUST_DOWN, AF_ADJUST_NONE): ...this. * src/autofit/afadjust.c (adjustment_database, af_reverse_character_map_expand), src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Updated.
40d4b579 2025-04-23 19:13:45 [autofit] Support two below/above accents for vertical adjustment. (1/2) Some variable renamings.
1da283b8 2025-04-26 09:54:16 * src/autofit/afranges.c: Updated to Unicode 17.0. But no support for new scripts (volunteers welcomed).
3ce99005 2025-04-26 09:42:44 * src/autofit/afranges.c: Updated to Unicode 16.0. But no support for new scripts (volunteers welcomed).
08a13fe2 2025-04-26 08:31:17 * src/autofit/afranges.c: Updated to Unicode 15.1. But no support for new scripts (volunteers welcomed).
3019fa6c 2025-04-26 08:09:15 * src/autofit/afranges.c: Updated to Unicode 14.0. But no support for new scripts (volunteers welcomed).
373aa744 2025-04-26 07:39:27 * src/autofit/afranges.c: Updated to Unicode 13.0. But no support for new scripts (volunteers welcomed).
12a9f65d 2025-04-26 07:26:34 * src/autofit/afranges.c: Updated to Unicode 12.0. But no support for new scripts (volunteers welcomed).
3467c217 2025-04-25 08:09:48 * include/freetype/internal/ftcalc.h (FT_MulFix_64): Silence UBSAN.
1019b1c2 2025-04-22 06:20:22 * src/autofit/afadjust.c (af_get_glyph_alternates): Fix endless loop.
b5b3fd57 2025-04-20 10:48:54 * src/afadjust.c: Fix test for newer HarfBuzz version (second try).
05f3cf13 2025-04-20 10:29:32 * src/afadjust.c: Fix test for newer HarfBuzz version.
a64b49cc 2025-04-20 08:00:26 [autofit] Request at least HarfBuzz 7.2.0 for diacritic support. (3/3) This version (from April 2023) added 'SingleSubst' support to `hb_ot_layout_lookup_get_glyph_alternates`.
de98b1ba 2025-04-20 07:32:05 [autofit] Speed up creation of the adjustment database's reverse map. (2/3) Remove the old code and activate the new one.
573201be 2025-04-20 06:27:52 [autofit] Speed up creation of the adjustment database's reverse map. (1/3) As it turns out, the original implementation using `hb_ot_shape_glyphs_closure` is extremely slow if a font has a rich set of OpenType features. For example, this function was called 66954 times while loading font `arial.ttf` version 7.00, increasing FreeType's startup time by a factor of 10, which is unacceptable. The new algorithm uses a completely different, more low-level approach, no longer working with OpenType features but with OpenType lookups. It relies on function `hb_ot_layout_lookup_get_glyph_alternates`, also replacing recursion with a simple loop. In total, this brings the additional startup time back to an acceptable range of a few percent. A side effect of the new approach is that it catches more alternate forms: the old code didn't properly handle script-specific features. To make the change more readable, this commit only adds new code.
9536e472 2025-04-18 06:31:51 * src/autofit/afadjust.c (af_reverse_character_map_new): Check `map` limit. Reported as https://issues.chromium.org/issues/410925355
6ed79d5b 2025-04-17 22:46:06 * include/freetype/internal/ftcalc.h: Fix fringe compilation.
4fad257a 2025-04-17 22:32:21 * src/base/ftcalc.c (ft_corner_orientation) [!FT_INT32]: Fix up.
d6c29228 2025-04-17 19:36:51 [autofit] Don't access uninitialized memory. Reported as https://bugs.ghostscript.com/show_bug.cgi?id=708295 * src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Initialize all array elements of `contour_y_minima` and `contour_y_maxima`.
66e0d25e 2025-04-17 15:37:27 * src/truetype/ttinterp.c (TT_MulFix14,TT_DotFix14)[!FT_INT64]: Sync.
9eecaa07 2025-04-17 12:44:37 * src/truetype/ttinterp.c (TT_DotFix14): Silence UBSAN.
0a650e8c 2025-04-16 22:54:54 * src/base/ftcalc.c: Miscellaneous cleanups.
cc849c32 2025-04-16 19:39:02 [autofit] Avoid crash. Reported as https://issues.oss-fuzz.com/issues/410811029 * src/autofit/aflatin.c (af_remove_segments_containing_point): Check `edge->last`.
ccabe7ac 2025-04-15 18:49:36 [base, truetype] Silence UBSAN (cont'd). * src/truetype/ttinterp.c (TT_MulFix14, TT_DotFix14): Use MUL_INT64. * include/freetype/internal/ftcalc.c (FT_MulFix): Ditto.
dc55f4e6 2025-04-14 21:03:08 [autofit] Avoid unnecessary recomputation of HarfBuzz data. Call the functions once per font instead of once per glyph. * src/autofit/afadjust.c (af_all_glyph_variants): Move code to compute the `feature_tags` and `type_3_lookup_indices` sets to... (af_reverse_character_map_new): ...this function.
d1ac9524 2025-04-14 15:48:33 [autofit] Fix creation of the adjustment database's reverse map. Due to the way the reverse map array gets constructed with HarfBuzz, there might be multiple, identical glyph index entries with different character values in the array. As an example, an OpenType feature like 'unic' might map lowercase glyph 'ae' to uppercase glyph 'AE', in addition to the already present cmap entry for 'AE'. In most cases, this incorrect mapping is harmless (but still wrong). However, there exist some lowercase/uppercase character pairs where the diacritic for the uppercase character is on the other vertical side of the base character as for the lowercase character. An example is U+0122 (LATIN CAPITAL LETTER G WITH CEDILLA) and U+0123 (LATIN SMALL LETTER G WITH CEDILLA): the former has the cedilla below, the latter above. A wrong mapping would thus shift the base glyph 'G' up by a pixel instead of shifting the cedilla down. We fix this by always giving precedence to cmap entries. * src/autofit/afadjust.c (af_reverse_character_map_entry_compare): Do a secondary sort on the character code. (af_reverse_character_map_lookup): Adjust binary search to return the first occurrence of an entry (i.e., the one with the lowest array index). (af_reverse_character_map_new)[FT_CONFIG_OPTION_USE_HARFBUZZ]: Implement cmap priority.
05797069 2025-04-14 09:22:10 [autofit] Reduce adjustment database lookups. This is also in preparation for a follow-up commit. * src/autofit/afadjust.h (af_lookup_vertical_separation_type, af_lookup_tilde_correction_type): Replaced with... (af_adjustment_database_lookup, af_reverse_character_map_lookup): ... this. * src/autofit/afadjust.c (af_adjustment_database_lookup, af_adjustment_database_lookup): Updated. (af_lookup_vertical_separation_type, af_lookup_tilde_correction_type): Removed. (af_reverse_character_map_new)[FT_DEBUG_LEVEL_TRACE]: Updated. * src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments, af_latin_hints_apply): Updated.
233cdea8 2025-04-12 10:32:44 * src/afadjust.c (adjustment_database): Make it complete up to U+017F.
535498a0 2025-04-13 22:11:39 * src/autofit/afadjust.c (af_reverse_character_map_new): Add tracing code.
c34e551c 2025-04-12 07:38:43 * src/afadjust.c: Minor fixes.
218c59a2 2025-04-11 07:38:03 [autofit] Better vertical separation adjustment support. (2/2) * src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Handle diacritics with more than a single contour.
52d4573e 2025-04-11 07:30:55 [autofit] Better vertical separation adjustment support. (1/2) Test vertical maxima instead of vertical minima to identify the highest contour (and vice versa to identify the lowest contour). Doing so will allow support of diacritics that consist of more than a single outline. This works because of the topological constraints ensured by the adjustment database. * src/autofit/aflatin.c (af_find_highest_contour, af_glyph_hints_apply_vertical_separation_adjustments): Implement it.
c6106cff 2025-04-10 14:05:14 [autofit] Use new y extrema arrays. * src/autofit/aflatin.c (af_glyph_hints_apply_vertical_separation_adjustments): Implement it.
8d49ccd6 2025-04-10 09:44:58 [autofit] Provide infrastructure for storing y extrema of contours. We need this for better positioning support of diacritics. * src/autofit/afhints.h (AF_GlyphHintsRec): New fields `contour_y_minima` and `contour_y_maxima`, together with its embedded variants. * src/autofit/afhints.c (af_glyph_hints_done, af_glyph_hints_reload): Handle new arrays.
53a5e2e6 2025-04-15 06:58:52 [autofit] Avoid crash. Reported as https://issues.oss-fuzz.com/issues/410609442 * src/autofit/aflatin.c (af_remove_segments_containing_point): Check `edge`.
558bde6e 2025-04-14 21:37:18 [autofit] Fix just introduced heap buffer overflow Reported as https://issues.oss-fuzz.com/issues/410393975 * src/autofit/afadjust.c [!FT_CONFIG_OPTION_USE_HARFBUZZ]: Synchronize with HarfBuzz code.
ae3879c0 2024-01-29 08:59:18 * docs/CHANGES: Mention Craig's GSoC 2023 project.
24ac6c5d 2024-01-29 08:37:54 [autofit] Add GSUB table handling to reverse character map generation. If HarfBuzz is enabled, the reverse character map generation now considers GSUB entries when looking for glyphs that correspond to a code point. * src/autofit/afadjust.c (af_all_glyph_variants_helper, af_all_glyph_variants) [FT_CONFIG_OPTION_USE_HARFBUZZ]: New functions. (af_reverse_character_map_new) [FT_CONFIG_OPTION_USE_HARFBUZZ]: Call new code.
771449f1 2024-01-29 08:32:21 [autofit] Add tilde-unflattening algorithm. * src/autofit/aflatin.c (af_find_highest_contour, af_remove_segments_containing_point, af_latin_remove_tilde_points_from_edges, af_latin_stretch_tilde, af_latin_align_tilde): New functions. (af_latin_hints_apply): Call tilde-unflatting code if necessary.
7099b09e 2024-01-29 08:21:09 [autofit] Implement vertical separation adjustment. * src/autofit/aflatin.c: Include `afadjust.h`. (af_latin_metrics_init): Call `af_reverse_character_map_new`. (af_latin_metrics_done): New function. (af_move_contour_vertically, af_check_contour_horizontal_overlap, af_glyph_hints_apply_vertical_separation_adjustments): New functions. (af_latin_hints_apply): Call `af_glyph_hints_apply_vertical_separation_adjustments`. (af_latin_writing_system_class): Updated. * src/autofit/aftypes.h (AF_StyleMetricsRec): Add `reverse_charmap` field.
14ac6140 2024-01-28 17:35:15 [autofit] Add code for reverse charmaps and adjustment database lookup. * src/autofit/aftypes.h (AF_ReverseMapEntry, AF_ReverseCharacterMap): New structures. * src/autofit/afadjust.c (af_adjustment_database_lookup, af_reverse_character_map_entry_compare, af_reverse_character_map_lookup, af_lookup_vertical_separation_type, af_lookup_tilde_correction_type, af_reverse_character_map_expand, af_reverse_character_map_new, af_reverse_character_map_done): New functions. * src/autofit/afadjust.c: Updated.
c46ebd76 2024-01-28 17:27:39 [autofit] Add adjustment database. * src/autofit/afadjust.c, src/autofit/afadjust.h: New files. * include/freetype/internal/fttrace.h: Add 'afadjust' component. * src/autofit/autofit.c: Include `afadjust.c`. * src/autofit/rules.mk (AUTOF_DRV_SRC): Add `afadjust.c`.
f0660df3 2024-01-28 07:38:41 [base] Make `find_unicode_charmap` a base function. This is needed for forthcoming changes in the auto-hinter. * include/freetype/internal/ftobjs.h, src/base/ftobjs.c: Updated.
6b6b643f 2025-04-12 15:06:59 * src/bdf/bdflib.c (hdigits): Removed. Fixes #1325.
5416689d 2025-04-12 12:38:01 * include/freetype/internal/ftcalc.h (FT_MSB) [__CC_ARM]: Added.
58b3598c 2025-04-12 09:18:16 Typos in macros. * include/freetype/internal/ftcalc.h: s/_M_X86/_M_IX86/. * src/truetype/ttinterp.c: s/_M_X86/_M_IX86/.
f0acd203 2025-04-12 08:41:27 * docs/CHANGES: Updated.
c88bf8a2 2025-04-11 22:58:26 [base, truetype] Silence UBSAN. * src/truetype/ttinterp.c (TT_MulFix14_64): Use unsigned multiplication. * include/freetype/internal/ftcalc.h (FT_MulFix_64): Ditto.
fb99fd63 2025-04-11 22:57:27 [base, truetype] Synchronize MulFix assembly. * include/freetype/internal/ftcalc.h (FT_MulFix_*), src/truetype/ttinterp.c (TT_MulFix14_*): Synchronize routines.
91753736 2025-04-10 19:58:48 [truetype] Modernize bytecode projections. With 64-bit platforms widely available, it is more efficient to use 64-bit variables readily. It results in noticeable 10% improvement in glyph loading speed. * src/truetype/ttinterp.c (TT_MulFix14, TT_DotFix14) [FT_INT64]: Prioritize available implementation with arguments adjusted based on the use cases.
9a394e2d 2025-04-09 16:09:01 [base] Update FT_MulFix inlining. Resolves inconsistencies in 64-bit multiplication discussed in !355. Importantly, FT_MulFix arguments and return value is FT_Long, whatever sizeof FT_Long is on 64-bit platforms: 8 bytes on Linux or 4 bytes on Windows. * include/freetype/internal/ftcalc.h (FT_MulFix_x86_64): Removed. (FT_MulFix_64): Generalize and prioritize the inline implementation for all 64-bit platforms ifdef FT_INT64. * src/base/ftcalc.c (FT_MulFix)[FT_INT64]: Call 'FT_MulFix_64'. * src/base/ftbase.c: Include 'ftcalc.c' after the FT_MulFix callers to enable its inlining.
8f67545d 2025-04-09 13:37:23 [base] Update FT_MulFix inlining. Resolves inconsistencies in 64-bit multiplication discussed in !355. Importantly, FT_MulFix arguments and return value is FT_Long, whatever sizeof FT_Long is on 64-bit platforms: 8 bytes on Linux or 4 bytes on Windows. * include/freetype/internal/ftcalc.h (FT_MulFix_x86_64): Removed. (FT_MulFix_64): Generalize and prioritize the inline implementation for all 64-bit platforms ifdef FT_INT64. * src/base/ftcalc.c (FT_MulFix)[FT_INT64]: Call 'FT_MulFix_64'. * src/base/ftbase.c: Include 'ftcalc.c' after the FT_MulFix callers to enable its inlining.
fc67794e 2025-04-04 19:54:50 Missing header wrappers. * include/freetype/config/integer-types.h, src/smooth/ftgrays.h: Add missing FT_BEGIN_HEADER and FT_END_HEADER. * src/smooth/ftgrays.c: Cosmetics.
82090e67 2025-03-26 00:26:55 [bdf] Clarify callback flow. * src/bdf/bdflib.c (bdf_line_func_t_): Modify callback prototype. (bdf_parse_*_): Updated. (bdf_load_font, bdf_readstream_): Delay callback initiation.
7ede7324 2025-03-25 22:03:23 * src/bdf/bdflib.c (bdf_readstream_): Relocate.
56b53a86 2025-03-25 21:23:46 * src/bdf/bdflib.c (bdf_is_atom_): Do not check tabs.
7ddb53fc 2025-03-25 21:22:52 * src/bdf/bdflib.c (_bdf_strncmp): Macro removed, callers updated.
5d4e649f 2025-02-26 15:35:25 .gitlab-ci.yml: Minor.
316bdc96 2025-02-26 15:32:27 * .gitlab-ci.yml: Switch to arm64 runners for macOS CI.
d0c905c6 2025-02-24 19:13:39 [sfnt/CPAL] Return early if user requested currently-set palette Before, we were loading a palette (again and again) even if the same was requested. Even if the font only had one palette... For a font like NotoColorEmoji that has over 5000 colors in its palette, this was dominating the COLRv1 loading times for HarfBuzz (and I believe all other clients) because they have to set the palette to get access to the colors. * src/base/ftcolor.c (FT_Palette_Select): Check the current palette.
b1f47850 2025-01-28 22:49:21 * src/bdf/bdflib.c (bdf_parse_start_): Move setup of properties.
00a1567a 2025-01-24 22:36:56 [bdf] Treat all comments uniformly. * src/bdf/bdflib.c (bdf_parse_start_): Reject fonts with initial COMMENTs. (bdf_parse_properties_): Skip COMMENTs so that... (bdf_add_property_): Do not make exception for COMMENT. (bdf_parse_glyphs_, bdf_add_comments): Updated.
fdae51cc 2025-01-24 22:03:00 * src/bdf/bdflib.c (BDF_SWIDTH_ADJ_): Remove clashing flag and update.
bfe793cc 2025-01-22 21:17:57 * src/bdf/bdflib.c (bdf_atous_): Remove unnecessary checks.
40a74585 2025-01-22 21:05:22 * src/bdf/bdflib.c (bdf_ato{i.ul.s.us}_]): Remove uncecessary checks.
56131e42 2025-01-22 20:47:56 [bdf] Postpone font default char handling. * src/bdf/bdflib.c (bdf_parse_start_, bdf_add_property_): Delay handling of the default char until... * src/bdf/bdfdrivr.c (BDF_Face_Init): ... handles all other properties.
8bae8706 2025-01-22 20:46:43 [bdf] Postpone font spacing handling. * src/bdf/bdf.h (bdf_font_t): Remove `monowidth`. * src/bdf/bdflib.c (bdf_parse_start_, bdf_add_property_): Delay handling of the font spacing until... * src/bdf/bdfdrivr.c (BDF_Face_Init): ... handles all other properties.
c0a7839e 2025-01-22 19:11:47 [bdf] Postpone font ascent and descent handling. * src/bdf/bdflib.c (bdf_parse_start_, bdf_add_property_): Delay handling of the font ascent and descent until... * src/bdf/bdfdrivr.c (BDF_Face_Init): ... handles all other properties.
c33da8fb 2025-01-22 16:59:44 * src/bdf/bdflib.c (bdf_parse_start_): Relax the header order. We now check that the header is complete in no specific order.
a059b237 2025-01-19 22:39:17 * src/truetype/ttgxvar.c (tt_face_vary_cvt): Fix all shared values. Applying cvar deltas to all shared points was incorrectly omitted. Fixes #1314.
b9e09e33 2025-01-19 12:35:13 * src/bdf/bdflib.c (bdf_parse_glyphs_): Fix tracing.
01c22b36 2025-01-19 11:19:10 [bdf] Tokenize input instead of listing. Instead of cumbersome field list mamangement, we will tokenize input using custom `bdf_strtok_`. * src/bdf/bdflib.c (bdf_list_t_, bdf_list_init_, bdf_list_ensure_, bdf_list_shift_, bdf_list_join_, bdf_list_split_, bdf_set_default_spacing_): Removed. (bdf_strtok_): New function which NUL-terminates the first token at the delimiter position and returns the next token that follows consequtive delimiters. (bdf_parse_*_, bdf_load_font): Updated. * docs/CHANGES: Claim overall 75% performance improvement.
ad7dce77 2025-01-17 20:54:14 * src/bdf/bdflib.c (bdf_parse_start_): Prevent another STARTPROPERTIES. Only one STARTPROPERTIES was permitted in the old flow preventing leaks and overflows. See https://issues.oss-fuzz.com/issues/389968131 https://issues.oss-fuzz.com/issues/390464875
e3a3b39d 2025-01-16 23:25:08 * src/bdf/bdflib.c (bdf_parse_start_): Do not overwrite flags.