Behdad Esfahbod
527823ccac
[unicode] Destroy user_data in set_funcs fail paths
...
This is what the font_funcs / draw_funcs do.
2 years ago
Qunxin Liu
6314aa7da4
[subset] add an experimental API that can override name strings for specified name_id
2 years ago
David Corbett
ade87e1538
[Unicode 15] Add tests
2 years ago
Behdad Esfahbod
4ab7e579cb
Make HB_BORING_EXPANSION opt-in instead of opt-out
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3757
2 years ago
Garret Rieger
f3aff45e04
[repacker] Update call to hb_subset_repack_or_fail in tests.
2 years ago
Behdad Esfahbod
1945b400da
[cpluscplus] Wrap hb-subset types as well
...
Also changes signature of get_user_data of hb.h types to take const
object. This is safe.
2 years ago
Frédéric Wang
32e542d6f0
try & fix build errors on the bot
2 years ago
Frédéric Wang
03d2376745
[math] Improve fuzzing coverage
...
Extend testing to cover parts that are missing according to the recent
oss-fuzz-coverage report:
- Retriving all constants from MathConstants.
- Retrieving entries from MathKern, MathGlyphPartRecord and
MathGlyphAssembly.
- Retrieving italic correction from MathGlyphAssembly.
- Choosing between horizontal/vertical offset in MathVariants.
https://storage.googleapis.com/oss-fuzz-coverage/harfbuzz/reports/20220627/linux/src/harfbuzz/src/hb-ot-math-table.hh.html
https://github.com/harfbuzz/harfbuzz/issues/3688
2 years ago
Behdad Esfahbod
d3308f4713
[font] Optimize font scaling further
2 years ago
Behdad Esfahbod
556e7078f0
[font] Optimize glyph scaling
2 years ago
Garret Rieger
af74ab452f
[repack] always run the sort in repack.
...
This is needed to ensure virtual link ordering constraints are respected when repack is being called from fontTools. For subset usage, repack won't be called if the graph doesn't already overflow so this change doesn't cause any extra work.
2 years ago
Behdad Esfahbod
b39b5f2f31
[name] Implement approximate language matching
...
Very rudimentary.
Fixes https://github.com/harfbuzz/harfbuzz/issues/3354
2 years ago
Behdad Esfahbod
7aacdd05bd
[cplusplus] Test hashing shared_ptr / unique_ptr
2 years ago
Behdad Esfahbod
d7785a6da0
[cplusplus] Add unique_ptr
2 years ago
Behdad Esfahbod
e0f3cab246
[cplusplus] Add hb-cplusplus.hh
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/2152
2 years ago
Garret Rieger
3472f73b79
[subset] also include no subset tables when guessing which tables are present.
3 years ago
Garret Rieger
9564d98739
[subset] fix subsetting of faces created via hb_face_create_for_tables.
...
Fixes #3609 .
3 years ago
Garret Rieger
4e11da054d
[repacker] update repacker test golden file.
...
Changed due to removal of Kahn sorting.
3 years ago
Behdad Esfahbod
25393288f0
[test] Fix compiler warning
3 years ago
Andrew John
0182988229
[set] Add call to export set contents to an array. ( #3500 )
...
[set] Add hb_set_next_many.
3 years ago
Behdad Esfahbod
36b8f97413
Update tests for recent changes
3 years ago
Andy John
ef588ea97b
Add option to insert a sorted arrays of values to sets.
3 years ago
Qunxin Liu
a35757c6bc
[repacker] expose hb_subset_repack() API, hb_object_t and hb_link_t structs
3 years ago
Garret Rieger
f6071c16b0
[subset] Rename codepoint -> unicode in subset plan api
3 years ago
Matthias Clasen
d4cb07728c
Add a missing file
...
The style test is using notosansitalic.ttf now,
but I forgot to add it with the test. Fix that.
3 years ago
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.
3 years ago
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.
3 years ago
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
3 years ago
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.
3 years ago
Behdad Esfahbod
67eb9acf79
[config] Add HB_NO_BORING_EXPANSION
3 years ago
Behdad Esfahbod
197ed8f592
[test/api] Fix leaks
3 years ago
Behdad Esfahbod
531c27d199
Fix build
3 years ago
Behdad Esfahbod
8b7ccc41c4
[hmtx] Implement [boring-expansion] >64k expansion
...
This implements https://github.com/be-fonts/boring-expansion-spec/issues/7
3 years ago
Behdad Esfahbod
379e526aa4
[test] Add test for current hmtx logic
3 years ago
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
3 years ago
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.
3 years ago
Behdad Esfahbod
ae223764a3
[test/draw] Typo
3 years ago
Ebrahim Byagowi
0429921c10
[draw/test] Add test for freetype callback
...
Let's have that part of the code also covered.
3 years ago
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.
3 years ago
Khaled Hosny
0e357c504c
[draw] Test scaling subfont differently from parent
3 years ago
Khaled Hosny
aca80a4a40
[draw] Add test for applying synthetic slant
3 years ago
Khaled Hosny
052fd2d8b9
[draw] Add test for hb_draw_move_to() etc
3 years ago
Behdad Esfahbod
f1a9a9ccaf
[draw-state] Pass state down to callbacks
3 years ago
Behdad Esfahbod
9f05362d43
[test-draw] Fix compiler warning
3 years ago
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.
3 years ago
Behdad Esfahbod
5610fa1da0
[test-draw] Re-enable two disabled tests
3 years ago
Behdad Esfahbod
8b4f429000
[draw] Virtualize hb_font_draw_glyph() into hb_font_get_glyph_shape()
...
To be implemented in hb-ft.
3 years ago
Behdad Esfahbod
2bed4f46fb
[draw] Fix draw signatures
3 years ago
Behdad Esfahbod
e0ac6c587b
Remove remaining traces of HB_EXPERIMENTAL_API
3 years ago
Behdad Esfahbod
5207ce828a
[draw] Enable draw tests
...
Disable two failing ones.
3 years ago