From: Po Lu Date: Fri, 8 Dec 2023 02:55:02 +0000 (+0800) Subject: Display glyphs whose first contours commence at origin X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=3cf7d32b90ad32321c141bb2a34a670d2d6df5b7;p=emacs.git Display glyphs whose first contours commence at origin * src/sfnt.c (sfnt_build_append): Don't disregard redundant motion if outline is empty. Problem encountered in the "M" glyph within Source Code Pro VF Italic. --- diff --git a/src/sfnt.c b/src/sfnt.c index 8ec19290859..34239973797 100644 --- a/src/sfnt.c +++ b/src/sfnt.c @@ -3487,12 +3487,18 @@ sfnt_build_append (int flags, sfnt_fixed x, sfnt_fixed y) { struct sfnt_glyph_outline *outline; + outline = build_outline_context.outline; + if (x == build_outline_context.x - && y == build_outline_context.y) + && y == build_outline_context.y + /* If the outline is presently empty, the first move_to must be + recorded even if its X and Y are set to origin. Without this + initial vertex, edges will be generated from the next vertex + onward, and thus be misaligned. */ + && outline->outline_used) /* Ignore redundant motion. */ return build_outline_context.outline; - outline = build_outline_context.outline; outline->outline_used++; /* See if the outline has to be extended. Checking for overflow