Commit Graph
16540 Commits
Author SHA1 Message Date
Behdad EsfahbodandClaude Sonnet 5 bbfe29975d [raster] Cap font-derived surface dimensions at 4096 pixels per side
When no extents are set explicitly, the paint and draw contexts
derive the surface size from font data: glyph extents (which the
auto path in hb_raster_paint_glyph_impl () feeds through
set_glyph_extents ()) or the accumulated outline bounds in
hb_raster_draw_render ().  A malicious font with a tiny upem and
huge glyph coordinates turns that into arbitrarily large
allocations: a 49 KB fuzz font produced several ~885 MB BGRA
surfaces live at once (root surface plus one per PaintComposite
push_group), nearly 4 GB total.

Add HB_RASTER_MAX_AUTO_DIMENSION (4096) to hb-limits.hh and clamp
width/height at the three font-derived sizing points: both
set_glyph_extents () implementations and draw render's
auto-size-from-edges path.  Since push_group and clip surfaces
inherit fixed_extents, the cap bounds those too.  Extents set
explicitly via hb_raster_{draw,paint}_set_extents () are not
limited.

Fixes an hb-raster-fuzzer out-of-memory finding (testcase
6344015149858816): peak RSS 3.47 GB before, 350 MB after.
Testcase added as a fuzz seed.  Full meson test suite passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-10 13:14:53 -06:00
Behdad EsfahbodandClaude Sonnet 5 c2b6b09ed2 [raster] Fix signed overflow computing row bottom at coordinate limit
edge_sweep_row () computed y_bot = y_top + ONE_PIXEL in int32.  The
scanline loop clamps y_top itself to INT32_MAX, but when the surface
sits at the extreme of the 24.8 fixed-point coordinate space y_top
can be within ONE_PIXEL of INT32_MAX (0x7FFFFF00), and the addition
overflows: UBSan "2147483392 + 256 cannot be represented in type
'int'".

Saturate the addition at INT32_MAX using the same 64-bit-then-clamp
idiom already used for y_top and the x interpolation.  Edges are
int32-clamped too, so no coverage exists beyond INT32_MAX and the
clipped bottom band loses nothing real.

Fixes ClusterFuzz issue 541858526 (testcase 5513551012495360).
Reproduced with a -Db_sanitize=undefined build: one UBSan report
before, clean after.  Testcase added as a fuzz seed.  Full meson
test suite passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-10 12:55:45 -06:00
Behdad EsfahbodandClaude Sonnet 5 d94c18b6a6 [subset] Clamp variable advances to UFWORD range in plan
When instancing, the hmtx/vmtx advance is computed by adding the
HVAR/VVAR delta to the base advance.  The delta is attacker-
controlled and unbounded, so the sum can go negative or exceed
65535.  The negative case, cast to unsigned, produced advances
near 4 billion in hmtx_map; CFF::optimize_widths () then looped
over the full [min_w, max_w] width range, taking minutes (the
oversized cumsum resize fails cleanly, so this was a pure hang,
no memory unsafety).

Clamp the computed advance to [0, 0xFFFF], matching the UFWORD
range that hmtx/vmtx serialization stores and the hb_max (0.f, …)
clamp already used by the runtime metrics path.

