[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 0d5befb882: Fix font matching of "Fira Code Retina" and "Fira Cod
From: |
Po Lu |
Subject: |
master 0d5befb882: Fix font matching of "Fira Code Retina" and "Fira Code Regular" on Haiku |
Date: |
Mon, 2 May 2022 22:44:40 -0400 (EDT) |
branch: master
commit 0d5befb88243b1b92170f7c46664d6639b653f6c
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>
Fix font matching of "Fira Code Retina" and "Fira Code Regular" on Haiku
* src/haiku_font_support.cc (font_family_style_matches_p): Don't
allow matches on fonts with an adstyle if none was specified in
the input pattern.
---
src/haiku_font_support.cc | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/haiku_font_support.cc b/src/haiku_font_support.cc
index cc4eba5c29..339634f01b 100644
--- a/src/haiku_font_support.cc
+++ b/src/haiku_font_support.cc
@@ -490,8 +490,8 @@ font_family_style_matches_p (font_family family, char
*style, uint32_t flags,
if (style)
font_style_to_flags (style, &m);
- if ((pattern->specified & FSPEC_FAMILY) &&
- strcmp ((char *) &pattern->family, family))
+ if ((pattern->specified & FSPEC_FAMILY)
+ && strcmp ((char *) &pattern->family, family))
return false;
if (!ignore_flags_p && (pattern->specified & FSPEC_SPACING)
@@ -500,6 +500,10 @@ font_family_style_matches_p (font_family family, char
*style, uint32_t flags,
if (pattern->specified & FSPEC_STYLE)
return style && !strcmp (style, pattern->style);
+ /* Don't allow matching fonts with an adstyle if no style was
+ specified in the query pattern. */
+ else if (m.specified & FSPEC_STYLE)
+ return false;
if ((pattern->specified & FSPEC_WEIGHT)
&& (pattern->weight
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 0d5befb882: Fix font matching of "Fira Code Retina" and "Fira Code Regular" on Haiku,
Po Lu <=