|
32cb5390
|
2025-09-06T06:14:03
|
|
Update all copyright notices.
|
|
47e35a58
|
2025-05-16T08: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-16T07: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-16T07: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`.
|
|
f68733d4
|
2025-05-19T05: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.
|
|
d3fbbed9
|
2025-05-13T14: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.
|
|
3e079bd7
|
2025-05-05T18:02:44
|
|
[autofit] Add safety check for accent adjustments.
This commit does two things.
- Ignore accents that have too large heights. This situation can happen if
an accent outline is unexpectedly not the highest (or lowest) contour.
- Add a new adjustment flag `AF_ADJUST_NO_HEIGHT_CHECK` to override the
height check.
* src/autofit/afadjust.h (AF_ADJUST_NO_HEIGHT_CHECK): New macro.
* src/autofit/afadjust.c (adjustment_database): Updated.
* src/autofit/aflatin.c (af_latin_hints_apply): Handle new flag.
(af_glyph_hints_apply_vertical_separation_adjustments): Check limit.
|
|
620daa3c
|
2025-05-03T20:35:42
|
|
[autofit] Better handling of characters with attached diacritics. (2/3)
* src/autofit/afadjust.h (AF_IGNORE_CAPITAL_TOP, AF_IGNORE_CAPITAL_BOTTOM,
AF_IGNORE_SMALL_TOP, AF_IGNORE_SMALL_BOTTOM): New macros.
* src/autofit/afadjust.c (af_reverse_character_map_new)
[FT_DEBUG_LEVEL_TRACE]: Updated.
Also fix debugging strings of other flags.
* src/autofit/afhints.h (AF_EDGE_NO_BLUE): New edge flag to make the
auto-hinter ignore the edge while assigning blue zones.
* src/autofit/aflatin.c (af_latin_hints_compute_blue_edges): Use it.
(af_prevent_top_blue_alignment, af_prevent_bottom_blue_alignment,
af_latin_get_base_glyph_blues, af_latin_ignore_top,
af_latin_ignore_bottom): New functions.
(af_latin_hints_apply): Updated.
|
|
9eb6548d
|
2025-04-25T12: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.
|
|
7722a5b2
|
2025-04-23T19: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.
|
|
ba94c954
|
2025-04-22T12: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.
|
|
162a93b1
|
2025-04-21T07: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-21T06: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.
|
|
566e30c1
|
2025-04-21T05: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.
|
|
05797069
|
2025-04-14T09: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.
|
|
14ac6140
|
2024-01-28T17: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-28T17: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`.
|