[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/android 67da02444ee: Update Android port
From: |
Po Lu |
Subject: |
feature/android 67da02444ee: Update Android port |
Date: |
Tue, 28 Mar 2023 23:29:22 -0400 (EDT) |
branch: feature/android
commit 67da02444ee4ad0950bfe3b5ad531822e6818ff5
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Update Android port
* src/sfntfont.c (sfntfont_open): Avoid specifying redundant
blends.
---
src/sfntfont.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
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);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- feature/android 67da02444ee: Update Android port,
Po Lu <=