Commit Graph

329 Commits

Author SHA1 Message Date
Behdad Esfahbod adccc5355b [MarkBase] Adjust base-finding logic
Fixes https://github.com/harfbuzz/harfbuzz/issues/4124
2023-02-17 12:29:42 -07:00
Behdad Esfahbod c6c1c6ddf1
Merge pull request #4107 from harfbuzz/cubic-glyf
[glyf] Support cubic curves
2023-02-11 09:20:51 -07:00
Behdad Esfahbod 6ddd490191 [path-builder] Comment re cubic 2023-02-10 14:24:03 -07:00
Behdad Esfahbod 91c2f098d0 [cubic-glyf] Add HB_NO_CUBIC_GLYF 2023-02-10 14:15:16 -07:00
Qunxin Liu af1e605be2 [instancer] bug fix
It's possible that length of all_points equals to 4 for non-empty
glyphs: a composite glyph which contains only one child glyph that is
empty.
2023-02-10 12:51:27 -07:00
Behdad Esfahbod 1d9dafbfd5 [glyf] Support cubic curves
https://github.com/harfbuzz/boring-expansion-spec/issues/41
2023-02-07 22:19:45 -07:00
Behdad Esfahbod 64fa5cd482 [GPOS] Fix assert fail introduced recently
Was introduced in 8708b9e081.

If these lookups are recursed to from (Chain)Context out-of-order,
it was possible that last_base > buffer->idx, in which case we
were attaching marks to a base after them... and an assertion
was failing fortunately.

