emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 3027695ea89: Save more information into Android font names


From: Po Lu
Subject: master 3027695ea89: Save more information into Android font names
Date: Tue, 21 Nov 2023 01:18:18 -0500 (EST)

branch: master
commit 3027695ea8905621a4c0d0a2ba15b28f64937a41
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Save more information into Android font names
    
    * src/sfntfont.c (sfntfont_open): Besides just the font file
    name, also store the interpreter state, UPEM, charset and
    instance number in FONT_FULLNAME_INDEX.
---
 src/sfntfont.c | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/src/sfntfont.c b/src/sfntfont.c
index 39b250ac11e..68e850779fc 100644
--- a/src/sfntfont.c
+++ b/src/sfntfont.c
@@ -3392,12 +3392,22 @@ sfntfont_open (struct frame *f, Lisp_Object font_entity,
             (Vvertical_centering_font_regexp,
              font->props[FONT_NAME_INDEX]) >= 0));
 
-  /* And set a reasonable full name, namely the name of the font
-     file.  */
-  font->props[FONT_FULLNAME_INDEX]
-    = font->props[FONT_FILE_INDEX]
+  /* Set the name of the font file.  */
+  font->props[FONT_FILE_INDEX]
     = DECODE_FILE (build_unibyte_string (desc->path));
 
+  /* Encapsulate some information on the font useful while debugging
+     (along with being informative in general) in the font name.  */
+
+  AUTO_STRING (format, "%s %s interpreted: %s upem: %s charset: %s"
+              " instance: %s");
+  font->props[FONT_FULLNAME_INDEX]
+    = CALLN (Fformat, format, desc->family, desc->style,
+            font_info->interpreter ? Qt : Qnil,
+            make_fixnum (font_info->head->units_per_em),
+            CHARSET_NAME (charset),
+            make_fixnum (instance));
+
   /* All done.  */
   unblock_input ();
   return font_object;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]