diff options
| author | Po Lu | 2023-03-29 09:44:45 +0800 |
|---|---|---|
| committer | Po Lu | 2023-03-29 09:44:45 +0800 |
| commit | 67da02444ee4ad0950bfe3b5ad531822e6818ff5 (patch) | |
| tree | f460041dc58380334806f52920c34b6780ebae3d /src | |
| parent | 13e1fb4c3f7f969f45ccbec1cfc001d76690d680 (diff) | |
| download | emacs-67da02444ee4ad0950bfe3b5ad531822e6818ff5.tar.gz emacs-67da02444ee4ad0950bfe3b5ad531822e6818ff5.zip | |
Update Android port
* src/sfntfont.c (sfntfont_open): Avoid specifying redundant
blends.
Diffstat (limited to 'src')
| -rw-r--r-- | src/sfntfont.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/sfntfont.c b/src/sfntfont.c index 3476da6734e..40272247116 100644 --- a/src/sfntfont.c +++ b/src/sfntfont.c | |||
| @@ -3068,6 +3068,22 @@ sfntfont_open (struct frame *f, Lisp_Object font_entity, | |||
| 3068 | 3068 | ||
| 3069 | sfnt_normalize_blend (&font_info->blend); | 3069 | sfnt_normalize_blend (&font_info->blend); |
| 3070 | 3070 | ||
| 3071 | /* Test whether or not the instance is actually redundant, | ||
| 3072 | as all of its axis are at their default values. If so, | ||
| 3073 | free the instance. */ | ||
| 3074 | |||
| 3075 | for (i = 0; i < desc->tables->fvar->axis_count; ++i) | ||
| 3076 | { | ||
| 3077 | if (font_info->blend.norm_coords[i]) | ||
| 3078 | break; | ||
| 3079 | } | ||
| 3080 | |||
| 3081 | if (i == desc->tables->fvar->axis_count) | ||
| 3082 | { | ||
| 3083 | sfnt_free_blend (&font_info->blend); | ||
| 3084 | goto cancel_blend; | ||
| 3085 | } | ||
| 3086 | |||
| 3071 | /* If an interpreter was specified, distort it now. */ | 3087 | /* If an interpreter was specified, distort it now. */ |
| 3072 | 3088 | ||
| 3073 | if (font_info->interpreter) | 3089 | if (font_info->interpreter) |
| @@ -3089,6 +3105,7 @@ sfntfont_open (struct frame *f, Lisp_Object font_entity, | |||
| 3089 | } | 3105 | } |
| 3090 | } | 3106 | } |
| 3091 | 3107 | ||
| 3108 | cancel_blend: | ||
| 3092 | /* Calculate the xfld name. */ | 3109 | /* Calculate the xfld name. */ |
| 3093 | font->props[FONT_NAME_INDEX] = Ffont_xlfd_name (font_object, Qnil); | 3110 | font->props[FONT_NAME_INDEX] = Ffont_xlfd_name (font_object, Qnil); |
| 3094 | 3111 | ||