mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-26 01:11:25 +01:00
[gpu] Drop hb_paint_funcs_get_empty from hb_gpu_paint_glyph stub
The stub called hb_font_paint_glyph_or_fail() with the empty paint funcs just to get a truthful has-paint return value. That pulls in hb_paint_funcs_get_empty from hb-paint.cc, which HB_LEAN strips out of the wasm build, breaking the web demo link step. Since the encoder is still a stub that accumulates nothing, there is no reason to actually invoke the paint callback walk. Stash the font scale and return false directly. When the real encoder lands it will naturally pull in whichever paint symbols it needs. Assisted-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
a0a469bf15
commit
5f527aeea1
1 file changed
+8
-13
+8
-13
@@ -129,30 +129,25 @@ hb_gpu_paint_get_user_data (const hb_gpu_paint_t *paint,
|
||||
* @font: font to paint from
|
||||
* @glyph: glyph ID to paint
|
||||
*
|
||||
* Convenience wrapper that feeds a color glyph's paint tree into
|
||||
* the encoder via hb_font_paint_glyph_or_fail(). The font's scale
|
||||
* is stashed on @paint for later use by the encoder.
|
||||
* Convenience wrapper that will feed a color glyph's paint tree
|
||||
* into the encoder via hb_font_paint_glyph_or_fail().
|
||||
*
|
||||
* Palette index and foreground color are fixed at 0 and opaque
|
||||
* black for now; future versions will expose setters.
|
||||
* The paint encoder is currently a stub; this function stashes the
|
||||
* font scale on @paint for the future encoder and returns `false`
|
||||
* for every glyph until the real encoder is implemented.
|
||||
*
|
||||
* Return value: `true` if the glyph was successfully painted into
|
||||
* the encoder, `false` if the glyph has no color paint or painting
|
||||
* failed.
|
||||
* the encoder, `false` otherwise (including the stub state).
|
||||
*
|
||||
* XSince: REPLACEME
|
||||
**/
|
||||
hb_bool_t
|
||||
hb_gpu_paint_glyph (hb_gpu_paint_t *paint,
|
||||
hb_font_t *font,
|
||||
hb_codepoint_t glyph)
|
||||
hb_codepoint_t glyph HB_UNUSED)
|
||||
{
|
||||
hb_font_get_scale (font, &paint->x_scale, &paint->y_scale);
|
||||
return hb_font_paint_glyph_or_fail (font, glyph,
|
||||
hb_paint_funcs_get_empty (),
|
||||
paint,
|
||||
0,
|
||||
HB_COLOR (0, 0, 0, 255));
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user