Garret Rieger
f2b9065246
[repacker] for ext promotion choose lookups from highest subtables per byte to lowest.
...
Attempts to roughly maximize the number of subtables that are non-ext.
2022-07-25 21:55:03 +00:00
Garret Rieger
e4fd5ff727
[repacker] count subtable size in each group of consecutive layers for extension promotion decisions.
...
Enforce that the following groups are all <64k in size:
- LookupList + Lookups
- Lookups + SubTables
- SubTables + Descendants
2022-07-25 21:31:17 +00:00
Garret Rieger
0a5b69b255
[repacker] when calculating 16bit space size also consider ext lookup subtables.
2022-07-25 20:11:24 +00:00
Garret Rieger
fa177b7f33
[repacker] include LookupList size when calculating size of 16bit space for ext promotion decisions.
2022-07-25 19:42:58 +00:00
Garret Rieger
156105b0f0
[repacker] Use extension promotion when repacking invoked via hb-subset-repacker (eg. from fonttools).
2022-07-25 19:16:03 +00:00
Garret Rieger
e6dda54c88
[repacker] remove temporary visibility overrides in gsubgpos.
2022-07-22 22:49:40 +00:00
Garret Rieger
ffb0f7936f
[repacker] add ext promotion test.
2022-07-22 22:36:04 +00:00
Garret Rieger
7ebc92f2e0
[repacker] todo.
2022-07-21 23:12:15 +00:00
Garret Rieger
8c6afa69d5
[repacker] Add basic version of the extension promotion selection algorithm.
2022-07-21 22:50:14 +00:00
Garret Rieger
514fcea0aa
[repacker] fix GSTAR sanitize.
2022-07-21 21:57:17 +00:00
Garret Rieger
2f63f0c861
[repacker] support extension promotion in 24bit GSUB/GPOS.
2022-07-21 21:54:42 +00:00
Garret Rieger
a8887b2740
[repacker] save buffer reference (not copy).
2022-07-21 21:50:23 +00:00
Garret Rieger
ede7b74584
[repacker] add sanitization for GSUB/LookupList/Lookup during extension promotion.
2022-07-21 21:45:04 +00:00
Garret Rieger
c61c05e431
[repacker] add make_extension_context_t.
2022-07-21 19:07:55 +00:00
Garret Rieger
f2a0e69162
[repacker] size buffer correctly.
2022-07-21 18:36:20 +00:00
Garret Rieger
d520a6d522
[repack] fix incorrect extension object bounds.
2022-07-20 18:17:29 +00:00
Garret Rieger
5babfda3f2
[repack] fix new node bounds.
2022-07-20 03:26:29 +00:00
Garret Rieger
c20b85cfed
[repack] WIP implement extension promotion mechanism.
2022-07-19 23:33:16 +00:00
Garret Rieger
d9295d88a7
[repacker] WIP extension promotion implementation.
2022-07-19 21:50:13 +00:00
Behdad Esfahbod
4f22397f05
[ft] A couple of introspection fixes
2022-07-18 11:03:54 -06:00
Behdad Esfahbod
f7f6d278bb
Add hb_language_matches()
...
New API:
+ hb_language_matches()
2022-07-17 22:15:42 -06:00
Behdad Esfahbod
d57ce30054
[ot-shape] Pass reference to props instead of pointer
...
Since cannot be nullptr.
2022-07-17 21:56:56 -06:00
Behdad Esfahbod
a972d05d7e
[aat] Fix build
2022-07-17 21:42:04 -06:00
Behdad Esfahbod
2124ad8906
[aat/morx] Implement language-specific forms
...
Test on Mac with, eg.
$ hb-view /Library/Fonts/BigCaslon.ttf -u 107
vs
$ hb-view /Library/Fonts/BigCaslon.ttf -u 107 --language pl
Fixes https://github.com/harfbuzz/harfbuzz/issues/1373
2022-07-17 21:32:27 -06:00
Behdad Esfahbod
d8574b44cc
[CoverageFormat2] Fix iterator to avoid infinite loop
...
on invalid data.
Fixes https://oss-fuzz.com/testcase-detail/5304497047470080
2022-07-17 18:44:27 -06:00
Behdad Esfahbod
b475a2ab29
[array] Adjust operator !=
2022-07-17 18:44:11 -06:00
Behdad Esfahbod
9518d602f3
[atomic] Disable compiler memory barrier on MSVC
...
It keeps giving me internal compiler error.
https://github.com/harfbuzz/harfbuzz/issues/3728
2022-07-17 17:03:40 -06:00
Behdad Esfahbod
f0707e2348
[atomic] Add compiler memory_r_barrier
...
https://github.com/harfbuzz/harfbuzz/issues/3728
2022-07-17 16:47:16 -06:00
Behdad Esfahbod
f3151b6582
[ArrayOf family] Use memory barrier before accessing array
...
Without it, the compiler was reordering and batching the read
of array length and array[0] if the 0'th member was accessed
constantly and function was inlined. This felt safe to the
compiler because HB_VAR_ARRAY is 1, but could be unsafe actually.
The memory barrier disallows that.
This was found by afl/honggfuzz address sanitizers.
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=49187
2022-07-17 16:22:29 -06:00
Behdad Esfahbod
90e40f24fe
[algs] Tweak attribute(packed) usage
...
Allow disabling it. Also don't cast this pointer.
2022-07-17 15:01:04 -06:00
Behdad Esfahbod
af84680f23
[GSUB] Remove a reinterpret_cast
2022-07-17 12:00:04 -06:00
Behdad Esfahbod
9843f07658
[OffsetTo] Try catching nullable offsets to unbounded types
...
Doesn't catch all cases; if type is not fully defined at
OffsetTo time, we can't know.
Fixes https://github.com/harfbuzz/harfbuzz/issues/1300
to the best we can do.
2022-07-15 16:04:40 -06:00
Behdad Esfahbod
1327d8e3df
[layout-common] Reshuffle code so Feature is defined before it's used
2022-07-15 16:03:38 -06:00
Behdad Esfahbod
f7147835eb
[colr] Add MIN_SIZE to Paint
2022-07-15 16:03:25 -06:00
Behdad Esfahbod
e1d2facd53
[null] Add hb_has_null_size() and hb_has_min_size()
2022-07-15 16:02:58 -06:00
Behdad Esfahbod
6ed57de15c
[ft] Fix negative font sizes for bitmaps
2022-07-15 15:09:28 -06:00
Behdad Esfahbod
307ee9baff
[ft] Fix bitmap-only vertical metrics
2022-07-15 14:48:29 -06:00
Behdad Esfahbod
87d338eb61
[ft] Fix test
2022-07-15 14:26:47 -06:00
Khaled Hosny
e294200dac
[ft] Check for FT_Get_Transform at build time
2022-07-15 21:59:33 +02:00
Behdad Esfahbod
901236f721
[ft] Implement loading (color) bitmap fonts
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/489
Something about the vertical metrics is still off, not matching
hb-ot. I cannot figure out what.
2022-07-15 13:35:14 -06:00
Behdad Esfahbod
3ac110560d
[ft] Fix scale when font-sizes are negative
2022-07-15 12:48:11 -06:00
Behdad Esfahbod
d68507d062
[arabic] Pause after calt only if no rclt
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1573
2022-07-15 12:27:46 -06:00
Behdad Esfahbod
8b379ddc76
[test-iter] Add back test of OT namespace iteration
2022-07-14 16:20:04 -06:00
Garret Rieger
5363e40de1
[reorg] update build files.
2022-07-13 20:25:13 -06:00
Garret Rieger
d82ace5c6f
[reorg] add TODO to RangeRecord.
2022-07-13 20:25:13 -06:00
Garret Rieger
c1e280ea78
[reorg] Move Coverage, RangeRecord into new namespace layout.
2022-07-13 20:25:13 -06:00
Garret Rieger
9c2518988d
[repack] Don't count space isolation against round limit.
...
Restore max rounds to 20 but don't count space isolation against the limit. The number of iterations space isolation can make changes for is already bounded to a reasonable max (the number of lookups in the font) so no need to cap the number of iterations.
2022-07-13 20:24:59 -06:00
Behdad Esfahbod
a2f0723148
[GPOS] Adjust mark attachment on multiple substitution some more
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/1545
2022-07-13 16:02:39 -06:00
Behdad Esfahbod
ac216972ab
[subset] Add table size blowup bound
...
Fixes https://github.com/harfbuzz/harfbuzz/issues/3091
2022-07-13 15:32:19 -06:00
Behdad Esfahbod
4b3afafb00
[array] Use hb_swap() in reverse()
2022-07-13 15:13:07 -06:00