aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config.def.h2
-rw-r--r--st.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/config.def.h b/config.def.h
index a242523..e89586d 100644
--- a/config.def.h
+++ b/config.def.h
@@ -5,7 +5,7 @@
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
-static char font[] = "Source Code Pro:pixelsize=14:antialias=true:autohint=true";
+static char font[] = "Source Code Pro:size=10:antialias=true:autohint=true";
static int borderpx = 2;
#define histsize 2000
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;