]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix parsing of some semibold font styles on Haiku
authorPo Lu <luangruo@yahoo.com>
Tue, 15 Feb 2022 07:27:31 +0000 (07:27 +0000)
committerPo Lu <luangruo@yahoo.com>
Tue, 15 Feb 2022 07:27:31 +0000 (07:27 +0000)
* src/haiku_font_support.cc (font_style_to_flags): Accept
"Semibold" to mean SemiBold as well.  Reported by
augiedoggie <augiedoggie@users.noreply.github.com>.

src/haiku_font_support.cc

index b92373b59ebf53ec06381671b07e1a18eec635bb..3930cd965f621050e841c56857bd1dff61636122 100644 (file)
@@ -220,7 +220,9 @@ font_style_to_flags (char *st, struct haiku_font_pattern *pattern)
          if (pattern->weight == -1)
            pattern->weight = HAIKU_REGULAR;
        }
-      else if (token && !strcmp (token, "SemiBold"))
+      else if (token && (!strcmp (token, "SemiBold")
+                        /* Likewise, this was reported by a user.  */
+                        || !strcmp (token, "Semibold")))
        pattern->weight = HAIKU_SEMI_BOLD;
       else if (token && !strcmp (token, "Bold"))
        pattern->weight = HAIKU_BOLD;