Matthias Clasen
16b232be0e
[hb-style] Fix the sign of slant ratios
...
We want negative slant angles to yield
positive slant ratios. Fix that.
Test included.
2022-02-18 18:10:34 -06:00
Matthias Clasen
e76061a737
[hb-style] Fix synthetic slant values
...
When reporting the slant ratio of a font
that has synthetic slant set, we were
reporting twice the expected value.
Fix that. Test included.
2022-02-18 17:53:54 -06:00
Behdad Esfahbod
56f11ec938
[buffer] Add HB_BUFFER_FLAG_PRODUCE_UNSAFE_TO_CONCAT
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3454
2022-02-18 17:52:27 -06:00
Behdad Esfahbod
f8e9e315bb
Merge pull request #3437 from matthiasclasen/synthesize-missing-baselines
...
[BASE] Synthesize missing baselines
2022-02-17 14:34:46 -06:00
Matthias Clasen
f81578fd86
[ot-layout] Synthesize missing baselines
...
Add a variation of hb_ot_layout_get_baseline that
synthesizes missing baselines, using heuristics in part
taken from the CSS Inline Layout Module, Level 3.
Includes some new tests for synthesized baselines.
The base2.ttf is a subset of Noto Sans Bengali that
includes just the Bengali Ka.
New API: hb_ot_layout_get_baseline_with_fallback
2022-02-16 17:37:33 -06:00
Behdad Esfahbod
d2998faad3
Merge pull request #3410 from harfbuzz/boring-expansion
...
[Boring Expansion] >64k loca & hmtx tables
This does two things:
The num-glyphs reported by the face now is the maximum reported by the maxp and that deduced from the length of the loca table; I think this is the right thing to do anyway; According to OpenType such loca tables are invalid.
The interpretation hmtx tables that have excessive bytes at the end, again, invalid according to OpenType, has changed. Previously we were interpreting those excessive bytes as extra lsb values. Now we interpret them as extra advance values, the last of which is repeated for all missing glyphs. Again, these are tables that are invalid according to OpenType, and the advances are for glyph indices beyond maxp table's num-glyphs.
The combined effect is that the font can have shapes and advances for gid's beyond the maxp limit of 64k. In fact, maxp table becomes optional.
2022-02-16 14:37:09 -06:00
Khaled Hosny
cfa8cd7fb0
[autotools] Fix make distcheck
...
The test-draw.c can now optionally uses hb-ft, but automake file was not
passing FreeType cflags or libs to it.
2022-02-16 11:58:38 +02:00
Behdad Esfahbod
a396543ae1
Merge pull request #3411 from harfbuzz/draw
...
[draw] Finish and release draw API
2022-02-15 18:47:55 -06:00
Behdad Esfahbod
67eb9acf79
[config] Add HB_NO_BORING_EXPANSION
2022-02-15 17:17:49 -06:00
Behdad Esfahbod
1bf588e28b
[test/shape] Internal rename
...
Residual from e0d7060f80
2022-02-15 16:57:23 -06:00
Behdad Esfahbod
197ed8f592
[test/api] Fix leaks
2022-02-15 14:30:12 -06:00
Behdad Esfahbod
531c27d199
Fix build
2022-02-15 14:20:54 -06:00
Behdad Esfahbod
8b7ccc41c4
[hmtx] Implement [boring-expansion] >64k expansion
...
This implements https://github.com/be-fonts/boring-expansion-spec/issues/7
2022-02-15 14:15:12 -06:00
Behdad Esfahbod
379e526aa4
[test] Add test for current hmtx logic
2022-02-14 15:02:31 -06:00
Behdad Esfahbod
ed6d287d11
[ot-face] Load num-glyphs from `loca` table before `maxp`
...
Implements [boring-expansion] [maxp] Relax
https://github.com/be-fonts/boring-expansion-spec/issues/6
2022-02-14 13:52:30 -06:00
Ebrahim Byagowi
6b75a30a73
[draw/test] Swap a freetype test case with a simpler one
...
As CI failure, apparently the my local freetype and CI one have different
result so let's switch the case with a simpler one just to test quadratic command
is emitted correctly.
2022-02-14 01:54:33 +03:30
Behdad Esfahbod
ae223764a3
[test/draw] Typo
2022-02-13 15:39:14 -06:00
Ebrahim Byagowi
0429921c10
[draw/test] Add test for freetype callback
...
Let's have that part of the code also covered.
2022-02-14 00:18:13 +03:30
Ebrahim Byagowi
d4588204e5
[draw/glyf] Emit empty contours
...
This makes it actually match freetype behaviour even though rasterizer
should filter such contours specially for stroking.
See https://github.com/harfbuzz/harfbuzz/pull/3411#discussion_r802283827 for the context.
2022-02-13 23:50:53 +03:30
Khaled Hosny
0e357c504c
[draw] Test scaling subfont differently from parent
2022-02-13 13:21:15 -06:00
Behdad Esfahbod
151f205819
[draw] Emit move_to immediately, like other operators
2022-02-13 13:21:15 -06:00
Khaled Hosny
aca80a4a40
[draw] Add test for applying synthetic slant
2022-02-13 13:21:15 -06:00
Khaled Hosny
052fd2d8b9
[draw] Add test for hb_draw_move_to() etc
2022-02-13 13:21:15 -06:00
Behdad Esfahbod
f1a9a9ccaf
[draw-state] Pass state down to callbacks
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
9f05362d43
[test-draw] Fix compiler warning
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
1740916ede
[draw] Remove check for no-op
...
This is unnecessary overhead. Up to rasterizers to handle this. Plus,
this throws off point-numbers in uses that rely on it.
Disabled one test that broke with this.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
5610fa1da0
[test-draw] Re-enable two disabled tests
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
8b4f429000
[draw] Virtualize hb_font_draw_glyph() into hb_font_get_glyph_shape()
...
To be implemented in hb-ft.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
2bed4f46fb
[draw] Fix draw signatures
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
08e1096609
[draw-fuzzer] Fix signatures
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
e0ac6c587b
Remove remaining traces of HB_EXPERIMENTAL_API
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
5207ce828a
[draw] Enable draw tests
...
Disable two failing ones.
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
157caf254e
[test-draw] Fix compiler warning
2022-02-13 13:21:14 -06:00
Behdad Esfahbod
b263371b09
Merge pull request #3398 from harfbuzz/buffer-verify
...
Add HB_BUFFER_FLAG_VERIFY
2022-02-12 15:06:47 -06:00
Behdad Esfahbod
b3f8288cca
[test/subset] Don't hash files without reason
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3118#issuecomment-894021518
2022-02-12 14:52:42 -06:00
Behdad Esfahbod
af407dd24d
Add a fuzzer font
2022-02-12 14:22:35 -06:00
Alexis King
81754a5a96
[ot-math] Add hb_ot_math_get_glyph_kernings
...
closes #3396
2022-02-09 12:03:07 -06:00
Alexis King
1bc4bad7a5
[ot-tag] Add HB_SCRIPT_MATH (Zmth) and map it to OT ‘math’ tag
...
The ISO 15924 code for mathematical notation is ‘Zmth’, but the
OpenType script is ‘math’.
2022-02-08 12:40:15 -06:00
Behdad Esfahbod
7657bdd91f
Revert "Fix failing Mac test for previous commit"
...
This reverts commit 070e30e6da
.
2022-02-04 19:16:54 -06:00
Behdad Esfahbod
44da4e2a27
Revert "One more fix"
...
This reverts commit cab943a015
.
2022-02-04 19:16:47 -06:00
Behdad Esfahbod
88798ee8be
[GPOS] Disable split-kerning
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3408
Reverts https://github.com/harfbuzz/harfbuzz/pull/3235
Fixes https://github.com/harfbuzz/harfbuzz/pull/3235#issuecomment-1029814978
2022-02-04 19:01:57 -06:00
Garret Rieger
4e2f409bce
[subset] Don't hold references to members of the active_glyph_stack.
...
These references may get invalidated after the vector for the stack is resized. Fixes: https://oss-fuzz.com/testcase-detail/5422577634377728
2022-01-31 22:58:53 +02:00
Garret Rieger
bc899650c7
[subset] Fix for issue #3397 .
...
cur_intersected_glyphs gets modified during recursion leading to incorrect filtering of sub tables in some cases. So don't use cur_intersected_glyphs. Instead just add an additional entry onto the parent_active_glyphs () stack.
Additionaly expands NotoNastaliqUrdu tests to include coverage of the issue from #3397 .
2022-01-28 14:20:33 -08:00
Behdad Esfahbod
61856359cb
[fuzz] Disable verification for now.
2022-01-28 14:07:29 -07:00
Behdad Esfahbod
6596e42d16
[fuzz] Verify shape results
2022-01-28 13:55:24 -07:00
Behdad Esfahbod
909e34f68a
[unsafe-to-concat] Adjust Arabic-joining start boundary condition more
2022-01-22 11:53:18 -07:00
Behdad Esfahbod
cab943a015
One more fix
2022-01-20 14:32:30 -07:00
Behdad Esfahbod
070e30e6da
Fix failing Mac test for previous commit
2022-01-20 14:31:31 -07:00
Behdad Esfahbod
84aa1a836c
[PairPos] Split GPOS kerning to both sides ( #3235 )
2022-01-20 14:18:19 -07:00
Khaled Hosny
1522015bb2
[test] Add --single-par to more places in hb-aots-tester [ci skip]
2022-01-19 23:15:45 +02:00