Fonts are stored in some various, known directories like ~/.fonts
and /usr/share/fonts
, usually. Any valid font file you put under one of these directories will show up in your applications' select a font kind of dialogs. A font manager application may possibly store font files in a directory that's known to it but not searched for fonts system wide, then create symlinks from these font directories to actual font files. When you enable a font, it may create a symlink, and remove it when you disable. In this wise, it does not need to remove font files from your filesystem and require you to reinstall every time you want them again.
Another approach may be moving font files from and to these font directories. Again, application has a directory known to it but not searched by system for fonts, and move files from this directory to a font directory to enable it and move it to it's own directory to disable it.
I don't have a clear idea about why your fonts get trashed though, but I may have guesses: An error by you, a bug in the program and/or many other possible facts. But I'd suggest managing fonts manually. The thing you have to do is, to move/symlink them to ~/.fonts
directory to make them available, and move them away from this directory to make them unavailable. You may put them in some sort of my-fonts directory you choose (i.e. I put mine in ~/Dropbox/my/typeface/
), and symlink to them from inside ~/.fonts
when you want to enable, and still use those apps to simply view those fonts.
(I am looking into the relation of GNOME and X. I'd like to share some of my understandings. I will present it in a logical way as much as I can.)
1. What is GUI composed of?
Below is an illustration of the basic components of a GUI.
The key component is the display server. There are several display servers available. Such as:
- X11 (mostly for *nix)
- Wayland (mostly for *nix)
- Mir (mostly for *nix)
- SurfaceFlinger (This is for Google Android.)
- Quartz Compositor (This is what Apple MacOS uses.)
- Desktop Window Manager (This is what Microsoft Windows uses.)
2. What is X?
X, X11 and X Window System are synonyms. They all stand for a windowing system. Windowing System is a type of graphical user interface (GUI, as I mentioned above) which implements the WIMP (windows, icons, menus, pointer) paradigm for a user interface.
Here is a list of major windowing systems for both Linux and Windows systems.
The main component of any windowing system is usually called the display server (no surprise because windowing system is a kind of GUI and display server is the key part of any GUI), although other names like window server or compositor are also used.
Any application that runs and presents its GUI is a client of the display server. The display server and its clients communicate with each other over a communications protocol, which is usually called display server protocol, the display server being the mediator between the clients and the user. The display server receives all the input from the kernel, that the kernel receives from all attached input devices, such as keyboard, pointing devices, or touchscreen and transmits it to the correct client. The display server is also responsible for the output of the clients to the computer monitor. A display server protocol can be network capable or even network transparent. (so you can see, it is essentially just about data flow and routing, visual data is still data.)
And according to here:
An X Server is a program that provides display and user input services to other programs. In comparison, a file server provides other programs with access to file storage devices. File servers are typically located in a remote location and you use the services of a file server from the machine that you are located at. In contrast, an X Server is typically running on the machine that you are located at; display and user input services may be requested by programs running on your machine, as well as by programs running on remote machines.
So X is composed of:
- display server
- display server protocol
- some libs for development
- and other things
According to here:
X provides the basic framework for a GUI environment: drawing and
moving windows on the display device and interacting with a mouse and
keyboard. X does not mandate the user interface – this is handled by
individual programs. As such, the visual styling of X-based
environments varies greatly; different programs may present radically
different interfaces.
In other words, X only gives a program the ability to do basic things like drawing/moving windows and input interacting. X doesn't enforce visual styles. So what you said "...It gives a standard to applications to present their UI's..." is incorrect.
3. What is GNOME/KDE
GNOME and KDE are both Linux Desktop Environment. A desktop environment is a bundle of programs running on top of an operating system, which share a common GUI.
But just like I mentioned above, X11, as a display server, only provides the basic drawing ability through some libs like Xlib or XCB. Applications that directly interface X11 through such libs can have radically different visual styles.
So how to create a common GUI? Here comes the widget toolkits. Such as GTK+ and Qt. They are popular in Wayland and X11 windowing systems.
GNOME use the GTK+.
KDE use the Qt.
And here is a comparison of X Window System Desktop Environments.
To summarize...
I draw a rough conceptual illustration. The 3 parts above the OS are very customizable. That's why so much flexibility (confusion) arise.
ADD 1 - 1:26 PM 9/21/2018
And here are some discussion about QT and GTK (maybe offtopic to this thread though...)
Best Answer
This answer is not fully canonical--see Answerer's note at the end.
In this answer, I intend to provide concise explanations based on actual experience in Debian-based distributions (Xubuntu and Debian Xfce). Anyway, I have confirmed that the fonts settings doesn't take effect immediately for Qt applications in GTK+ environment of Debian.
Regarding tools
If you are an experienced user, don't use any third-party configuration tool.
For convenience, users tend to use such tools like GNOME Tweak Tool. For best compatibility however, prefer to use graphical configuration tools provided by the desktop environment or respective toolkits. Else, use more advanced tools such as Dconf, Xfconf, or GSettings.
Use
qt4-qtconfig
for Qt4, and similarly useqt5ct
for Qt5.To check which version of Qt used by particular application, trace the package dependencies using APT. For example, I have VLC installed in Xubuntu. Since VLC is using Qt, I can query the APT cache and use 'qt' as the keyword to filter any Qt dependencies.
In this case, the result hinted that VLC is using Qt4 toolkit.
Another way is to check if any Qt packages have been installed. This can be done by running Dpkg command. I choose to filter the package that contains these keywords, 'libqt' and 'gui', since the earlier APT command above has hinted so.
In this case, the result is showing Qt4 of version 4.8.x is installed. In case Qt5 package is installed, the result will contain
libqt5gui5
instead oflibqtgui4
. Naming is different for Qt5, which is why I usegrep
twice to filter the result.As hinted earlier by L. Levrel, the system setup is messy. Never mind for GNOME/KDE/Qt applications, but running
gnome-settings-daemon
in Xfce system? Xfce has its own settings daemonxfsettingsd
that is provided by this packagexfce4-settings
in Debian.Font settings discrepancy
In the following screenshots, I am running Xfce Appearance, Qt 4 Settings and VLC media player in Xfce desktop environment, using Xubuntu and Debian Xfce. Then, I changed the default font from "Droid Sans (Regular)" to "Droid Sans (Bold)" at same font size 10.
For Xubuntu, the font settings were applied immediately for both GTK+ and Qt applications. The font specified in Xfce Appearance was sufficient to affect system wide, regardless of toolkit used.
For Debian Xfce, the font settings were applied immediately for GTK+ applications only. I had to use Qt 4 Settings to change default font in Qt, from "Sans Serif (Normal)" to "Droid Sans Mono (Regular)". I also had to manually save from the menu bar before the changes were applied.
Despite both Xubuntu and Debian Xfce were running
xfsettingsd
, Debian Xfce did not honour the font settings automatically for some reason. Possible clue: Debian Xfce may be missing certain packages that allow Qt applications to read system settings automatically.Regarding questions
Likely no. This is why user should not use third-party tool to configure system settings. End users wouldn't know how these tools interact with each other, or these tools are unlikely designed to work in such mixed setup environment.
This depends on how the configuration tool works. If two different tools share same underlying configuration method i.e. GSettings, then both will supposedly read the same configuration file.
In the first screenshot, notice that Qt 4 Settings is still showing "Droid Sans (Regular)" instead of "Droid Sans (Bold)". The system wide settings in Xubuntu has changed, but the Qt 4 Settings doesn't reflect the changes immediately, possibly due to different toolkit in use. When quit and launch again, Qt 4 Settings will now show the latest font settings "Droid Sans (Bold)".
For the rest of questions, I'd suggest to look into the following linked pages for further reading.
Disclaimer: This answer is mainly based on my experience in Xubuntu 14.04 and Debian 8 Xfce (both running Xfce 4.10). Despite running a similar desktop environment, the experience was slightly different for the font settings to take effect. Known limitations are as follows.
TL;DR Don't mix tools created for a different environment; Don't use third-party configuration tools. Use graphical tool provided by desktop environment or respective toolkits.
Answerer's note: I had written this answer to be sufficient, but not fully canonical at the time. Hence this answer is now a community wiki, so that anyone with minimum reputation can improve this post to keep up with latest changes in each toolkit, or even re-explain the font settings discrepancy using a more concise example (if done so, remove relevant text from "Disclaimer").