From 4ec3cb0fc3507b7597f7070149463ac7a8f7ea19 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Thu, 6 Jun 2024 11:47:18 -0600 Subject: [PATCH] [Glyph] Don't round to int when shifting glyphs Fixes a fuzzer issue and seems harmless. --- src/OT/glyf/Glyph.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OT/glyf/Glyph.hh b/src/OT/glyf/Glyph.hh index e69db96ff..7772597e5 100644 --- a/src/OT/glyf/Glyph.hh +++ b/src/OT/glyf/Glyph.hh @@ -503,7 +503,7 @@ struct Glyph /* Undocumented rasterizer behavior: * Shift points horizontally by the updated left side bearing */ - int v = -phantoms[PHANTOM_LEFT].x; + float v = -phantoms[PHANTOM_LEFT].x; if (v) for (auto &point : all_points) point.x += v;