feat(st): default terminal font to Fira Code size=13 scaled via Xft.dpi
This commit is contained in:
1 parent
d351265623
commit
0d8b7994bc
30 files changed
+38
-37
No files matched your search
+1
-1
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||
*/
|
||||
static char *font = "Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true";
|
||||
static char *font = "Fira Code:size=13:style=Regular:antialias=true:autohint=true";
|
||||
static int borderpx = 2;
|
||||
|
||||
/*
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
*
|
||||
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
|
||||
*/
|
||||
static char *font = "Fira Code:pixelsize=15:style=Regular:antialias=true:autohint=true";
|
||||
static char *font = "Fira Code:size=13:style=Regular:antialias=true:autohint=true";
|
||||
static int borderpx = 2;
|
||||
|
||||
/*
|
||||
|
||||
+4
-9
@@ -2573,19 +2573,14 @@ config_init(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* Apply Fira Code font sized for current scale unless st.font / St.font was explicitly set */
|
||||
/* Apply Fira Code 13pt font (scaled via live Xft.dpi) unless st.font / St.font was explicitly set */
|
||||
if (!has_font) {
|
||||
const char *ff = NULL, *bsz = NULL;
|
||||
const char *ff = NULL;
|
||||
if (db && XrmGetResource(db, "theme.fontFace", "*", &type, &ret) && ret.addr && ret.addr[0])
|
||||
ff = ret.addr;
|
||||
if (db && XrmGetResource(db, "theme.baseFontSize", "*", &type, &ret) && ret.addr && ret.addr[0])
|
||||
bsz = ret.addr;
|
||||
int px = bsz ? atoi(bsz) : anode_scale_px(15, scale);
|
||||
if (px < 8 || px > 96)
|
||||
px = anode_scale_px(15, scale);
|
||||
snprintf(st_theme_font, sizeof(st_theme_font),
|
||||
"%s:pixelsize=%d:style=Regular:antialias=true:autohint=true",
|
||||
ff ? ff : "Fira Code", px);
|
||||
"%s:size=13:style=Regular:antialias=true:autohint=true",
|
||||
ff ? ff : "Fira Code");
|
||||
font = st_theme_font;
|
||||
}
|
||||
if (db) {
|
||||
|
||||
Reference in new issue
Block a user