The demo requires GLEW, GLFW3, and GL. Make these optional so the
library still builds on headless systems. The demo is skipped when
they're missing.
Install the GL packages in the Linux CI workflow so the demo
builds there.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The object is a draw_funcs_t closure, same role as hb_raster_draw_t.
Rename for consistency with the other modules.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move the executable definition to util/meson.build so the binary
lands at util/hb-gpu, consistent with other utilities.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Fall back to an embedded font when no font file is given,
matching the glyphy-demo behaviour.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Port the glyphy-demo to use the hb-gpu API. Builds as util/hb-gpu
and requires GLEW, GLFW3, and OpenGL 3.3. Includes default text
and embedded font for quick testing.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When `--glyphs` input omitted advances but still carried `@`
positions, the util-side parser synthesized default advances from the
font. That changed the logical width of `hb-shape --ned` output and
broke same-size round-trips through `hb-view --glyphs`.
Only synthesize advances when the glyph string has neither explicit
advances nor explicit positions.
Tested:
- meson test -C build
Fixes: https://github.com/harfbuzz/harfbuzz/issues/5377
Assisted-by: OpenAI Codex
In file included from ../util/hb-raster.cc:30:
../util/raster-output.hh:828:16: error: a type specifier is required for all declarations
828 | HB_UNUSED (img);
| ^
../util/raster-output.hh:829:16: error: a type specifier is required for all declarations
829 | HB_UNUSED (protocol);
| ^
2 errors generated.
The RGB24-to-ANSI output path was implemented in helper-cairo-ansi.hh,
so hb-raster picked up a Cairo header dependency even though it only
needed the shared image-output code. That broke builds configured with
-Dcairo=disabled.
Move the shared callback, Chafa, and RGB24-to-ANSI helpers into
helper-image-output.hh, keep helper-cairo-ansi.hh focused on adapting
Cairo surfaces, and switch raster-output.hh to include only the shared
image helper.
Testing:
meson test -C build
Assisted-by: OpenAI Codex
Skip the SVG table accelerator and do not define the public
SVG color APIs when HB_NO_SVG is set. Guard internal
callers so SVG-table-dependent code compiles out cleanly,
and add HB_NO_SVG to the HB_TINY profile.
Tested: meson setup build-nosvg -Dc_args=-DHB_NO_SVG -Dcpp_args=-DHB_NO_SVG
Tested: meson compile -C build-nosvg hb-shape hb-info hb-vector main
Tested: meson compile -C build-nosvg (libharfbuzz/libharfbuzz-raster/libharfbuzz-vector linked; full tree stopped on unrelated missing chafa.h in util/hb-raster.cc)
Tested: nm -gU build-nosvg/src/libharfbuzz.0.dylib | grep -E "hb_ot_color_.*svg" (no matches)
Assisted-by: OpenAI Codex