Re: [dev] [st] Font problem

From: Vincent Lefevre <vincent_AT_vinc17.net>
Date: Fri, 10 Feb 2023 15:19:17 +0100

On 2023-02-10 13:44:58 +0100, Страхиња Радић wrote:
> On 23/02/09 07:46PM, Juozas Auryla wrote:
> > DejaVu Sans Mono is rendered incorrectly on st.
> > Uppercase letter height is too big.
> > Is it a bug or i did something wrong?
> >
> > Added a screenshot for comparison (left is xfce-terminal, right is st).
> > Both should look identical but they do not.
>
> This is most probably caused by fontconfig and the way it is
> configured on your system. Also it is due to the fact that st and
> xfce-terminal access and render fonts using different means: st is a
> minimal Xorg program which uses fontconfig and Xft, while
> xfce-terminal uses bloated Gtk, Pango and a number of other
> libraries on top of fontconfig.

Actually that's more Cairo vs Xft. Pango may use either:
https://docs.gtk.org/PangoXft/pango_xft.html says:

  The Xft library is a library for displaying fonts on the X window
  system; internally it uses the fontconfig library to locate font
  files, and the FreeType library to load and render fonts. The Xft
  backend is the recommended Pango font backend for screen display
  with X. (The Cairo back end is another possibility.)

However, under Debian, the backend for Pango is Cairo rather than Xft.
I suggest the OP to check what is used on his system for xfce-terminal,
e.g. with

  ldd $(command -v xfce4-terminal) | grep -Ei 'cairo|xft'

For a better comparison with st, the OP could try xterm, which uses
Xft (like st) instead of Cairo.

-- 
Vincent Lefèvre <vincent_AT_vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
Received on Fri Feb 10 2023 - 15:19:17 CET

This archive was generated by hypermail 2.3.0 : Fri Feb 10 2023 - 15:24:09 CET