Fix parsing of some semibold font styles on Haiku

* src/haiku_font_support.cc (font_style_to_flags): Accept
"Semibold" to mean SemiBold as well.  Reported by
augiedoggie <augiedoggie@users.noreply.github.com>.
This commit is contained in:
Po Lu 2022-02-15 07:27:31 +00:00
parent 5129e713b0
commit 0b286ea45a

View 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;