]> git.eshelyaron.com Git - emacs.git/commitdiff
Exclude ``regular'' from font adstyle
authorPo Lu <luangruo@yahoo.com>
Wed, 13 Sep 2023 05:42:29 +0000 (13:42 +0800)
committerPo Lu <luangruo@yahoo.com>
Wed, 13 Sep 2023 05:42:29 +0000 (13:42 +0800)
* src/sfntfont.c (sfnt_parse_style): Disregard tokens matching
Regular entirely.

src/sfntfont.c

index fb0a2546864fdc309edd692d9e6289daa5e24941..d6dfa8b6f0d37c317d503b41c6a50a6abc4a9504 100644 (file)
@@ -468,6 +468,12 @@ sfnt_parse_style (Lisp_Object style_name, struct sfnt_font_desc *desc)
     {
       style = NULL;
 
+      if (!strcmp (single, "regular"))
+       /* ``Regular'' within a font family can represent either the
+          weight, slant or width of the font.  Leave each value as
+          its default, but never append it to the adstyle.  */
+       goto next;
+
       if (desc->weight == 80)
        {
          /* Weight hasn't been found yet.  Scan through the weight