src/OT/glyf


Log

Author Commit Date CI Message
Behdad Esfahbod e0c6c980 2025-03-02T13:32:54 [VARC] Implement get_extents() Fixes https://github.com/harfbuzz/harfbuzz/issues/5007
Behdad Esfahbod 64dbeaf0 2025-02-28T00:54:39 [glyf] Mover decycler to the scratch pad
Behdad Esfahbod 44b7ba51 2025-02-26T13:47:45 [GVAR] Hide behind HB_NO_BEYOND_64K
Behdad Esfahbod 13900ce4 2025-02-26T13:41:52 [GVAR] Hook up to face and glyf table
Behdad Esfahbod 84ffb7e4 2025-02-26T12:51:04 [SimpleGlyph] Minor use an intermediate variable
Behdad Esfahbod 54db2b2e 2025-02-26T12:48:55 [SimpleGlyph] Remove a conditional from hot path 5% speedup in Roboto-Regular draw benchmark
Behdad Esfahbod 51d3489c 2025-02-26T12:09:31 [Composite] Fix memory-free rendering
Behdad Esfahbod 59e6a1c4 2025-02-26T11:16:04 [glyf/Composite] Malloc-free
Behdad Esfahbod fcbf14a0 2025-02-25T20:16:18 [CompositeGlyph] Adjust pre-allocation
Behdad Esfahbod 6ca8852e 2025-02-25T19:57:43 [glyf] Return earlier if table is empty
Behdad Esfahbod 7614320a 2025-02-25T16:59:37 [glyf] Reduce malloc pressure Benchmark 15% faster for draw.
Behdad Esfahbod 882d3288 2025-02-25T16:34:55 [glyf] Port to decycler for composite glyphs 5% speed up drawing Roboto-Regular.ttf.
Behdad Esfahbod 7222c1e5 2025-02-25T15:13:20 [path-builder] Add a constexpr
Behdad Esfahbod 76c3beaf 2025-02-24T19:50:51 [VARC] Reduce malloc overhead
Behdad Esfahbod 2032da01 2025-02-18T20:54:56 [ot-font] Centralize painting an outline glyph
Behdad Esfahbod d2a88fbd 2025-02-12T21:48:22 [vector] Add alloc_exact()
Behdad Esfahbod 4b54ee11 2025-02-09T12:38:58 [glyf] Change drawing algorithm to match FreeType / CoreText
Behdad Esfahbod f68193a0 2025-02-09T11:43:07 [glyf] Use direct access to points array Not necessary faster. Prep'ing for next change.
Behdad Esfahbod 4ec3cb0f 2024-06-06T11:47:18 [Glyph] Don't round to int when shifting glyphs Fixes a fuzzer issue and seems harmless.
Behdad Esfahbod e8139bea 2024-03-27T11:39:32 Revert "[varc] Reuse x_deltas and y_deltas vectors" This reverts commit 604f27b3069f2ef11b045cfb35e8c3a5fd99fb8b. Not worth it.
Behdad Esfahbod f97d1ea2 2024-03-27T11:38:58 [varc] Reuse x_deltas and y_deltas vectors Going to revert since it has minimal improvement with lots of piping through.
Behdad Esfahbod 3d846a8d 2024-03-16T21:49:17 [limits] Centralize graph edge limits
Behdad Esfahbod bb3bfe8c 2024-03-16T14:02:16 [glyf] Remove old glyf1 VarComposites support
Behdad Esfahbod a94a5c63 2024-04-16T17:10:43 [varc] Add get_point_at to glyf/CFF2
Ozkan Sezer c2f8f35a 2024-03-15T18:45:24 Use inttypes.h PRI?32 macros in format strings for [u]int32_t args. This is a modified and cleaned-up version of PR #4619 by @jpcomito: hb-common.h now expects 'inttypes.h' presence with MSVC exceptions, defines __STDC_FORMAT_MACROS in there (if not already defined) and undoes c930ae2 (PR #1974) and 902ab86. Co-authored-by: jcomito <jcomito@google.com>
Behdad Esfahbod 595def8f 2024-03-14T12:34:39 Revert "Fixing compiler warnings" This reverts commit 61a1ba2ff0fc1b1ed9db0b7c1dd0f59a4312e6e6.
jcomito 61a1ba2f 2024-03-12T21:34:14 Fixing compiler warnings All warning are for format specifiers (-WFormat) in sprintf().
Qunxin Liu 52c3cda3 2024-01-26T10:55:57 [instancer] add composite_new_gids set in subset plan This is only used by iup delta optimization where we need to know whether glyph is composite or not
Behdad Esfahbod 2023384b 2023-08-22T13:09:26 Merge pull request #4368 from googlefonts/support_gvar Initial implementation for gvar partial instancing
Behdad Esfahbod 06ff3bcb 2023-08-15T14:41:18 [COLR,glyf] Use map instead of set for tracking current glyphs / layers
Behdad Esfahbod b530e485 2023-08-15T14:31:40 [glyf] Don't recuse into alread-active composite glyphs Deny loops.
Qunxin Liu eb116e16 2023-07-28T15:27:07 [instancer] Add new_gid->contour_points vector map in subset plan - Add an API in Glyph to export original contour_points vector, which is needed by infer_deltas when merging tuple variations with the same tent
Behdad Esfahbod 7f5380fe 2023-07-02T12:19:22 [Composite] Don't apply transformation if phantom_only
Behdad Esfahbod 0cf759b0 2023-07-02T12:15:43 [Glyph] Don't shift anchored Composite if phantom_only Fixes https://oss-fuzz.com/testcase-detail/5114131137822720
Behdad Esfahbod 645bde47 2023-07-02T12:07:22 [Glyph] Pass phantom-only to gvar only for SIMPLE glyphs For Composites we need to get the translation offset deltas.
Behdad Esfahbod 794fac32 2023-06-29T20:55:52 [glyf] Minor another range for loop
Behdad Esfahbod 0ae16766 2023-06-29T20:38:42 [CompositeGlyph] Minor use a range for loop
Behdad Esfahbod 05c01ad5 2023-06-29T16:49:20 [SimpleGlyph] Minor use a range for loop
Behdad Esfahbod 4123e0c7 2023-06-29T16:27:35 [path-builder] Speed up mid-point calculation
Behdad Esfahbod ca44c38c 2023-06-29T14:41:21 Add HB_ALWAYS_INLINE With MSVC implementation as well.
Behdad Esfahbod c49ca371 2023-06-29T12:38:45 [Glyph] Minor micro-optimize away a function call For when coords are not set.
Behdad Esfahbod 5fb7b02a 2023-06-29T12:28:43 [CompositeGlyph] Minor use range loop
Behdad Esfahbod 20b32b04 2023-06-29T12:08:11 [SimpleGlyph] Micro-optimize phantom_only
Behdad Esfahbod 04809ede 2023-06-29T11:58:53 [CompositeGlyph] Micro-optimize translate()
Behdad Esfahbod 229db973 2023-06-29T11:54:10 [CompositeGlyph] Minor use vector::push()
Behdad Esfahbod 75101802 2023-06-29T10:54:49 [CompositeGlyph] Micro-optimize
Behdad Esfahbod e9d74d6b 2023-06-29T10:53:52 [SimpleGlyph] Minor add an unlikely to error condition
Behdad Esfahbod 6abca413 2023-06-29T10:39:49 [path-builder] Micro-optimize No need to initialize these when has_data=false.
Behdad Esfahbod 5703c1c4 2023-06-29T10:35:23 [path-builder] Add a couple of unlikely's
Behdad Esfahbod f5eead04 2023-06-28T15:07:15 [glyf/gvar] Optimize getting variable phantom points Used when there's no HVAR table and get_h_advance(). I see some 10% speedup with a SourceSerifVariable-Roman with the HVAR table removed.
Behdad Esfahbod e42d6df5 2023-06-28T14:25:11 [glyf] Minor refactor a couple of lines and micro-optimize
Behdad Esfahbod c31471d1 2023-06-28T13:51:54 [glyf] Micro-optimize
Behdad Esfahbod 83d75d5e 2023-06-28T13:35:24 [glyf] always_inline consume_point 7% speedup in: BM_Font/draw_glyph/Roboto-Regular.ttf/hb
Behdad Esfahbod 8795cced 2023-06-28T13:29:29 Revert "[SimpleGlyph] Avoid branches in read_points" This reverts commit ba062c713e469f91f57f3c85990f721789ec7c2a.
Behdad Esfahbod ba062c71 2023-06-28T13:24:37 [SimpleGlyph] Avoid branches in read_points Calculate total bytes in read_flags and bounds-check once. This slows things down apparently, so going to revert.
Behdad Esfahbod 452557cd 2023-06-26T18:40:54 Replace a free with hb_free Ouch.
Behdad Esfahbod 1fc128f6 2023-06-26T18:34:27 Replace a few memset/memcpy's with hb_ equivalents
Behdad Esfahbod 15048e50 2023-06-04T10:07:04 [serialize] Add more function attributes
Behdad Esfahbod 82741304 2023-06-04T09:41:41 [subset] start_embed never returns nullptr Remove checks.
Behdad Esfahbod af3fdf1f 2023-06-04T09:22:42 [subset/glyf] Simplify error handling
Behdad Esfahbod 3dd1de46 2023-06-04T09:15:14 [subset/glyf] Fix a few return_trace's
Behdad Esfahbod 73f2f935 2023-06-04T09:12:18 [subset/glyf] Fix another leak
Behdad Esfahbod 3d08a2f1 2023-06-03T23:38:38 [subset/glyf] Fix leak
Behdad Esfahbod fc33200d 2023-06-03T23:29:39 [subset/glyf] Avoid a vector copy Oops!
Behdad Esfahbod 3bfcbd61 2023-06-03T23:17:56 [subset/glyf] Minor use range lopp
Behdad Esfahbod 917c8d0a 2023-06-03T23:15:56 [subset/glyf] Minor change of value
Behdad Esfahbod 87cf09bd 2023-06-03T21:00:56 [subset/loca] Fix up for retaingid null glyphs at the end We currently don't have those, but in case we add.
Behdad Esfahbod 38fa0323 2023-06-03T18:51:09 Revert "[subset/loca] Build in the serializer memory" This reverts commit 546b51818666ca1ddb01824f752eccbd6a751b4b.
Behdad Esfahbod 546b5181 2023-06-03T18:50:35 [subset/loca] Build in the serializer memory Because it's hot. Doesn't seem to speed up though. Slight slowdown. Going to revert.
Behdad Esfahbod 3cb2b49e 2023-06-03T18:44:56 [subset/loca] Shuffle code around
Behdad Esfahbod b0d0babb 2023-06-03T17:14:55 [subset/loca] Rewrite loop faster
Behdad Esfahbod ca27925d 2023-06-03T16:18:15 Use hb_codepoint_pair_t in more places
Behdad Esfahbod c7493efe 2023-06-03T15:39:27 [subset/loca] Micro-optimize
Behdad Esfahbod efefec13 2023-06-02T20:33:52 [subset/glyf] Remove unneeded codepath
Behdad Esfahbod ac1f5ca0 2023-06-02T17:07:44 [subset/loca] Micro-optimize
Behdad Esfahbod 6eae9325 2023-06-02T17:05:27 [subset/loca] Reduce a vector allocation
Behdad Esfahbod ec8965e4 2023-06-02T16:10:25 [subset/glyf] Don't clear loca allocation
Behdad Esfahbod b67e464b 2023-06-02T15:11:06 [subset/retaingid] Regain perf lost In 0f12fd5a66a5dd1c3c9ac5ea8a52341bafcfe567
Behdad Esfahbod 0f12fd5a 2023-06-02T13:58:55 [subset/glyf] Fix for non-monotonic glyphmap Slows things down again, but is correct. Still a good win combined with the previous changes.
Behdad Esfahbod 66ce902c 2023-06-02T13:53:21 [glyf] Reduce allocation again
Behdad Esfahbod 0e0110e7 2023-06-02T13:34:58 [glyf] Avoid a SubsetGlyph copy Unfortunately hb_second() always does a copy...
Behdad Esfahbod 33ea8b5e 2023-06-02T13:10:52 [subset/glyf] Don't allocate empty SubsetGlyf's Shows 33% speedup on Mplus/retaingid/10 benchmark: Comparing before to after Benchmark Time CPU Time Old Time New CPU Old CPU New -------------------------------------------------------------------------------------------------------------------------------------------------------- BM_subset/subset_glyphs/Mplus1p-Regular.ttf/retaingids/10 -0.3296 -0.3294 0 0 0 0
Behdad Esfahbod b04ca1c1 2023-06-01T20:43:07 Revert "[subset/glyf] Exact allocation" This reverts commit a830f085c849846f8441f5d92d4db36130ef71f8. Weirdly enough in a benchmark I'm running I see this show some slowdown. Makes zero sense.
Behdad Esfahbod a830f085 2023-06-01T20:37:29 [subset/glyf] Exact allocation
Behdad Esfahbod ff0b85cf 2023-06-01T20:30:56 [subset/glyf] Empty .notdef only if old-gid was also 0 Otherwise it wasn't a .notdef, even if new-gid is 0.
Behdad Esfahbod 65a7d8c6 2023-06-01T20:20:00 [glyf] Empty glyphs need no padding
Behdad Esfahbod 73c18d1d 2023-06-01T20:06:42 [glyf] Micro-optimize padded_offsets
Behdad Esfahbod 4d853b8b 2023-06-01T18:47:58 [subset/regaingid/glyf] Add a fastpath for empty glyphs Mplus benchmark: Comparing before to after Benchmark Time CPU Time Old Time New CPU Old CPU New ----------------------------------------------------------------------------------------------------------------------------------------------------------- BM_subset/subset_glyphs/Mplus1p-Regular.ttf/retaingids/10 -0.1764 -0.1771 0 0 0 0 BM_subset/subset_glyphs/Mplus1p-Regular.ttf/retaingids/64 -0.1394 -0.1394 0 0 0 0 BM_subset/subset_glyphs/Mplus1p-Regular.ttf/retaingids/512 -0.0644 -0.0645 0 0 0 0 BM_subset/subset_glyphs/Mplus1p-Regular.ttf/retaingids/4096 +0.0132 +0.0131 1 1 1 1 BM_subset/subset_glyphs/Mplus1p-Regular.ttf/retaingids/10000 -0.0029 -0.0034 3 3 3 3 BM_subset/subset_glyphs/Mplus1p-Regular.ttf/10 +0.0364 +0.0362 0 0 0 0 BM_subset/subset_glyphs/Mplus1p-Regular.ttf/64 +0.0346 +0.0343 0 0 0 0 BM_subset/subset_glyphs/Mplus1p-Regular.ttf/512 +0.0271 +0.0268 0 0 0 0 BM_subset/subset_glyphs/Mplus1p-Regular.ttf/4096 +0.0193 +0.0193 1 1 1 1 BM_subset/subset_glyphs/Mplus1p-Regular.ttf/10000 -0.0240 -0.0243 2 2 2 2 OVERALL_GEOMEAN -0.0305 -0.0307 0 0 0 0
Behdad Esfahbod 6ec7629f 2023-06-01T18:18:30 [subset/glyf] Add a const
Behdad Esfahbod 208c9490 2023-05-26T12:02:03 [VarComposite] Limit number of axes that are copied Bandaid for https://oss-fuzz.com/testcase-detail/4591122882887680
Behdad Esfahbod 5872bdf6 2023-05-26T11:41:54 [vector] Add copy-constructor for array_t's
Behdad Esfahbod 5543d058 2023-05-17T17:29:44 [subset] Use vector instead of map for glyph bounds (#4232) * [subset] Use vector instead of map for glyph bounds Is faster. Part of https://github.com/harfbuzz/harfbuzz/issues/4231 * [subset] initialize bounds_vec value to 0xFFFFFFFF Some non-EMPTY glyph might have 0 bounds width/height --------- Co-authored-by: Qunxin Liu <qxliu@google.com>
Qunxin Liu bf298e50 2023-05-01T13:40:19 [instancer ]update OS_2/post/glyf tables to accept Triple for axes positions
Behdad Esfahbod 33ef96b6 2023-05-09T11:13:51 [glyf] Micro-optimize a few hash operations
Behdad Esfahbod 2f9945ca 2023-05-02T11:33:31 [Glyph] Only treat numContours=-1 as Composite Leave the other negative numbers as empty glyph.
Garret Rieger db23be64 2023-05-02T00:06:08 [subset] clamp head *Min/*Max values to fit within 16 bit signed int. Fixes fuzzer https://oss-fuzz.com/testcase-detail/4549472192692224.
Behdad Esfahbod 19d8328b 2023-05-01T15:54:06 [VarComposite] Minor use pad instead of StructAfter
Behdad Esfahbod 1cbb85dc 2023-04-30T11:31:46 [Glyph] Protect against an underflow
Behdad Esfahbod c7721f7d 2023-04-30T11:28:40 [Glyph] Reuse variables
Behdad Esfahbod fbffd4e6 2023-04-30T10:45:19 [SimpleGlyph] Handle cubic curves when instancing