st

simple terminal

git clone https://9o.is/git/st.git

commit dfc0317721072f6c8bacd8a98617888631a67288
parent a0fedb50a382d2f4d274a9dccf9bd244f97ae5c1
Author: ian@remmler.org <ian@remmler.org>
Date:   Fri, 11 Nov 2016 17:52:07 +0100

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:
Mst.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/st.c b/st.c @@ -3472,6 +3472,9 @@ xloadfonts(char *fontstr, double fontsize) if (usedfontsize < 0) { FcPatternGetDouble(dc.font.match->pattern, FC_PIXEL_SIZE, 0, &fontval); + FcPatternAddDouble(pattern, FC_PIXEL_SIZE, fontval); + if (xloadfont(&dc.font, pattern)) + die("st: can't open font %s\n", fontstr); usedfontsize = fontval; if (fontsize == 0) defaultfontsize = fontval;