Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[Solved] Font issue in GTK apps on X11/KDE
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
mcnutty
Tux's lil' helper
Tux's lil' helper


Joined: 29 Dec 2009
Posts: 120

PostPosted: Thu Nov 17, 2022 3:45 pm    Post subject: [Solved] Font issue in GTK apps on X11/KDE Reply with quote

I updated my system last night and when I logged in this morning font spacing has gone haywire in what appears to be limited to GTK apps (Firefox and Thunderbird specifically). Dialog windows with text inputs are unusually shaped (i.e., extremely long) due to the extra spacing. Native applications do not seem affected. Here's a screenshot of the issue (I've never used the sharing service before so I have no idea how long the link will last for). Any ideas on what happened or how to fix it?

https://snipboard.io/ihvSga.jpg


Last edited by mcnutty on Tue Nov 22, 2022 9:11 pm; edited 1 time in total
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Fri Nov 18, 2022 2:58 am    Post subject: Reply with quote

Do you configure your fonts and their sizes? Here are where I personnalise them for Gtk 2 and 3:

~/.gtkrc-2.0
~/gtkrc-2.0.mine
~/.config/gtk-3.0/gtk.css
~/.config/gtk-3.0/settings.ini

Also I configure my fonts in

~/.config/fontconfig/fonts.conf

For Qt5 I use the qt5ct tool. Firefox and Thunderbird can be fully be configured through ~/.config/gtk-3.0/gtk.css . They both use Gtk3. I configure the basic Xorg fonts in the Section "Files" section of xorg.conf precisely in /etc/X11/xorg.conf.d/Files.conf. Without any personnalisation you get the default fonts and sizes everywhere.
_________________
Paul
Back to top
View user's profile Send private message
mcnutty
Tux's lil' helper
Tux's lil' helper


Joined: 29 Dec 2009
Posts: 120

PostPosted: Fri Nov 18, 2022 4:38 pm    Post subject: Reply with quote

This is in my ~/.gtkrc-2.0
Code:
gtk-cursor-theme-size=24
gtk-enable-animations=1

gtk-primary-button-warps-slider=0


gtk-cursor-theme-name="breeze_cursors"
gtk-font-name="DejaVu Sans,  10"
gtk-theme-name="Adwaita-dark"
gtk-icon-theme-name="breeze-dark"
gtk-fallback-icon-theme="Adwaita"
gtk-toolbar-style=3
gtk-menu-images=1
gtk-button-images=1


~/.config/gtk-3/settings.ini
Code:
[Settings]
gtk-application-prefer-dark-theme=true
gtk-button-images=true
gtk-cursor-theme-name=breeze_cursors
gtk-cursor-theme-size=24
gtk-decoration-layout=icon:minimize,maximize,close
gtk-enable-animations=true
gtk-fallback-icon-theme=Adwaita
gtk-font-name=DejaVu Sans,  10
gtk-icon-theme-name=breeze-dark
gtk-menu-images=true
gtk-modules=colorreload-gtk-module:window-decorations-gtk-module
gtk-primary-button-warps-slider=false
gtk-theme-name=Adwaita-dark
gtk-toolbar-style=3


~/.config/fontconfig/fonts.conf
Code:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <its:rules xmlns:its="http://www.w3.org/2005/11/its" version="1.0">
  <its:translateRule translate="no" selector="/fontconfig/*[not(self::description)]"/>
 </its:rules>
 <!--
 Artificial oblique for fonts without an italic or oblique version
 -->
 <match target="font">
  <!-- check to see if the font is roman -->
  <test name="slant">
   <const>roman</const>
  </test>
  <!-- check to see if the pattern requested non-roman -->
  <test target="pattern" compare="not_eq" name="slant">
   <const>roman</const>
  </test>
  <!-- multiply the matrix to slant the font -->
  <edit mode="assign" name="matrix">
   <times>
    <name>matrix</name>
    <matrix>
     <double>1</double>
     <double>0.2</double>
     <double>0</double>
     <double>1</double>
    </matrix>
   </times>
  </edit>
  <!-- pretend the font is oblique now -->
  <edit mode="assign" name="slant">
   <const>oblique</const>
  </edit>
  <!-- and disable embedded bitmaps for artificial oblique -->
  <edit mode="assign" name="embeddedbitmap">
   <bool>false</bool>
  </edit>
 </match>
 <!--
 Synthetic emboldening for fonts that do not have bold face available
 -->
 <match target="font">
  <!-- check to see if the font is just regular -->
  <test compare="less_eq" name="weight">
   <const>regular</const>
  </test>
  <!-- check to see if the pattern requests bold -->
  <test target="pattern" compare="more_eq" name="weight">
   <const>bold</const>
  </test>
  <!--
        set the embolden flag
        needed for applications using cairo, e.g. gucharmap, gedit, ...
      -->
  <edit mode="assign" name="embolden">
   <bool>true</bool>
  </edit>
  <!--
       set weight to bold
       needed for applications using Xft directly, e.g. Firefox, ...
      -->
  <edit mode="assign" name="weight">
   <const>bold</const>
  </edit>
 </match>
 <dir>~/.fonts</dir>
</fontconfig>


There isn't really anything in the other files. Everything has been running fine for years until the latest update. I did have some trouble upgrading because of conflicts with harfbuzz, which I had to jump through some hoops to resolve, but everything seemed to eventually upgrade.
Back to top
View user's profile Send private message
mcnutty
Tux's lil' helper
Tux's lil' helper


Joined: 29 Dec 2009
Posts: 120

PostPosted: Tue Nov 22, 2022 9:11 pm    Post subject: Reply with quote

I found these related posts

I wound up finding a custom file in ~/.config/fontconfig/conf.d that had some patterns specifying emoji fonts. I vaguely remember doing this a long time ago to get color emojis working in Konsole. I simply removed this config file and both Firefox and Thunderbird are back to normal. As far as I can tell emojis still work in Konsole, so everything seems to be good.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum