Re: [dev] [st][PATCH] Use XftFontMatch in place of FcFontMatch.

From: Amer <>
Date: Mon, 4 Jul 2016 06:25:20 +0300

Seems like I was able to narrow down the bug with fonts fallback.

(Requisites: multiple fallback fonts for 'monospace'.)

Running on HiDPI with 'pixelsize' -- all works as expected:
    st -f monospace:pixelsize=35

Using relative font size, only first font treats 'size' as relative.
But all consequent fonts treat that size like it's absolute:
    st -f monospace:size=10
All fallbacks becomes the same as pixelsize=35:
    st -f monospace:size=35

However, if after that I use <C-S-Home> -- fonts will be reloaded
and size for all symbols becomes correct.

Therefore dirty fix for such problem can be like this:

    diff --git a/st.c b/st.c
    index 2594c65..6529f56 100644
    --- a/st.c
    +++ b/st.c
    _AT_@ -4399,2 +4399,4 @@ run:
    + xunloadfonts();
    + xloadfonts(usedfont, defaultfontsize);

Truly speaking, after several hours of debugging I couldn't
understand what influences that behaviour. Maybe someone could
suggest where is problem?

P.S. Christoph, I would liked to see your fontconfig anyway.
Even if roots of this bug aren't there.

On Fri, Jun 03, 2016 at 03:06:23PM +0200, Christoph Lohmann wrote:
> > Therefore most of symbols, all asian widechar and bold non-ascii
> > flavours are microscopical small on HiDPI being not scaled at all.
> > (I suppose this difference will be rather imperceptible on non-HiDPI)
Received on Mon Jul 04 2016 - 05:25:20 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 04 2016 - 05:36:12 CEST