diff options
| author | Po Lu | 2023-01-16 20:06:01 +0800 |
|---|---|---|
| committer | Po Lu | 2023-01-16 20:06:01 +0800 |
| commit | 356249d9faf2b454879ff30f06d97beb97fb9a36 (patch) | |
| tree | 722e6bb1e2ed94e12c2fa96050bf9feab7579467 /src | |
| parent | 23845804a2044be284a6223fc4b8d2779d0a7cc1 (diff) | |
| download | emacs-356249d9faf2b454879ff30f06d97beb97fb9a36.tar.gz emacs-356249d9faf2b454879ff30f06d97beb97fb9a36.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sfnt.c | 6 |
1 files changed, 3 insertions, 3 deletions
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, | |||
| 2390 | { | 2390 | { |
| 2391 | /* X and Y are signed words. */ | 2391 | /* X and Y are signed words. */ |
| 2392 | x = component->argument1.d << 16; | 2392 | x = component->argument1.d << 16; |
| 2393 | y = component->argument1.d << 16; | 2393 | y = component->argument2.d << 16; |
| 2394 | } | 2394 | } |
| 2395 | 2395 | ||
| 2396 | /* If there is some kind of scale and component offsets are | 2396 | /* If there is some kind of scale and component offsets are |
| @@ -4592,7 +4592,7 @@ main (int argc, char **argv) | |||
| 4592 | /* Time this important bit. */ | 4592 | /* Time this important bit. */ |
| 4593 | clock_gettime (CLOCK_THREAD_CPUTIME_ID, &start); | 4593 | clock_gettime (CLOCK_THREAD_CPUTIME_ID, &start); |
| 4594 | outline = sfnt_build_glyph_outline (glyph, head, | 4594 | outline = sfnt_build_glyph_outline (glyph, head, |
| 4595 | 12, | 4595 | 50, |
| 4596 | sfnt_test_get_glyph, | 4596 | sfnt_test_get_glyph, |
| 4597 | sfnt_test_free_glyph, | 4597 | sfnt_test_free_glyph, |
| 4598 | &dcontext); | 4598 | &dcontext); |
| @@ -4659,7 +4659,7 @@ main (int argc, char **argv) | |||
| 4659 | 4659 | ||
| 4660 | if (hmtx && head) | 4660 | if (hmtx && head) |
| 4661 | { | 4661 | { |
| 4662 | if (!sfnt_lookup_glyph_metrics (code, 12, | 4662 | if (!sfnt_lookup_glyph_metrics (code, 50, |
| 4663 | &metrics, | 4663 | &metrics, |
| 4664 | hmtx, hhea, | 4664 | hmtx, hhea, |
| 4665 | head, maxp)) | 4665 | head, maxp)) |