Question about YaST2-fonts package

Hello all! :slight_smile:

With Leap 15.1 YaST2-fonts package is not included and not officially supported but I still need it for system-wide fonts configuration, in particular because of appearance uniformity. In this module I can set the preferred fonts and the settings apply for all applications including SDDM, where with the tools provided by KDE this does not happen. Also I need to set the hinting style and the antialiasing settings because not all applications respect the ones set with the DE’s tools.
My question is: how can I do these settings manually without the need of the module? For example which configuration files I need to modify or create and where?
Thank you in advance! :slight_smile:

Hi, welcome

The YaST2 Fonts module is deprecated. IME SDDM should be OK without it, but maybe you can show/explain what the issues are that you’re trying to resolve.

No it is not OK. Without setting the preferred font families in YaST2-fonts (and their settings for hinting/antialiasing) SDDM never uses the fonts that are set for the rest of the DE. This also happens in some GTK applications (Gnome Disks for example).
But as I said - even the module being depreciated is there a way to do these settings manually?

Never had to use it, but run


su
font-config --help

BTW is this an upgraded system or a clean install?

This is pure speculation. But I assume that every program has his own way of configuring fonts. Well, integrated desktop applications like KDE, of course might use a central and general configuration, but all that is outside that scope has it’s own way.

I do not know the YaST module you are talking about, but I can understand that the designer there felt the same as you: can’t we centralize that. The solution is of course to program into that module the knowledge on how to configure those font parameters for all (well at least those most used) applications.

I can assume that the constant watching of how new applications do this or how they changed doing this, to incorporate this in a newer version of the YaST module is no longer done for several reasons. Those include: the person(s) doing this simply stopped, the effort becoming to tiring. almost nobody using it, etc.

In that case, you are “om your own” and must find out how this is to be configured for each and every (suite of) applications you want this for.

(And maybe, on doing this, you could recreate and support the module ;)).

Clean install. I’ll try this one later thank you!

Believe me if I could do this I would never had to ask a question in a forum in the first place. At this case my only disadvantage is that…i am regular user. :slight_smile:

Hi,
the command should be

fonts-config

ex:
su
fonts-config --help

Additionally there is a package freetype2, it says

| freetype2-profile-tti35 - Set TrueType interpreter to version 35|
|---|


 System environment for set TrueType interpreter to version 35. In release 2.6.4, a new hinting mode for TrueType fonts was added, which enabled by default to activate sub-pixel hinting for TrueType. This broke the work of full hinting. This optional package with a bash profile that will switch the TrueType Interpreter to the old version 35.

might help with look of the font in your machine. I am not sure if this is available in Leap 15.1, this package is in tumbleweed.

Well, we all are.

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

<!--
  Set fonts to be preferred when the standard aliases "serif", "sans-serif",
  and "monospace" are used.
-->

	<alias>
		<family>serif</family>
		<prefer>
			<family>Droid Serif</family>
			<family>Thorndale AMT</family>
			<family>Times New Roman</family>
			<family>Liberation Serif</family>
			<family>Nimbus Roman No9 L</family>
			<family>DejaVu Serif</family>
			<family>Tinos</family>
			<family>SUSE Serif</family>
			<family>Bitstream Vera Serif</family>
			<family>Luxi Serif</family>
		</prefer>
	</alias>
	<alias>
		<family>sans-serif</family>
		<prefer>
			<family>Droid Sans</family>
			<family>Albany AMT</family>
			<family>Arial</family>
			<family>Liberation Sans</family>
			<family>Nimbus Sans L</family>
			<family>Luxi Sans</family>
			<family>Verdana</family>
			<family>DejaVu Sans</family>
			<family>Arimo</family>
			<family>Cantarell</family>
			<family>SUSE Sans</family>
			<family>Bitstream Vera Sans</family>
		</prefer>
	</alias>
	<alias>
		<family>monospace</family>
		<prefer>
			<family>Droid Sans Mono</family>
			<family>DejaVu Sans Mono</family>
			<family>Liberation Mono</family>
			<family>Andale Mono</family>
			<family>Cousine</family>
			<family>SUSE Sans Mono</family>
			<family>Bitstream Vera Sans Mono</family>
			<family>Source Code Pro</family>
			<family>Consolas</family>
			<family>Courier New</family>
			<family>Cumberland AMT</family>
			<family>Nimbus Mono L</family>
			<family>Luxi Mono</family>
		</prefer>
	</alias>

