Reply to topic

KDE does not render fonts like Ubuntu. How to Fix it?

fmpanda
Registered Member
Posts
9
Karma
0
I’m a linux user with Gnome (Ubuntu) background. I’ve switched to KDE recently like 1 year.
I like everything on KDE except for the font rendering. Every single font on Ubuntu looks clean sharp and smooth.
But not in KDE.

Another thing, there is no way to change font size to 10.5 pt. So some fonts look dwarf with not proper height.
It goes 10pt to 11pt but not 10.x

So I made some side by side images to compare Ubuntu and KDE fonts rendering with the exact same settings.
Anti-Aliasing: Enable
Subpixel: RGB
Hinting: Slight
Force DPI: 96


Please watch all the images carefully for better understanding. I also created a ZIP file for better resolution.
Here it is: Gnome vs KDE Font Rendering ZIP

I’m using KDE Neon 5.17.1
Please tell me how to make fonts render like Ubuntu?
And How to make font size 10.5 pt?


Side by Side Compare Images:
Image Image Image Image

Settings:
Image Image
User avatar Wolfman
Registered Member
Posts
40
Karma
0
OS
Hi fmpanda,

open Settings > Fonts > and to the right of each font setting (General, Fixed width etc), there is a small text document looking box, hover over the one you want to change (I assume General) and then the fonts selection window will open, on the top left of that window is a cogwheel, click on the menu More Actions > Special Application Settings and a whole array of settings will open up when you click that!. Then have a good look around. :)

I can't post images on this website otherwise I would show you a screenshot!. ;D


Running Kubuntu on two computers (one dual boot and one as single OS), were it not for gaming; I would ditch Winblows completely!.
fmpanda
Registered Member
Posts
9
Karma
0
Wolfman wrote:Hi fmpanda,

open Settings > Fonts > and to the right of each font setting (General, Fixed width etc), there is a small text document looking box, hover over the one you want to change (I assume General) and then the fonts selection window will open, on the top left of that window is a cogwheel, click on the menu More Actions > Special Application Settings and a whole array of settings will open up when you click that!. Then have a good look around. :)

I can't post images on this website otherwise I would show you a screenshot!. ;D


I think you did not understand my post.

My question is:
1. How to make fonts render like Ubuntu?
2. How to make system font size 10.5pt ? (It does not allow to change at 10.5pt. It goes 10pt to 11pt. But not 10.5pt)
User avatar Wolfman
Registered Member
Posts
40
Karma
0
OS
I thought there might be a setting or two in the places I mentioned sorry, all I can think of at the moment is to change the font DPI, I cannot find anything on the web relating to font settings otherwise!. :-\


Running Kubuntu on two computers (one dual boot and one as single OS), were it not for gaming; I would ditch Winblows completely!.
escanor
Registered Member
Posts
3
Karma
0
fmpanda wrote:

My question is:
[b]1. How to make fonts render like Ubuntu?


I think it's not possible, Ubuntu font rendering always looks better.Unfortunately on KDE, especially in the latest versions, at least in my case, font rendering looks blurry and ugly
fmpanda
Registered Member
Posts
9
Karma
0
escanor wrote:
fmpanda wrote:

My question is:
1. How to make fonts render like Ubuntu?


I think it's not possible, Ubuntu font rendering always looks better.Unfortunately on KDE, especially in the latest versions, at least in my case, font rendering looks blurry and ugly


I've found a solution. Create a .fonts.conf file on Home Folder. Then copy and paste these codes in .fonts.conf and save it.
After doing it log out and log in.

Now fonts are lot better than before. But not exactly like Ubuntu. Because some fonts are too thin. For Example: Cantarell by Fedora.

Code: Select all
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <dir>~/.fonts</dir>
 
  <match target="font">
  <edit mode="assign" name="rgba">
   <const>rgb</const>
  </edit>
 </match>
 
  <match target="font">
  <edit mode="assign" name="hinting">
   <bool>true</bool>
  </edit>
 </match>
 
 <match target="font">
  <edit mode="assign" name="autohint">
   <bool>true</bool>
  </edit>
 </match>
 
 <match target="font">
  <edit mode="assign" name="hintstyle">
   <const>hintslight</const>
  </edit> 
 </match>

  <match target="font">
  <edit mode="assign" name="lcdfilter">
   <int>2</int>
  </edit> 
 </match>
 
