GitHub's Ubuntu runner carries Chrome and Microsoft apt sources, but every
package installed by these workflows comes from Ubuntu. A third-party
repository publishing while apt refreshes its indexes can therefore fail
otherwise unrelated jobs with a hash-sum mismatch.
Remove both unused sources before updating package indexes in every affected
workflow.
Assisted-by: OpenAI Codex <openai-codex@users.noreply.github.com>
When a gvar table has no shared tuples, point sharedTuplesOffset at the
end of the glyph-variation offsets array, where the empty shared-tuples
array resides, instead of emitting a null offset.
This lets strict consumers retain glyph variations in partially
instantiated fonts with no shared tuples.
Assisted-by: OpenAI Codex <codex@openai.com>
The unified glyph budget raised outline work limits for VARC, raster,
vector, and GPU rendering to 1 << 26. Pathological fuzz inputs can
consume that entire allowance, doubling the full test-suite runtime.
Restore the common outline budget to 1 << 24 while retaining the
rasterizer's separate 1 << 26 pixel-work floor. Precharge raster
scanline work against that pixel budget before rendering so complex
COLR masks cannot do unbounded edge sweeps before their mask area is
charged.
Tests: meson test -C build (276 passed, 1 skipped; 2.82-2.83s)
Assisted-by: OpenAI Codex <codex@openai.com>
* [cmake] Compile core sources individually
CMake built libharfbuzz from the amalgamated harfbuzz.cc source,
placing all core symbols in one archive member. Static consumers
linking an auxiliary library before libharfbuzz then pulled duplicate
internal definitions into the final link.
Derive the core source list from harfbuzz.cc and compile each source
separately, matching the Meson archive layout.
Fixes: https://github.com/harfbuzz/harfbuzz/issues/5683
Assisted-by: OpenAI Codex <codex@openai.com>
* [ci] Make CMake static build explicit
Set BUILD_SHARED_LIBS=OFF on the ARM CMake job so changes to static
archive construction have intentional CI coverage.
Assisted-by: OpenAI Codex <codex@openai.com>
Use Skrifa's bitmap-strike API to provide glyph extents and paint PNG
and BGRA images from CBDT and sbix tables. Select strikes using the
font's requested ppem and preserve the OT backend's table precedence.
Keep the face blob alive through image blobs retained by paint
callbacks.
Tests: meson test -C build --no-rebuild
Assisted-by: OpenAI Codex <codex@openai.com>
Skrifa exposes resolved COLRv1 clip boxes independently of outline
glyph metrics. Use them when present so glyph extents report the clip
bounds instead of falling back to painted-content bounds.
Keep the existing paint fallback for color glyphs without a clip box.
Assisted-by: OpenAI Codex <codex@openai.com>
The RuleSet fast paths filtered out rules requiring another glyph when
the skipping iterator reached the end of the buffer. Unlike the normal
rule walk, that early return did not record the resulting
unsafe-to-concat range.
Keep the end-of-input optimization, but track filtered rules and mark
their concat hazard before returning. Cover both contextual and chained
contextual rule sets with a five-rule font that forces the fast paths.
Assisted-by: OpenAI Codex <codex@openai.com>
A zero-valued PairPos record can select a different, non-zero record
if the second glyph changes, so keep the pair unsafe to concat even
when no positioning was applied.
Likewise, make the ligature second-glyph digest rejection report the
same hazard as the full ligature walk.
Tests: meson test -C build
Port of https://github.com/harfbuzz/harfrust/pull/465
Assisted-by: OpenAI Codex <codex@openai.com>
Replace the singular named font and text options with repeated
positional FONTFILE TEXTFILE pairs. Register every supplied pair and
reject incomplete input so no requested benchmark is silently omitted.
Tested with the full Meson suite and an unfiltered two-pair run.
Assisted-by: Codex <codex@openai.com>
The --variations option previously parsed its entire argument as one
hb_variation_t, so only one axis could be selected. Parse the
comma-separated argument into an array and apply all valid axes.
Tested with the full Meson suite and a two-axis benchmark-shape run.
Assisted-by: Codex <codex@openai.com>
Build a compact class digest for every format-2 contextual RuleSet in
the subtable's existing external cache. Reject a RuleSet before walking
its rules when the next input glyph cannot match any rule's first class.
Rules without another input position force the digest open. Digest
collisions only cause the normal rule walk, and allocation failure falls
back to the uncached path.
Assisted-by: Codex <codex@openai.com>
Add a 100,000-character Japanese shaping corpus derived from Natsume
Soseki's copyright-expired Wagahai wa Neko de Aru. Split the sample
into pure Han, Hiragana, and Katakana runs, with Inherited characters
allowed within a run and Common characters omitted.
Document the Aozora Bunko source, reuse terms, source checksum, and
transformations in perf/texts/COPYING.
Testing: meson test -C build (274 tests passed)
Assisted-by: OpenAI Codex
U+180F MONGOLIAN FREE VARIATION SELECTOR FOUR was added in Unicode
14.0 and has Default_Ignorable_Code_Point=Yes, but
is_default_ignorable() only covered U+180B..180E, so FVS4 was never
hidden and leaked a .notdef into the output.
8c65442069 ("[Unicode 14] Handle U+180F FVS4") added the U+180F case
to _hb_glyph_info_set_unicode_props() and to the Arabic shaper, but
that branch sits inside "if (unicode->is_default_ignorable (u))", so
it has been unreachable since it was written. Extending the range to
U+180B..180F makes it live.
U+180B..180F are all Default_Ignorable_Code_Point per
DerivedCoreProperties.txt, so the range stays contiguous.
Before, with a font with no Mongolian coverage:
$ hb-shape Roboto-Regular.abc.ttf -u U+0061,U+180F
[1=0+1114|0=0@-908,0+0]
Every other default ignorable (U+180B..180E, U+FE00, U+200B) on that
font shapes to [1=0+1114]. After the change U+180F matches them.
Added two cases to mongolian-variation-selector.tests, which already
covered FVS1, FVS2, FVS3 and MVS but not FVS4: U+180F, and U+1810
MONGOLIAN DIGIT ZERO to pin the top of the range so it cannot be
widened by accident.
Tested with "meson test -C build": 254/254 OK, 0 failures. Restoring
the old U+180B..180E fails in-house 6174/6176, and widening it to
U+180B..1810 fails the same way.
Assisted-by: claude-opus-5
Co-authored-by: Dylan Pulver <dylanpulver@users.noreply.github.com>
Error handling in repacker is in rough shape. Many of the methods are fallible, but often the return values aren't being checked for error state.
To help address this I thought it might be useful to introduce a result type similar to Result<> in rust (or std::expected) that would force callers to deal with errors in the returns.
This PR introduces hb_result_t<OkVal, ErrVal>.
Assisted by: Gemini
FreeType requires face creation and destruction on a shared
FT_Library to be serialized. Protect the lazily-created static library,
its reference count, and its internally-owned faces with a lazy mutex.
Keep caller-owned FT_Library instances outside the new lock, and add a
multithreaded regression test for blob-backed faces and font funcs.
Tests: meson test -C build (272/272 passed)
Fixes: https://github.com/harfbuzz/harfbuzz/issues/6224
Assisted-by: OpenAI Codex <codex@openai.com>