From: Po Lu Date: Mon, 16 Jan 2023 12:06:01 +0000 (+0800) Subject: Fix display of glyphs with word-sized component offsets on Android X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=356249d9faf2b454879ff30f06d97beb97fb9a36;p=emacs.git Fix display of glyphs with word-sized component offsets on Android * src/sfnt.c (sfnt_decompose_compound_glyph): Handle correctly the Y offset in components with ARG_1_AND_2_ARE_WORDS. (main): Update debugging code. --- diff --git a/src/sfnt.c b/src/sfnt.c index 09fda82382b..ee74ba0fefe 100644 --- a/src/sfnt.c +++ b/src/sfnt.c @@ -2390,7 +2390,7 @@ sfnt_decompose_compound_glyph (struct sfnt_glyph *glyph, { /* X and Y are signed words. */ x = component->argument1.d << 16; - y = component->argument1.d << 16; + y = component->argument2.d << 16; } /* If there is some kind of scale and component offsets are @@ -4592,7 +4592,7 @@ main (int argc, char **argv) /* Time this important bit. */ clock_gettime (CLOCK_THREAD_CPUTIME_ID, &start); outline = sfnt_build_glyph_outline (glyph, head, - 12, + 50, sfnt_test_get_glyph, sfnt_test_free_glyph, &dcontext); @@ -4659,7 +4659,7 @@ main (int argc, char **argv) if (hmtx && head) { - if (!sfnt_lookup_glyph_metrics (code, 12, + if (!sfnt_lookup_glyph_metrics (code, 50, &metrics, hmtx, hhea, head, maxp))