Fixes https://oss-fuzz.com/testcase-detail/6377756666757120
2023-02-07 15:52:53 -07:00
Behdad Esfahbod 8708b9e081 [GPOS] Avoid O(n^2) behavior in mark-attachment
Better implementation; avoids arbitrary limit on look-back.
2023-02-06 14:51:25 -07:00
Behdad Esfahbod ef2a8f722f [VarComposite] Adjust for RESET_UNSPECIFIED_AXES semantic change
https://github.com/harfbuzz/boring-expansion-spec/issues/81
2023-02-06 12:04:16 -07:00
Garret Rieger fda200658e [subset] fix missing compiled glyph cleanup when serialization succeeds. 2023-02-02 15:25:37 -07:00
Khaled Hosny ae96295d67 Delete commented out include 2023-01-28 22:12:33 +02:00
Matthias Clasen 09b7fce857 Make includes relative 2023-01-28 12:09:45 -07:00
Matthias Clasen e25e4c9a52 Move GDEF table to src/OT/Layout/GDEF 2023-01-28 12:09:45 -07:00
Matthias Clasen f89fa6dcfe Move name table to src/OT/name 2023-01-28 12:09:45 -07:00
Matthias Clasen b8193357c1 [OT::Color] Drop unused includes 2023-01-28 09:54:30 -07:00
Behdad Esfahbod 0f33ea8c4f [subset/COLR] Copy VarStore
Fixes https://github.com/harfbuzz/harfbuzz/issues/4085
2023-01-27 11:26:57 -07:00
Qunxin Liu 5e86870378 [instancer] compute head/maxp values using only non-empty glyphs 2023-01-25 14:53:19 -07:00
Qunxin Liu d15551c6f3 [instancer] update head table flagbit: allXMinIsLsb 2023-01-25 14:53:19 -07:00
Behdad Esfahbod a4420479a8 Revert "[VarComposite] Fix skew"
This reverts commit 8cf7076309.
2023-01-25 14:37:10 -07:00
Behdad Esfahbod 8cf7076309 [VarComposite] Fix skew 2023-01-25 14:35:35 -07:00
Qunxin Liu 90a98dd62a [instancer] fix potential memory leak for compiled glyph bytes
Also calculate max_offsets after glyph bytes are compiled, cause byte
length of a glyph might change after compile
2023-01-25 11:37:19 -07:00
Qunxin Liu 27f72f0deb [instancer] avoid double free for compiled glyph bytes
also increase the HB_GLYF_MAX_POINTS limit to 20000 cause the test file has a
.notdef glyph which is a composite glyph and has 10176 points after
get_points() call
2023-01-24 17:28:51 -07:00
Behdad Esfahbod 72e13fff65 [COLRv1] Handle void extents 2023-01-24 11:05:38 -07:00
Behdad Esfahbod 20318feddf [COLRv1] Don't return extents if glyph has no paint
Fixes https://github.com/harfbuzz/harfbuzz/issues/4068
2023-01-24 11:04:10 -07:00
Behdad Esfahbod b987918125
Merge pull request #4052 from googlefonts/instancer_recalc_bounds
[instancer] recalc bounds by default when --instance option is enabled
2023-01-22 09:08:51 -07:00
Behdad Esfahbod 749df4ee84 [PairPosFormat1] One more 2023-01-21 16:00:54 -07:00
Behdad Esfahbod b648ceb72f [PairSet] Optimize last commit 2023-01-21 15:58:59 -07:00
Behdad Esfahbod 891623243c [PairSet] Unify get_size() 2023-01-21 15:57:18 -07:00
Behdad Esfahbod b63159e8bf [PairPosFormat1] Fix stride
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55287
and generally the lookup with MediumTypes.
2023-01-21 15:51:40 -07:00
Behdad Esfahbod be8a87c453 Move TRACE_DISPATCH after may_recurse()
Such that we don't get memory access issues if DEBUG_SANITIZE is
on and may_recurse() returns false.
2023-01-21 15:50:25 -07:00
Qunxin Liu 30058f489a [instancer] trim .notdef outline data after recalc bounds
If outline data present, we use it to recalc bounds and then trim it
accordingly
2023-01-20 14:50:03 -08:00
Qunxin Liu 94c390d078 [instancer] update head table 2023-01-20 14:50:03 -08:00
Qunxin Liu 2ecb1c31e9 [instancer] always recalculate bounds when --instance option enabled
But don't recompile glyph bytes if pinned at default
2023-01-20 14:50:03 -08:00
Qunxin Liu 1f948e7fd5 [instancer] store recalculated head/maxp info in subset plan 2023-01-20 14:49:54 -08:00
Qunxin Liu 92122421c9 [instancer] update vhea/hhea tables 2023-01-20 14:48:53 -08:00
Behdad Esfahbod 638e0ed4fd [paint] Overlay custom-palette on top of chosen palette
Got to agree this is more ergonomic.
2023-01-20 13:57:39 -07:00
Behdad Esfahbod d06976e68f [glyf] Add an edge-count limit
Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55246
2023-01-20 08:21:43 -07:00
Behdad Esfahbod 0b32cf9023 [COLR] Rename a variable 2023-01-18 21:16:38 -07:00
Behdad Esfahbod 7aca3b5090 [COLRv1] Hook up custom palette colors 2023-01-18 21:01:44 -07:00
Behdad Esfahbod eed5d5efdd [VarComposite] Implement RESET_UNSPECIFIED_AXES
Fixes https://github.com/harfbuzz/boring-expansion-spec/issues/79
2023-01-18 14:13:12 -07:00
Behdad Esfahbod e4a41f5e16 [COLRv1] Implement recursive clip boxes
Tests need update.

hb-view test_glyphs-glyf_colr_1_variable.ttf -u f0c00
2023-01-16 16:27:04 -07:00
Behdad Esfahbod ed023f66df Enable -Wformat-signedness
And fix the codebase.
2023-01-12 17:04:24 -07:00
Behdad Esfahbod cfb672f1e5 [glyf] Revert sign of advance widths back 2023-01-12 11:59:18 -07:00
Behdad Esfahbod 65d3db375c [subset-plan] Simplify user_axes_location allocation 2023-01-11 12:36:54 -07:00
Behdad Esfahbod 75b33cb04b [subset-plan] Simplify hmtx_map / vmtx_map allocation 2023-01-11 12:24:35 -07:00
Behdad Esfahbod 33ce3a0d44 [subset] Minor adjust a couple types 2023-01-11 12:21:26 -07:00
Behdad Esfahbod b33eb9ecfc [subset-plan] Simplify layout_variation_idx_delta_map allocation 2023-01-11 11:20:04 -07:00
Behdad Esfahbod 9c45d98f73 [subset-plan] Simplify colr_palettes allocation 2023-01-11 11:16:18 -07:00
Behdad Esfahbod b74a265196 [subset-plan] Simplify colrv1_layers allocation 2023-01-11 11:15:15 -07:00
Behdad Esfahbod 5fc91de2c0 [shape-plan] Simplify _glyphset_colred allocation 2023-01-11 11:04:17 -07:00