</fontconfig>

This file in /etc/fonts/conf.d/rearranges the default families to my liking. A custom file in same location should be able to adjust hinting and other rendering options to your liking.

Hi,
This might be the one you were looking.
I am having a problem with xfce while using kwin as the windowmanager
The titlebar/window title does not honor the settings in system-settings5-fonts.
It turnout I need to use the qt5ct in changing the fonts and hinting style.
It was not installed when I run kwin_x11 in xfce. I installed it
and I was able to fix my problem.
Run it in the terminal using

qt5ct

https://nonmarketapp.com/
Jack asutin

Hello! :slight_smile: There are many files in this directory and I think this is the answer, thank you! I have found that one of them corresponds to my preferences for preferred families. I should have a little more time someday to check every single one of them more extensively. :slight_smile:

Yes, OK, but, in this case, it’s a bit complicated:

  • Normally “fonts-config” will save the desired settings in “/etc/fonts/conf.d/10-rendering-options.conf” if you use any of the following options:

[INDENT=2]–force-hintstyle, --force-autohint, --force-bw, --force-bw-monospace, --lcdfilter, --rgba, --ebitmaps, --ebitmapslang
[/INDENT]

  • If you happen to have “/etc/sysconfig/fonts-config” still around from a previous openSUSE version then, “fonts-config” will use the settings saved there.
  • BTW, the YaST “/etc/sysconfig-Editor” will find also find various fonts settings, including those in “/etc/sysconfig/fonts-config”, if you search for “font” in Variable Names, Descriptions and Values. Be aware that, you’ll have to run “fonts-config” manually to save any changes you’ve made to the “/etc/sysconfig” files with the YaST Editor.

I’m attaching my (2019) copy of “/etc/sysconfig/fonts-config” for you:


## Path:        Desktop
## Description: Display font configuration
## Type:        integer
## Default:     0
## Command:     /usr/sbin/fonts-config
#
# Type of output (quiet=0, verbose=1, debug=256) while reconfiguring
# fonts.
#
VERBOSITY="0"

## Path:        Desktop
## Description: Display font configuration
## Type:        list(none,hintnone,hintslight,hintmedium,hintfull)
## Default:     none
## Command:     /usr/sbin/fonts-config
#
#  Prefered common hinting style.
#  
#  By default, hinslight is prefered for autohinter and hintfull for
#  BCI. You can enforce one hintstyle here. This value is not final
#  though, hintstyle can be overriden by other option in this file
#  (e. g. FORCE_BW_MONOSPACE => hintfull)
#
FORCE_HINTSTYLE="hintslight"

## Path:        Desktop
## Description: Display font configuration
## Type:        yesno
## Default:     no
## Command:     /usr/sbin/fonts-config
#
#  Force autohint even for fonts, which are said to have good
#  hinting instructions.
#
FORCE_AUTOHINT="yes"

## Path:        Desktop
## Description: Display font configuration
## Type:        yesno
## Default:     no
## Command:     /usr/sbin/fonts-config
#
# Force black and white rendering. Fonts will not get smoothed with
# the benefit of high contrast betwen font and background.
#
FORCE_BW="no"

## Path:        Desktop
## Description: Display font configuration
## Type:        yesno
## Default:     no
## Command:     /usr/sbin/fonts-config
#
# Force black and white rendering for well hinted monospaced fonts.
# That makes look them in bitmap quality.
#
FORCE_BW_MONOSPACE="no"

