summaryrefslogtreecommitdiff
path: root/src/haiku_font_support.cc
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-05-02 09:05:12 +0000
committerPo Lu <luangruo@yahoo.com>2022-05-02 09:05:40 +0000
commit38945225596708a60d332d1f95dc9618e3d974b1 (patch)
tree7e7db4a05b0a3288bbf15207e301da792ce5927c /src/haiku_font_support.cc
parent95507dd4038ea9c704c155c81759f3fc0c568717 (diff)
downloademacs-38945225596708a60d332d1f95dc9618e3d974b1.tar.gz
Fix inconsistencies in Haiku font selection dialog
* src/haiku_font_support.cc (font_family_style_matches_p): Fix coding style. * src/haikufont.c (haikufont_pattern_from_object): Set slant and width using correct object.
Diffstat (limited to 'src/haiku_font_support.cc')
-rw-r--r--src/haiku_font_support.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/haiku_font_support.cc b/src/haiku_font_support.cc
index 1156f0bced2..cc4eba5c294 100644
--- a/src/haiku_font_support.cc
+++ b/src/haiku_font_support.cc
@@ -494,8 +494,8 @@ font_family_style_matches_p (font_family family, char *style, uint32_t flags,
strcmp ((char *) &pattern->family, family))
return false;
- if (!ignore_flags_p && (pattern->specified & FSPEC_SPACING) &&
- !(pattern->mono_spacing_p) != !(flags & B_IS_FIXED))
+ if (!ignore_flags_p && (pattern->specified & FSPEC_SPACING)
+ && !(pattern->mono_spacing_p) != !(flags & B_IS_FIXED))
return false;
if (pattern->specified & FSPEC_STYLE)
@@ -508,7 +508,8 @@ font_family_style_matches_p (font_family family, char *style, uint32_t flags,
if ((pattern->specified & FSPEC_SLANT)
&& (pattern->slant
- != ((m.specified & FSPEC_SLANT) ? m.slant : SLANT_REGULAR)))
+ != (m.specified & FSPEC_SLANT
+ ? m.slant : SLANT_REGULAR)))
return false;
if ((pattern->specified & FSPEC_WANTED)
@@ -516,8 +517,9 @@ font_family_style_matches_p (font_family family, char *style, uint32_t flags,
return false;
if ((pattern->specified & FSPEC_WIDTH)
- && (pattern->width !=
- ((m.specified & FSPEC_WIDTH) ? m.width : NORMAL_WIDTH)))
+ && (pattern->width
+ != (m.specified & FSPEC_WIDTH
+ ? m.width : NORMAL_WIDTH)))
return false;
if ((pattern->specified & FSPEC_NEED_ONE_OF)