aboutsummaryrefslogtreecommitdiffstats
path: root/st.c
diff options
context:
space:
mode:
Diffstat (limited to 'st.c')
-rw-r--r--st.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/st.c b/st.c
index f4384d0..9aac16b 100644
--- a/st.c
+++ b/st.c
@@ -3548,21 +3548,21 @@ xloadfonts(char *fontstr, double fontsize)
if (fontsize > 1) {
FcPatternDel(pattern, FC_PIXEL_SIZE);
FcPatternDel(pattern, FC_SIZE);
- FcPatternAddDouble(pattern, FC_PIXEL_SIZE, (double)fontsize);
+ FcPatternAddDouble(pattern, FC_SIZE, fontsize);
usedfontsize = fontsize;
} else {
if (FcPatternGetDouble(pattern, FC_PIXEL_SIZE, 0, &fontval) ==
FcResultMatch) {
- usedfontsize = fontval;
+ usedfontsize = -1;
} else if (FcPatternGetDouble(pattern, FC_SIZE, 0, &fontval) ==
FcResultMatch) {
- usedfontsize = -1;
+ usedfontsize = fontval;
} else {
/*
* Default font size is 12, if none given. This is to
* have a known usedfontsize value.
*/
- FcPatternAddDouble(pattern, FC_PIXEL_SIZE, 12);
+ FcPatternAddDouble(pattern, FC_SIZE, 12);
usedfontsize = 12;
}
defaultfontsize = usedfontsize;
@@ -3573,7 +3573,7 @@ xloadfonts(char *fontstr, double fontsize)
if (usedfontsize < 0) {
FcPatternGetDouble(dc.font.match->pattern,
- FC_PIXEL_SIZE, 0, &fontval);
+ FC_SIZE, 0, &fontval);
usedfontsize = fontval;
if (fontsize == 0)
defaultfontsize = fontval;