summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/haiku_font_support.cc12
-rw-r--r--src/haikufont.c4
2 files changed, 9 insertions, 7 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)
diff --git a/src/haikufont.c b/src/haikufont.c
index db2ba326e04..cf7cc83085a 100644
--- a/src/haikufont.c
+++ b/src/haikufont.c
@@ -460,14 +460,14 @@ haikufont_pattern_from_object (struct haiku_font_pattern *pattern,
if (!NILP (val) && !EQ (val, Qunspecified))
{
pattern->specified |= FSPEC_SLANT;
- pattern->slant = haikufont_lisp_to_slant (font_object);
+ pattern->slant = haikufont_lisp_to_slant (val);
}
val = FONT_WIDTH_FOR_FACE (font_object);
if (!NILP (val) && !EQ (val, Qunspecified))
{
pattern->specified |= FSPEC_WIDTH;
- pattern->width = haikufont_lisp_to_width (font_object);
+ pattern->width = haikufont_lisp_to_width (val);
}
}