From: Po Lu Date: Wed, 29 Mar 2023 01:44:45 +0000 (+0800) Subject: Update Android port X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=67da02444ee4ad0950bfe3b5ad531822e6818ff5;p=emacs.git Update Android port * src/sfntfont.c (sfntfont_open): Avoid specifying redundant blends. --- 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, sfnt_normalize_blend (&font_info->blend); + /* Test whether or not the instance is actually redundant, + as all of its axis are at their default values. If so, + free the instance. */ + + for (i = 0; i < desc->tables->fvar->axis_count; ++i) + { + if (font_info->blend.norm_coords[i]) + break; + } + + if (i == desc->tables->fvar->axis_count) + { + sfnt_free_blend (&font_info->blend); + goto cancel_blend; + } + /* If an interpreter was specified, distort it now. */ if (font_info->interpreter) @@ -3089,6 +3105,7 @@ sfntfont_open (struct frame *f, Lisp_Object font_entity, } } + cancel_blend: /* Calculate the xfld name. */ font->props[FONT_NAME_INDEX] = Ffont_xlfd_name (font_object, Qnil);