</fontconfig>
User avatar Wolfman
Registered Member
Posts
40
Karma
0
OS
Nice work, please mark the topic as solved so it helps others. ;D


Running Kubuntu on two computers (one dual boot and one as single OS), were it not for gaming; I would ditch Winblows completely!.
escanor
Registered Member
Posts
3
Karma
0
Works like a charm,Thanks! :)
User avatar raphaelra
Registered Member
Posts
166
Karma
0
OS
Can anyone explain me (or points me to an explanation), who/what is responsible for font rendering in KDE ? Qt, any own framework parts, X11 fonst server, FreeType, other libs, ... ?
fmpanda
Registered Member
Posts
9
Karma
0
raphaelra wrote:Can anyone explain me (or points me to an explanation), who/what is responsible for font rendering in KDE ? Qt, any own framework parts, X11 fonst server, FreeType, other libs, ... ?


Ubuntu (Gnome) uses PANGO for font render engine. Which is one of the best font engine. I don't know about KDE/QT.
Another thing, KDE does not allow us to set fractional value for font size like 10.5pt.
10.5pt is a standard side for 96dpi monitor. All font gets proper height and weight with 10.5pt in Gnome.
But in KDE there's no 10.5pt. You have to select 10pt or 11pt. Which makes no sense.
User avatar raphaelra
Registered Member
Posts
166
Karma
0
OS
fmpanda wrote:Ubuntu (Gnome) uses PANGO for font render engine. Which is one of the best font engine. I don't know about KDE/QT

I found a document form 2010 that describes the state of text rendering. It looks like that Qt as well as Pango uses HarfBuzz for text shapping. Qt use it for text layout and rasterisation/glyphs. But Pango is using it only for text layout. Who makes the glyphs in Pango ? FreeType ?

Why am i asking that ? I wont to know, where is the difference in font rendering between GNOME/GTK+ and KDE/Qt.
airdrik
Registered Member
Posts
1854
Karma
5
OS
fmpanda wrote:Another thing, KDE does not allow us to set fractional value for font size like 10.5pt.
10.5pt is a standard side for 96dpi monitor. All font gets proper height and weight with 10.5pt in Gnome.
But in KDE there's no 10.5pt. You have to select 10pt or 11pt. Which makes no sense.


The use of fractional point values seems a little weird to me, but doing some googling and comparing, I see that there is a sufficiently notable difference between 10, 10.5 and 11 that it seems reasonable enough to me to allow the fractional point values.
Checking other places, I see that other KDE applications such as Kate/Kwrite allow you to use fractional point values, so I don't know why it should be prohibited in system settings.
I'd suggest filing a request to bugs.kde.org to allow the use of fractional fonts in the system font settings.


airdrik, proud to be a member of KDE forums since 2008-Dec.
User avatar raphaelra
Registered Member
Posts
166
Karma
0
OS
airdrik wrote:I'd suggest filing a request to bugs.kde.org to allow the use of fractional fonts in the system font settings.

And in the meantime you can edit ~/.config/kdeglobals directly:
Code: Select all
[General]
fixed=Hack,9,-1,5,50,0,0,0,0,0,Regular
font=Noto Sans,9.5,-1,5,50,0,0,0,0,0,Regular
menuFont=Noto Sans,9.5,-1,5,50,0,0,0,0,0,Regular
smallestReadableFont=Noto Sans,7.5,-1,5,50,0,0,0,0,0,Regular
toolBarFont=Noto Sans,7.5,-1,5,50,0,0,0,0,0,Regular
...
[WM]
activeFont=Noto Sans,9.5,-1,5,75,0,0,0,0,0,Bold
...

The panel for font settings even displays the the sizes with fraction :)

 
Reply to topic

Bookmarks



Who is online

Registered users: azamet, Baidu [Spider], Bing [Bot], bobajobabob, dally_z, Daphazard, extinct, farid, Google [Bot], Horus, Sogou [Bot]