Drawing is now handled by the renderer, so demo_buffer_t no longer
needs its own VAO/VBO or demo_buffer_draw(). The buffer is now a
pure vertex data container.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add MSL shader translations of the Slug GPU text rasterizer, and a
Metal rendering backend for hb-gpu-demo selectable via --metal flag.
Library changes:
- Add HB_GPU_SHADER_LANG_MSL enum value
- Add hb-gpu-vertex.msl and hb-gpu-fragment.msl
- Extend gen-gpu-shader-artifacts.py for MSL
Demo changes:
- Add demo-metal.h/mm with CAMetalLayer rendering
- Add external atlas backend for non-GL paths
- Add demo_buffer_get_vertices for Metal draw path
- Skip GL init when using Metal (GLFW_NO_API)
- Add --metal command-line flag
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Detect RTL direction from shaped buffers and right-align those
lines in the demo. Uses the average width of RTL lines as the
alignment target for a balanced look.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace the manual getopt-based demo main with the standard
main_font_text_t / shape_consumer_t composition, getting all
harfbuzz options for free: --variations, --features, --script,
--direction, --face-index, --font-funcs, etc.
New gpu_output_t (in util/gpu-output.hh) implements the output
interface, feeding shaped glyphs to the demo's GL renderer.
Add demo_buffer_add_glyph() and demo_buffer_current_line() to
demo-buffer for glyph-at-a-time insertion (vs the old batch
add_text which did its own shaping).
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>