diff options
author | ian@remmler.org <ian@remmler.org> | 2016-11-11 17:52:07 +0100 |
---|---|---|
committer | Roberto E. Vargas Caballero <k0ga@shike2.com> | 2016-11-14 19:27:55 +0100 |
commit | 424202798b02554092ba84dd59fb7b79b59b7b75 (patch) | |
tree | 30260302cc0446e3d492b13664817c15b05877d5 /st.c | |
parent | 3ca7249c8685a9ff2d8ce23273fe0313b5804473 (diff) | |
download | st-424202798b02554092ba84dd59fb7b79b59b7b75.tar.gz st-424202798b02554092ba84dd59fb7b79b59b7b75.zip |
Initial font size issue.
Hi,
When I specify a font by point size (I'm using "Inconsolata:size=12"),
characters that are substituted from another font because they are not in the
main one appear too small. Doing a zoom reset fixes it. For example:
Before: http://i.imgur.com/G4Mfv4X.png
After: http://i.imgur.com/PMDhfQA.png
I found that adding the pixel size (acquired from the initial font load) to the
pattern then reloading the font fixes the problem. I'm not sure if this is a
proper fix, though.
Diffstat (limited to 'st.c')
-rw-r--r-- | st.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3472,6 +3472,9 @@ xloadfonts(char *fontstr, double fontsize) | |||
3472 | if (usedfontsize < 0) { | 3472 | if (usedfontsize < 0) { |
3473 | FcPatternGetDouble(dc.font.match->pattern, | 3473 | FcPatternGetDouble(dc.font.match->pattern, |
3474 | FC_PIXEL_SIZE, 0, &fontval); | 3474 | FC_PIXEL_SIZE, 0, &fontval); |
3475 | FcPatternAddDouble(pattern, FC_PIXEL_SIZE, fontval); | ||
3476 | if (xloadfont(&dc.font, pattern)) | ||
3477 | die("st: can't open font %s\n", fontstr); | ||
3475 | usedfontsize = fontval; | 3478 | usedfontsize = fontval; |
3476 | if (fontsize == 0) | 3479 | if (fontsize == 0) |
3477 | defaultfontsize = fontval; | 3480 | defaultfontsize = fontval; |