## Path:        Desktop
## Description: Display font configuration
## Type:        list(lcdnone,lcddefault,lcdlight,lcdlegacy)
## Default:     lcdnone
## Command:     /usr/sbin/fonts-config
#
# LCD filter.
#
# I is mandatory to set to something else than 'lcdnone'
# when you want subpixel rendering. lcddefault seems to
# be most used value here.
#
USE_LCDFILTER="lcdnone"

## Path:        Desktop
## Description: Display font configuration
## Type:        list(none,rgb,vrgb,bgr,vbgr,unknown)
## Default:     none
## Command:     /usr/sbin/fonts-config
#
# Subpixel arrangement for your monitor and its rotation.
#
USE_RGBA="rgb"

## Path:        Desktop
## Description: Display font configuration
## Type:        yesno
## Default:     yes
## Command:     /usr/sbin/fonts-config
#
# As rendering of outlines is often not perfect at small sizes, some
# TrueType or OpenType fonts contain "embedded" bitmaps for small sizes.
# This is very common in CJK fonts.
#
# Using embedded bitmaps usually gives clearly readable results as the bitmaps
# are handtuned for good readability and do not suffer from imperfections
# of the rendering algorithms.
#
# On the other hand, anti-aliasing is only possible when the outlines
# are used.
#
# Often, using the outlines with anti-aliasing looks more "beautiful".
# But using the embedded bitmaps is often better readable.
# It is a matter of taste, decide by yourself which style you prefer.
#
USE_EMBEDDED_BITMAPS="yes"

## Path:        Desktop
## Description: Display font configuration
## Type:        string
## Default:     ja:ko:zh-CN:zh-TW:zh-HK:zh-SG
## Command:     /usr/sbin/fonts-config
#
# You can limit the use of embedded bitmaps only to fonts which support certain
# languages. To do this set this variable to a colon separated list of languages.
# The spelling of the languages is the same as used by fontconfig.
# For example, if you want to use embedded bitmaps only in fonts supporting
# Japanese or simplified Chinese, you can set this variable to "ja:zh-CN".
# If you want to use embedded bitmaps for *all* languages, set this variable
# to the empty string "" or to "no".
#
EMBEDDED_BITMAPS_LANGUAGES="ja:ko:zh-CN:zh-TW:zh-HK:zh-SG"

## Path:        Desktop
## Description: Display font configuration
## Type:        string
## Default:     ""
## Command:     /usr/sbin/fonts-config
#
# Colon-separated list of prefered sans families. Most prefered family first.
#
# Empty string means 'system default'. Following example will convince your
# system to use CFF fonts (if at least one of them installed). See
# http://fontinfo.opensuse.org/fontformats.html for details.
#
# PREFER_SANS_FAMILIES="Source Sans Pro:CMU Sans Serif:CMU Bright:Linux Biolinum O:Latin Modern Sans"
#
# Other example gives the preference to bitmap fonts for various scripts.
# 
# PREFER_SANS_FAMILIES="Adobe Helvetica:B&H Lucida:Efont Biwidth:Efont Fixed:Efont Fixed Wide:Arabic Newspaper:Gnu Unifont:WenQuanYi WenQuanYi Bitmap Song"
#
PREFER_SANS_FAMILIES=""

## Path:        Desktop
## Description: Display font configuration
## Type:        string
## Default:     ""
## Command:     /usr/sbin/fonts-config
#
# Colon-separated list of prefered serif families. Most prefered family first.
#
# Empty string means 'system default'. Following example will convince your
# system to use CFF fonts (if at least one of them installed). See
# http://fontinfo.opensuse.org/fontformats.html for details.
#
# PREFER_SERIF_FAMILIES="Source Serif Pro:CMU Serif:CMU Serif Extra:Linux Libertine O:Crimson:Old Standard:Rachana:Latin Modern Roman"
#
# Other example gives the preference to bitmap fonts for various scripts.
# 
# PREFER_SERIF_FAMILIES="Adobe Times:Adobe New Century Schoolbook:Adobe Utopia:B&H LucidaBright:MUTT ClearlyU Wide:MUTT ClearlyU PUA:MUTT ClearlyU Alternate Glyphs Wide"
#
PREFER_SERIF_FAMILIES=""

