You are not logged in.

#1 2020-04-27 19:07:19

xakankaragunisi
Member
Registered: 2020-04-27
Posts: 3

Font misaligned vertically

Salute to you all,

for some reason regular Monospace and Siji both began to render couple of pixels higher that other fonts.
It doesn't seem to be an app issue as it appears in all suckless utilities alike (st, dwm, dmenu), ranger, and vim.
Like this:

screenshot of the issue

Also, by began I mean that issue is new to me since in previous vm installs it wasn't there and this one is more or less the same as those.

Dirty fix is of course to align it in source code of dwm, but that doesn't really work for everything mentioned above, and if made work will have to be changed back when the font is changed to something else.

Thanks.

Offline

#2 2020-04-28 08:46:55

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Font misaligned vertically

Did the font package get updated? Maybe just switch to a different font or go back to the previous version of the font.

This command line here filters the pacman.log file to just the lines about package version changes:

grep -E '\] (ins|upg|rem)\w+ ' /var/log/pacman.log | less +G

About the "monospace" font, that's not a real font, it's just a name. You can find the real font that the system will use for "monospace" like this:

$ fc-match monospace
LiberationMono-Regular.ttf: "Liberation Mono" "Regular"

You can customize the meaning of "monospace" with a fontconfig file like this:

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>

  <alias>
    <family>monospace</family>
    <prefer>
      <family>Liberation Mono</family>
      <family>DejaVu Sans Mono</family>
      <family>Droid Sans Fallback</family>
    </prefer>
  </alias>

</fontconfig>

The extra fonts after the first font are to tweak where the system looks for missing characters in the first font.

I save this kind of file as "/etc/fonts/conf.d/51-font-alias.conf".

Offline

#3 2020-04-28 16:22:34

xakankaragunisi
Member
Registered: 2020-04-27
Posts: 3

Re: Font misaligned vertically

That's the strange thing, the package hasn't been updated in over a year.

Thanks for educating on fonts (monospace family,) I never really had to delve into the fonts before so my knowledge is very shallow there.

Do you have any other suggestions?

Offline

#4 2020-04-29 12:53:56

Ropid
Member
Registered: 2015-03-09
Posts: 1,069

Re: Font misaligned vertically

The software that's involved in rendering text got perhaps updated and now behaves differently for this font. Package names I can come up with are:

fontconfig
freetype2
pango
cairo
harfbuzz
libxft

Are you sure that this exact font looks different? Maybe in the past you used a different font? It's normal that different fonts end up rendered at a slightly different vertical position by programs. That's then pretty annoying for text on buttons or panels and such. You then just can't use the font in the UI. You can try to use a slightly different font size to see if the text jumps around a bit, for example try size 11.5 instead of 11 etc.

Offline

#5 2020-04-29 13:42:37

seth
Member
Registered: 2012-09-03
Posts: 58,413

Re: Font misaligned vertically

DWM only depends on freetype2 & xft
From the screenshot it looks like the date text is set off by the red line on the bottom. Is that there and is that supposed to be there and what is that or did you gimp it in to indicate the offset text?

Also that's not a monospace font. Could it be https://wiki.archlinux.org/index.php/Fo … tmap_fonts
Siji is a bitmap font and "regular Monospace" doesn't properly describe a font at all - what is "fc-match monospace"?

Offline

Board footer

Powered by FluxBB