src/OT/glyf

Branch


Log

Author Commit Date CI Message
Behdad Esfahbod 82370913 2025-09-15T20:16:52 [vector] Simplify resize()
Garret Rieger dd347eb4 2025-07-23T19:22:19 [VARC] fix potential unitialized value use in get_extents_without_var_scaled. Callers of get_extents_without_var_scaled assume it will set extents if it has returned true.
Behdad Esfahbod de2efbf3 2025-07-21T22:40:57 [glyf] Another OOM fix
Behdad Esfahbod c0052d17 2025-07-21T19:19:05 [ot-font] Handle scratch alloc failures Might fix https://issues.oss-fuzz.com/issues/433311403
Behdad Esfahbod 307a19f2 2025-07-20T00:32:45 [glyf] Minor micro-optimize
Behdad Esfahbod abcefb69 2025-07-19T06:57:03 [glyf] Remove dead code
Behdad Esfahbod 7a41150f 2025-07-19T06:36:13 [ot-font] Use glyf scratch in v-advances
Behdad Esfahbod a40f85af 2025-07-19T06:18:06 [font] Acquire a scratch for v-origins Still too slow.
Behdad Esfahbod 76357479 2025-07-19T06:15:29 [glyf] Non-var-optimize a method
Behdad Esfahbod 0dc5f8a2 2025-07-19T06:07:37 [ot-font] Finish caching of v-origins On to benchmarking...
Behdad Esfahbod e697e4d3 2025-07-19T05:48:08 [ot-font] More baby steps towards caching v-origins
Behdad Esfahbod fdf4c759 2025-07-17T23:40:41 [hmtx] Simplify get-leading code Can't return false. The false was being used before to mean "table not present". Handle that instead.
Behdad Esfahbod b359c83c 2025-07-17T23:27:27 [ot-font] Rewrite h/v-advance code Faster, better cached... 24% faster across the benchmarks for hmtx-only path. Comparing before to after Benchmark Time CPU Time Old Time New CPU Old CPU New ------------------------------------------------------------------------------------------------------------------------------------------------------------ BM_Font/glyph_h_advances/Roboto-Regular.ttf/ot -0.2410 -0.2411 2 1 2 1 BM_Font/glyph_h_advances/RobotoFlex-Variable.ttf/ot -0.2482 -0.2484 1 1 1 1 BM_Font/glyph_h_advances/RobotoFlex-Variable.ttf/var/ot -0.0296 -0.0296 48 47 48 47 BM_Font/glyph_h_advances/SourceSansPro-Regular.otf/ot -0.2412 -0.2416 2 2 2 2 BM_Font/glyph_h_advances/SourceSansPro-Regular.otf/var/ot -0.2381 -0.2384 2 2 2 2 BM_Font/glyph_h_advances/AdobeVFPrototype.otf/ot -0.2347 -0.2349 0 0 0 0 BM_Font/glyph_h_advances/AdobeVFPrototype.otf/var/ot -0.0343 -0.0346 2 2 2 2 BM_Font/glyph_h_advances/SourceSerifVariable-Roman.ttf/ot -0.2623 -0.2621 2 1 2 1 BM_Font/glyph_h_advances/SourceSerifVariable-Roman.ttf/var/ot -0.0388 -0.0401 24 23 24 23 BM_Font/glyph_h_advances/Comfortaa-Regular-new.ttf/ot -0.2396 -0.2394 1 1 1 1 BM_Font/glyph_h_advances/NotoNastaliqUrdu-Regular.ttf/ot -0.2344 -0.2346 2 1 2 1 BM_Font/glyph_h_advances/NotoSerifMyanmar-Regular.otf/ot -0.2366 -0.2367 1 1 1 1 OVERALL_GEOMEAN -0.1945 -0.1948 0 0 0 0
Behdad Esfahbod e81efe3a 2025-07-11T01:40:23 [glyf] Add TODO
Behdad Esfahbod 47089fe7 2025-05-28T17:10:22 Big misc changes - Make geometry types into templates taking float or double. - Changes to paint() transform elimination. - Add font->has_nonzero_coords and use it across. - Extensions to avar processing for otherwise invalid mappings.
Behdad Esfahbod 8eb2f07c 2025-05-26T13:21:25 Merge branch 'main' into HVF
Behdad Esfahbod e1dcc454 2025-05-21T16:00:08 [gvar] Use cached scratch in get_extents Makes it alloc-free. 15% faster on benchmark-font glyph_extents RobotoFlex var benchmark.
Behdad Esfahbod a13fd9ae 2025-05-21T12:23:19 Merge branch 'main' into HVF
Behdad Esfahbod c6097698 2025-05-16T01:10:43 [ot-font/draw] Use a gvar shared-tuple scalar cache for calculate_scalar Massive saving on massively variable fonts. Over 30% on a tested font.
Behdad Esfahbod a9ed7515 2025-04-20T04:35:44 Merge branch 'main' into HVF
Behdad Esfahbod 27b2e16a 2025-04-20T04:34:40 [atomic] Make cmpexch() non-const Was a mistake. Make the affected members mutable instead.
Behdad Esfahbod 5402fe24 2025-03-12T23:06:11 Merge branch 'main' into HVF
Behdad Esfahbod 4807a021 2025-03-12T18:27:27 [atomic] Kill hb_atomic_ptr_t<T> Use hb_atomic_t<T *> instead.
Behdad Esfahbod d4bf8a77 2025-03-02T17:03:15 [glyf] Regain speed if variations are all zero We always have coords array populated now... Check for non-zero.
Behdad Esfahbod 9b6da299 2025-03-02T17:00:14 [font/var] Try to regain performance of all-normalized-coords=0
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