Fixes a ClusterFuzz timeout in hb-subset-fuzzer (testcase
4846730722738176, minimized from timeout-fd8f4bd2a650).  The
testcase went from >60s to 5ms; added as a fuzz seed.  Full
meson test suite passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-10 12:47:41 -06:00
Behdad Esfahbod 7a2a501c2e [kern] Avoid rescanning skipped glyphs (#6143)
When the skipping iterator fails to find another kernable glyph,
resume at the position it reports instead of retrying from the next
glyph. This prevents a suffix of ignored marks from being scanned
repeatedly while preserving later feature ranges.

Assisted-by: OpenAI Codex <codex@openai.com>
2026-08-09 23:45:50 -06:00
Behdad Esfahbod c14ad7c6cb [aat] Fix insertion at end of text (#6142)
Insertion state machines may emit glyphs during the end-of-text transition, when the buffer has no current input glyph. Emit the glyph first in that case and apply AAT metadata to the new output glyph instead of buffer->cur().

Add a regression font whose end-of-text action inserts the AAT deleted-glyph sentinel.

Assisted-by: OpenAI Codex <noreply@openai.com>
2026-08-09 12:37:15 -06:00
Behdad Esfahbod 9f2f03173b [gpu] Fix coverage sign of the split-ray optimization (#6133)
_hb_gpu_slug_single casts its horizontal ray leftward or rightward
depending on which side of the band's split point the fragment is on,
and likewise for the vertical ray.  The crossing signs it accumulates
are the same either way.

But over a closed contour the signed crossings of a line sum to zero,
so counting the crossings on the left gives exactly the negative of
counting them on the right (clamp(0.5 + u) + clamp(0.5 - u) == 1, so
this holds for the antialiased partial coverages too).  Whenever
hLeftRay and vLeftRay disagree, xcov and ycov therefore came out with
opposite signs, and _hb_gpu_calc_coverage's

  abs (xcov * xwgt + ycov * ywgt) / (xwgt + ywgt)

subtracted the two estimates instead of averaging them.

Glyph interiors were unaffected -- the min (abs (xcov), abs (ycov))
term floors the result there -- so this never showed as a hole.  It
showed as edges that antialias too light wherever both weights are
nonzero and the two estimates differ.

Flip the sign back after each loop.  With a CPU port of
_hb_gpu_slug_single, comparing against plain Slug (rightward rays
over the full curve list, which is what the sign convention in
_hb_gpu_calc_coverage assumes), util/gpu/default-font.ttf at scale
163 rendered at 107px had 1700 pixels differing by more than 0.05
before this change, always too dark, and none differing by more than
0.001 after -- the split optimization is now exact.

Same fix in all four shading languages.  The GLSL was checked with
glslc; the HLSL, MSL and WGSL edits are the same two statements and
were not machine-compiled.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 23:08:39 -06:00
Behdad Esfahbod dde1f1baee [gpu] Assign curves to bands using quantized bounds (#6132)
The fragment shader picks one horizontal and one vertical band from
the fragment position and walks only that band's curve list, so a
curve must be listed in every band its bounding box reaches into.

The encoder computed those bounding boxes from the unquantized
control points, but the shader only ever sees the coordinates after
they are rounded to quarter font units.  When rounding pushed a
curve's extreme across a band boundary, the curve was left out of the
band it now reached into.  Fragments landing in that sliver never saw
the curve, so their winding number was off by one and the pixel came
out empty in the middle of a filled area -- a thin black line through
the glyph, appearing and disappearing as the font size moves the
pixel grid.

The rounding error is at most an eighth of a font unit, so this is
invisible for an integer-coordinate glyph rendered at its own upem.
It gets easy to hit when the coordinates are fractional: CFF glyphs
after cu2qu, or any font whose hb_font_t scale is not its upem.  With
hb_font_set_scale(font, 163, 163), as in issue #6131, more than half
of the glyphs of util/gpu/default-font.ttf had at least one band the
shader could reach but that did not list the curve.

Compute the bounds (and the is_horizontal/is_vertical tests) from the
quantized control points instead, and widen the band range by 1/1024
of a band so that the double arithmetic here cannot disagree with the
shader's float32 band index right at a boundary.

Verified with a CPU port of _hb_gpu_slug_single: comparing the banded
lookup against a walk over every curve of the glyph, at sizes 39, 47
and 107 with scale 163, default-font.ttf had 27 wrong pixels before
and none after.  Encoded atlas size grows by 0.12%.

Adds test_encode_band_membership, which checks the invariant directly
on the encoded blob and fails before this change.

Assisted-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-04 22:41:56 -06:00
Khaled Hosny 5c6b25e2b1 [avar2] Fix -Wdouble-promotion warnings (#6129)
Fixes https://github.com/harfbuzz/harfbuzz/issues/6126
2026-08-04 22:29:25 -06:00
Simon Cozens eaa7e3c737 Allow WASM shaper code to access features (#6139)
* Add WASM API to wrap features

* Access features through WASM FFI
2026-08-04 13:56:18 -06:00
Garret Rieger c31bd6797a More documentation for traverse_directed_bfs(). 2026-07-31 18:05:07 -06:00
Garret Rieger 197d38a8a3 [subset] Convert repacker graph traversals to BFS.
None of the traversals require DFS order so BFS can be used instead which eliminates the possibility of stack overflow. For the queue we re-use the existing ordering_scratch_ space to avoid allocating any additional memory. As a bonus this fixes a bug in find_32bit_roots() that was the result of DFS traversal order.

All of the directed traversal methods are unified to a single common implementation.
2026-07-31 18:05:07 -06:00
Khaled Hosny 1d8fe7367b [depend] Fix build with HB_NO_MATH, HB_NO_COLOR, and HB_NO_CFF
Fixes https://github.com/harfbuzz/harfbuzz/issues/6127
2026-07-31 18:48:42 +03:00
Khaled Hosny 4c2aa80467 14.3.0 2026-07-31 17:49:40 +03:00
punishell 51e229759f Merge commit from fork
Follow-up to #6090 (GHSA-h2xh-wmpf-pwp5).  #6090 saturated the
float->int conversions in emit_segment() via hb_clamp_to<int32_t>, but a
saturated edge endpoint (INT32_MAX) then overflows the ceil-round in the
auto-size path of hb_raster_draw_render():

  int x1 = (xmax + HB_RASTER_PIXEL_MASK) >> HB_RASTER_PIXEL_BITS;

With xmax == INT32_MAX this is INT32_MAX + 255, signed overflow (UB).
UBSan fires on the accepted PoC (single spec-legal PaintTransform,
scale 32767.99) at the first painted glyph.  Widen the +MASK step to
int64_t before the shift.

Also saturate the four float->int corner conversions in
hb_raster_paint_push_clip_rectangle() through hb_clamp_to<int32_t>, the
same unguarded pattern #6090 clamped elsewhere in this file (reachable
via PaintColrGlyph under a large PaintTransform); the subtraction is done
in double to avoid overflow, and NaN maps to INT32_MIN.

Verified with -fsanitize=address,undefined: the PoC (NEST=1 and NEST=9)
and full-font render of the base font produce zero runtime errors;
without the draw.cc change the PoC reports the signed-overflow above.
2026-07-31 01:08:01 -06:00
Khaled Hosny 86e7473f0d [ot] Add hb_ot_fetch_number()
Similar to hb_ot_fetch_bits() but for signed numbers.

The only tags so far are for font bounding box from head table.

Fixes https://github.com/harfbuzz/harfbuzz/issues/6110
2026-07-31 04:31:26 +03:00
Khaled Hosny 6e67c5feed [ot] Add hb_ot_fetch_bits()
For fetching various bit fields scattered around OpenType tables. Many of
these are legacy or unreliable, but applications might need them for
various legacy reasons.

Fixes https://github.com/harfbuzz/harfbuzz/issues/1920
2026-07-31 04:31:26 +03:00
Khaled Hosny 9d7bba088a Try to fix msan bot (#6124)
* [test/fuzzing] Skip hb-depend-closure-parity without GLib

It depends on GLib unlike the other fuzzers.

* [ci] Build the msan bot without external dependencies

We don’t care about msan errors in code that is not ours, and some
libraries like GLib are not built with memory sanitizers in mind.

* [ci] Don't pipe sanitizer test output

The pipe was masking meson exit status, and it was redundant anyway
since the sanitizer output is is already symbolized and demangled.

* [COLR] Fix integer overflow in get_extents

Use to_glyph_extents(), which guards against this.

Update test expectation since we now round instead of truncate.
2026-07-30 19:02:25 -06:00
Garret Rieger f9c31ea217 Respect HB_NO_AAT_SHAPE in KernSubTable::collect_glyphs (#6123)
Sanitize is skipped for subtable 1 and 3 when HB_NO_AAT_SHAPE is set, so it's not safe to run collect_glyphs in this case. This mirrors dispatch().
2026-07-30 15:59:54 -06:00
Garret Rieger ea78736648 Fix OOB access in _hb_ft_color_line_get_color_stops. (#6121)
Input count is not being respected when writing output. Also fixes potential infinite loop.
2026-07-30 15:45:35 -06:00
Behdad Esfahbod 12b686dad7 [shape] Limit syllable length (#6120)
Unbounded syllables can make the USE and Myanmar reordering passes
perform quadratic work. Process syllables in configurable chunks of at
most 64 glyphs to bound the work performed by each reordering pass.

Fixes: https://github.com/harfbuzz/harfbuzz/issues/6118
Assisted-by: Codex <codex@openai.com>
2026-07-30 15:44:57 -06:00
Behdad Esfahbod c7ed9fe764 [ot] Bound Condition sanitization recursion (#6119)
Route Condition sanitization through the dispatch machinery under the
sanitize context's standard nesting limit.  Make the condition format
sanitizers public so the sanitize context can dispatch to them.

Fixes: https://github.com/harfbuzz/harfbuzz/issues/6116
Assisted-by: OpenAI Codex
2026-07-30 15:17:41 -06:00
Behdad Esfahbod dcb18ae6d0 Merge pull request #5767 from harfbuzz/avar2-instancing
Avar2 instancing
2026-07-30 14:50:34 -06:00
Khaled Hosny 6b6f0d9770 [GPOS] Apply mark-attachment cross-direction offsets immediately
Fixes https://github.com/harfbuzz/harfbuzz/issues/4596

See the issue for more details.

Instead of deferring mark positioning to the end of GPOS application, we
now apply cross-direction offsets (y-direction in horizontal text)
immediately and keep applying main-direction (x-direction in horizontal
text) as before.

This is still not 100% compatible with DirectWrite or Core Text (they
apply both directions immediately), but enough to fix the reported
issue.

Based on Behdad’s patch below, but fixes the Noto Nastaliq regression by
resolving the base offset through the whole cursive attachment chain
since cursive offsets are relative the previous glyph and get finalized
only at end of GPOS:
https://github.com/harfbuzz/harfbuzz/issues/4596#issuecomment-2276300688

The remaining failure is not a regression, the new expectation now match
DirectWrite and Core Text.

The tests include a subsetted bug font, as well as two constructed fonts
where curs lookup come before mark ones, once with kern before mark and
with kern after mark, to show that lookup order affects y but not
x-direction.
2026-07-30 23:27:22 +03:00
Behdad Esfahbod 14a2f6aa93 [subset] Reuse serializers for avar2 variation data
Build a DeltaSetIndexMap serialization plan for the retained axes and use
the existing DeltaSetIndexMap and ItemVariationStore serializers.

This replaces the duplicate manual encoding and object-linking logic while
preserving NO_VARIATION_INDEX entries and retained-axis ordering.

Tests: meson test -C build

Assisted-by: OpenAI Codex
2026-07-30 12:44:17 -06:00
Behdad Esfahbod a518a0e535 [subset] Deduplicate avar2 instancing state
Reuse old_intermediates for avar2 segment-map renormalization and IVS
rebasing instead of maintaining an identical plan map.

Fold the v1-only mapping and deferred region-list paths into their
existing helpers, and update the design notes to match.

Tests: meson test -C build

Assisted-by: OpenAI Codex
2026-07-30 12:43:52 -06:00
Behdad Esfahbod 7d752d66c7 [subset] Propagate avar2 planning failures
Treat missing axis mappings, invalid variation rows, and allocation
failures as hard errors instead of silently weakening culling or
skipping offset compensation.

Also propagate dead-region collection failures through ItemVariationStore
subsetting.

Tests: meson test -C build

Assisted-by: OpenAI Codex
2026-07-30 12:34:27 -06:00
Behdad Esfahbod 23a0aa4746 Merge branch 'main' into avar2-instancing 2026-07-30 12:20:25 -06:00
Behdad Esfahbod 3f003edf5c [subset] Fix msvc bot 2026-07-30 12:00:47 -06:00
Behdad Esfahbod 9af18b22f4 Merge pull request #6113 from behdad/codex-review-pr-5733
Dependency Graph Review Fixes
2026-07-30 12:00:42 -06:00
Behdad Esfahbod 07b0407cc7 Merge pull request #6098 from harfbuzz/marklig-multiple-subst
Fix mark attachments after decomposition then ligation
2026-07-30 11:57:18 -06:00
Behdad Esfahbod 0b07c784f8 [subset/gsubgpos] Fix sentinel value clash 2026-07-30 11:45:30 -06:00
Behdad Esfahbod c5eda499b4 Merge branch 'main' into codex-review-pr-5733 2026-07-30 11:40:20 -06:00
Behdad Esfahbod df5ce0d587 [config] Remove obsolete HB_SUBSET_DEPEND_API 2026-07-30 11:18:06 -06:00
Behdad Esfahbod 5ce238e297 [subset-serialize] Fix include 2026-07-30 11:16:45 -06:00
Behdad Esfahbod 25fc94439a Merge pull request #5733 from skef/depend-draft-pr
OpenType font dependency graph support
2026-07-30 11:12:48 -06:00
Behdad Esfahbod d8617e1e91 Fix an API nullable crash
Fixes https://github.com/harfbuzz/harfbuzz/issues/6112
2026-07-30 10:49:20 -06:00
Shubham Gupta 5b54d30ce7 hardcoded version string to lock shared library object name for aix platform 2026-07-29 20:33:19 +03:00
Behdad Esfahbod f26e0cd4ed [instancer] Fix HVAR partial instancing for map-less advance mappings (#6070)
* [instancer] Don't dedup VarStore rows when not optimizing

as_item_varstore dropped duplicate delta rows even with optimize=false,
where varidx_map is left empty and callers rely on original
VariationIndex values staying valid.  HVAR/VVAR subsetting uses that
mode when the source table has an implicit (map-less) advance mapping:
any two glyphs sharing identical deltas shifted every following row, so
the synthesized identity map pointed at wrong rows and past the end of
the VarData — advances silently froze or took neighbors' deltas when
partially instancing such fonts (e.g. Source Han fonts).

Fixes https://github.com/harfbuzz/harfbuzz/issues/6068

* [subset] Drop identity advance maps for map-less HVAR/VVAR sources

When the source table uses implicit glyph-id indexing, the subsetter
synthesized an advance DeltaSetIndexMap whose content was the identity
over every output glyph — equivalent to the implicit indexing it
replaced, just bigger.  Recognize that case in is_identity () and keep
the output map-less, like fontTools does.  Sources that carry a real
map keep one, preserving their form; truncated maps don't qualify since
glyphs past their end share the last value.

retain-num-glyphs expected files regenerated: NotoSansJP-VF.subset.otf
is map-less, and its redundant identity map is now dropped (verified
against fontTools output).

* [test/subset] Test partial instancing of map-less HVAR

ImplicitHVAR.ttf carries an HVAR with implicit (map-less) advance
indexing and deliberately duplicated delta rows, the combination that
broke before the row-dedup fix: rows shifted or fell off the end of the
rebuilt VarData and advances silently froze.  Expected outputs are
cross-checked against fontTools varLib.instancer + subset.
2026-07-29 11:29:23 -06:00
nussaibah shaikh 8c9307b59a [raster] clamp coordinates before converting to int (#6090)
* [raster] clamp coordinates before converting to int

the transformed glyph extents and the flattened segment endpoints are floats derived from int32 inputs and can land far outside the int range, so the conversions were undefined and the extent subtraction overflowed on top of that. saturate through a shared helper and widen the subtraction.

* [raster] generalize int32 saturating cast into hb_clamp_to<>

Move the raster-local hb_raster_clamp_to_int32 helper into hb-algs.hh
as a generic hb_clamp_to<T> that saturates a floating-point value to
the range of any integer type, and use hb_clamp_to<int32_t> at the
three raster call sites.

Signed-off-by: nussaiba shaikh <nussaibah@bugqore.com>

---------

Signed-off-by: nussaiba shaikh <nussaibah@bugqore.com>
2026-07-29 02:59:29 -06:00
Behdad Esfahbod da7f951ef0 Add more hb_barrier()s in switches (#6106)
Fixes https://github.com/harfbuzz/harfbuzz/security/advisories/GHSA-pmg2-m89x-pc6j
2026-07-27 19:20:18 -06:00
Khaled Hosny f3dea1e602 [subset] Add HB_SUBSET_FLAGS_CFF_IDENTITY_CHARSET
When set and subsetting a CID-keyed CFF font, the output charset is
written as identity: CID = new GID.
2026-07-27 22:12:16 +03:00
nussaibah shaikh 884f5a7991 [subset] guard scalars resize in cff2-to-cff1 blend encoder (#6093) 2026-07-27 10:59:22 -06:00
Behdad Esfahbod 72c6c3c757 [MSVC] Suppress another unused-var warning
Fixes https://github.com/harfbuzz/harfbuzz/issues/6095
2026-07-27 10:56:27 -06:00
Behdad Esfahbod c2b72d76d8 [buffer-verify] Fix OOM condition typo
Fixes https://github.com/harfbuzz/harfbuzz/issues/6097
2026-07-26 17:05:29 -06:00
Thalha Ahmed 34baf8d4cd Add hb_malloc2/hb_realloc2 for overflow-checked array allocation (#6099)
Add internal ALWAYS_INLINE helpers hb_malloc2(nmemb, size) and
hb_realloc2(ptr, nmemb, size) in hb-algs.hh that check for
multiplication overflow before calling hb_malloc/hb_realloc.

Convert call sites that had unchecked n * sizeof(T) multiplications:
  - src/OT/glyf/glyf-helpers.hh
  - src/hb-cairo-utils.cc
  - src/hb-gpu-paint.cc
  - src/hb-map.hh
  - src/hb-ot-post-table.hh
  - src/hb-shape.cc

Also fix raw malloc/free in src/main.cc to use hb_malloc/hb_free.
2026-07-26 11:19:11 -06:00
Khaled Hosny 6cc6d89e05 [GPOS] Count decomposed pieces as one ligature component
Non-first pieces of a MultipleSubst now add no extra component, so a
decomposed glyph absorbed into a ligature counts as the single component
it started as, and its marks attach where MarkBasePos would.

Part of https://github.com/harfbuzz/harfbuzz/issues/4969
2026-07-25 13:35:41 +03:00
Khaled Hosny a49431bcf9 [GPOS] Attach mark to first component of MultipleSubst in MarkLigPos
Do what MarkBasePos already does, so the backward search skips the
leftover pieces of a decomposition instead of giving up on them.

Fixes https://github.com/harfbuzz/harfbuzz/issues/4969
2026-07-25 13:35:28 +03:00
Hanyu Wang d65aa90ea6 [buffer] Set content_type only for the format actually being parsed (#6092)
hb_buffer_deserialize_unicode() and hb_buffer_deserialize_glyphs() each
mutated the buffer's content_type unconditionally before checking
whether the caller-supplied format was recognized, then returned false
without rolling that back for an invalid format. A buffer left with
content_type set but len == 0 fails the assert_glyphs() /
assert_unicode() invariant on a later, independent call that expects
a clean buffer, aborting the process:

  - deserialize_unicode(INVALID) -> deserialize_glyphs() aborts in
    assert_glyphs().
  - deserialize_glyphs(INVALID) -> add_codepoints() aborts in
    assert_unicode().

Move each hb_buffer_set_content_type() call into the TEXT/JSON case
bodies of the existing format switch, instead of guarding it with a
separate validity check ahead of the switch. The switch's own case
list is already the single source of truth for which formats are
supported, so this avoids duplicating that knowledge in a second
condition that could drift out of sync with the switch.

Testing:
  - Built with -Db_sanitize=address,undefined.
  - Reproduced both original aborts against the unfixed code
    (SIGABRT via assert_glyphs()/assert_unicode()).
  - Rebuilt with the fix and reran both reproducers: clean exit, no
    assertion failure.
  - Ran the full test suite (meson test, sanitizer build, FreeType +
    ICU enabled) before and after: 71/75 pass in both, with the same
    4 pre-existing failures unrelated to buffer serialization
    (check-libstdc++, and the experimental vector/raster/gpu-fuzzer
    chunk 2 targets) - confirmed to fail identically on the
    unmodified baseline, so no regressions from this change.

Assisted-by: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-24 15:35:58 -06:00
Sai Asish Y cce964cb4f [ot-tag] guard against NULL language in hb_ot_tags_to_script_and_language (#6085)
hb_ot_tag_to_language returns NULL for HB_OT_TAG_DEFAULT_LANGUAGE, and hb_language_to_string returns NULL for it, so the script-suffix path called strlen on a NULL pointer whenever the primary script tag did not match the input. Skip the suffix construction when there is no base language string and leave the default (NULL) language in place.

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
2026-07-21 18:47:36 -06:00
nussaibah shaikh 53900fd388 [gpu] bound clip depth in push_clip_path_end (#6073)
push_clip_path_end wrote clip_stack[clip_depth] without the
HB_GPU_PAINT_MAX_CLIP_DEPTH check that push_clip_glyph and
push_clip_path_start both apply. clip_depth can be pushed past
the fixed 3-entry clip_stack, so closing a clip path while the
stack is full writes a pending_clip_t past the array. Guard it
like the sibling clip pushes.
2026-07-21 18:45:53 -06:00