mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-21 15:01:01 +01:00
[BASE] Saturate synthesized math baseline
Math baseline synthesis adds a full-range glyph bearing and half its height. Saturate that final coordinate instead of relying on signed position addition. This is part of the complete position-overflow fix for issue #6151. Testing: meson test -C build --print-errorlogs Assisted-by: Codex <codex@openai.com>
This commit is contained in:
1 parent
4281443dcd
commit
48cc5b17ca
1 file changed
+1
-1
+1
-1
@@ -2389,7 +2389,7 @@ hb_ot_layout_get_baseline_with_fallback (hb_font_t *font,
|
||||
hb_font_get_nominal_glyph (font, '-', &glyph)) &&
|
||||
hb_font_get_glyph_extents (font, glyph, &extents))
|
||||
{
|
||||
*coord = extents.y_bearing + extents.height / 2;
|
||||
*coord = hb_saturate_add (extents.y_bearing, extents.height / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user