## Path:        Desktop
## Description: Display font configuration
## Type:        string
## Default:     ""
## Command:     /usr/sbin/fonts-config
#
# Colon-separated list of prefered sans families. Most prefered family first.
#
# Empty string means 'system default'. Following example will convince your
# system to use CFF fonts (if at least one of them installed). See
# http://fontinfo.opensuse.org/fontformats.html for details.
#
# PREFER_MONO_FAMILIES="Source Code Pro:CMU Typewriter Text:Linux Libertine Mono O:Tempora:Latin Modern Mono:Latin Modern Mono Light"
#
# Other example gives the preference to bitmap fonts for various scripts.
#
# PREFER_MONO_FAMILIES="Adobe Courier:B&H LucidaTypewriter:Efont Fixed:Efont Fixed Wide:Gnu Unifont Mono:Misc Fixed:Misc Fixed Wide:Schumacher Clean:xos4 Terminus:WenQuanYi WenQuanYi Bitmap Song"
#
PREFER_MONO_FAMILIES=""

## Path:        Desktop
## Description: Display font configuration
## Type:        yesno
## Default:     yes
## Command:     /usr/sbin/fonts-config
#
# Perform metric substitutions.
#
# When set to yes, value of PREFER_*_FAMILIES can be overriden when document 
# or GUI is requesting metric compatible font as defined
#     in /etc/fonts/conf.d/30-metric-aliases.conf,
# e. g. request to Courier New will get Liberation Mono even if 
# other family is explicitely prefered by PREFER_MONO_FAMILIES
# (hint, that's because binding="same" in that fontconfig)
#
# You can change this default behaviour with "no", but be careful with that.
# Metric compatibility means that every glyph, say 'A', has the same width
# and height in both fonts, so document should have same line wraps for 
# example.
#
SEARCH_METRIC_COMPATIBLE="yes"

## Path:        Desktop
## Description: Display font configuration
## Type:        yesno
## Default:     yes
## Command:     /usr/sbin/fonts-config
#
# Strongly prefer of families in FPL.
#
# Brute-force preference of families listed in PREFER_*_FAMILIES. This
# overrides not only other preference lists, but also document (incl. 
# webfonts) and even _user_ _selection_ of the family.
#
# Set to "yes" when you really don't want to see other fonts
# than listed in preference lists. Other fonts are used only if
# families from FPLs do not cover requested charset.
#
FORCE_FAMILY_PREFERENCE_LISTS="yes"

## Path:        Desktop
## Description: Display font configuration
## Type:        yesno
## Default:     yes
#
# generate TTCap entries in fonts.dir, which can be used by 
# xtt/freetype font module
#
GENERATE_TTCAP_ENTRIES="yes"

## Path:        Desktop
## Description: Display font configuration
## Type:        yesno
## Default:     yes
#
# generate font setup for Java 1.4.x and Java 1.5.x
#
GENERATE_JAVA_FONT_SETUP="yes"

@HotMusicFan:

BTW, I’ve noticed that, the “fonts-config” RPM package supplies the following file: /usr/share/fillup-templates/sysconfig.fonts-config.

There’s a post-install script in the “fonts-config” package which calls the SuSE tool “fillup” to populate the /etc/sysconfig/fonts-config file, which isn’t included in the RPM package – which is why “rpm --query --whatprovides /etc/sysconfig/fonts-config” returns “file /etc/sysconfig/fonts-config is not owned by any package”.

  • If you ever happen to lose the /etc/sysconfig/fonts-config file, simply forcibly re-install the “fonts-config” package and, that file will reappear.