[Glyph] Don't round to int when shifting glyphs

Fixes a fuzzer issue and seems harmless.
pull/4748/head
Behdad Esfahbod 9 months ago
parent 2db636c65e
commit 4ec3cb0fc3
  1. 2
      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;

Loading…
Cancel
Save