Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Use tahoma without antialiasing under KDE plasma
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
hberg
n00b
n00b


Joined: 08 Jun 2017
Posts: 4

PostPosted: Thu Jun 08, 2017 8:26 am    Post subject: Use tahoma without antialiasing under KDE plasma Reply with quote

Hello,

im currently trying tochange the default fonts in kde plasma to tahoma 8pt and without any aliasing (and the same hinting as in windows).

Here a small comparison what kde currently looks like and what my goal is:
https://up.hihn.org/media/images/win_kde.png

What i did:
- Emerged fontconfig with infinality and cleartype_hinting use-flag
- Emerged media-fonts/corefonts with tahoma use-flag
- Set DPI to 96 in X11
- Set all system fonts to tahoma
- Disabled all fontconfig configuration but infinality (eselect fontconfig ..)
- Selected infinality config win98 (which disables antialiasing) (eselect infinality...)

Now it says for eselect infinality, that i should choose the correct lcdfilter config. But there is no win98 config for eselect infinality?
I then choosed windows-xp.

After all that, antialiasing is gone but it still looks wrong. Here a comparision in firefox:

Windows: https://up.hihn.org/media/images/tahoma_win.png
Gentoo: https://up.hihn.org/media/images/tahoma_gentoo.png

I dont care about the bigger font sizes, the important one for me are the 8pt.

My configuration:

eselect fontconfig list
Code:
Available fontconfig .conf files (* is enabled):
  [1]   10-autohint.conf
  [2]   10-no-sub-pixel.conf
  [3]   10-scale-bitmap-fonts.conf
  [4]   10-sub-pixel-bgr.conf
  [5]   10-sub-pixel-rgb.conf
  [6]   10-sub-pixel-vbgr.conf
  [7]   10-sub-pixel-vrgb.conf
  [8]   10-unhinted.conf
  [9]   11-lcdfilter-default.conf
  [10]  11-lcdfilter-legacy.conf
  [11]  11-lcdfilter-light.conf
  [12]  20-unhint-small-vera.conf
  [13]  25-unhint-nonlatin.conf
  [14]  30-metric-aliases.conf
  [15]  30-urw-aliases.conf
  [16]  40-nonlatin.conf
  [17]  45-latin.conf
  [18]  49-sansserif.conf
  [19]  50-user.conf
  [20]  51-local.conf
  [21]  52-infinality.conf *
  [22]  60-latin.conf
  [23]  65-fonts-persian.conf
  [24]  65-khmer.conf
  [25]  65-nonlatin.conf
  [26]  69-unifont.conf
  [27]  70-no-bitmaps.conf
  [28]  70-yes-bitmaps.conf
  [29]  80-delicious.conf
  [30]  90-synthetic.conf


eselect infinality list
Code:
Available styles:
  [1]   debug
  [2]   infinality
  [3]   linux
  [4]   nyx
  [5]   osx
  [6]   osx2
  [7]   win7
  [8]   win98 *
  [9]   winxp


eselect lcdfilter list
Code:
Available styles:
  [1]   custom
  [2]   default
  [3]   infinality
  [4]   infinality-classic
  [5]   infinality-nudge
  [6]   infinality-push
  [7]   infinality-sharpened
  [8]   infinality-shove
  [9]   linux
  [10]  nyx
  [11]  osx
  [12]  ubuntu
  [13]  vanilla
  [14]  windows-7
  [15]  windows-7-light
  [16]  windows-xp *
  [17]  windows-xp-light


X11 config (generated by nvidia-xconfig and edited for dpi settings)
Code:
# nvidia-xconfig: X configuration file generated by nvidia-xconfig
# nvidia-xconfig:  version 381.22  (buildmeister@swio-display-x86-rhel47-02)  Thu May  4 01:29:00 PDT 2017

Section "ServerLayout"
    Identifier     "Layout0"
    Screen      0  "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
EndSection

Section "Files"
EndSection

Section "InputDevice"
    # generated from data in "/etc/conf.d/gpm"
    Identifier     "Mouse0"
    Driver         "mouse"
    Option         "Protocol"
    Option         "Device" "/dev/input/mice"
    Option         "Emulate3Buttons" "no"
    Option         "ZAxisMapping" "4 5"
EndSection

Section "InputDevice"
    # generated from default
    Identifier     "Keyboard0"
    Driver         "kbd"
EndSection

Section "Monitor"
    Identifier     "Monitor0"
    VendorName     "BenQ"
    ModelName      "BL2411"
    HorizSync       28.0 - 33.0
    VertRefresh     43.0 - 72.0
    Option         "DPMS"
    Option         "UseEdidDPI" "false"
    Option         "DPI" "96 x 96"
EndSection

Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
EndSection

Section "Screen"
    Identifier     "Screen0"
    Device         "Device0"
    Monitor        "Monitor0"
    DefaultDepth    24
    SubSection     "Display"
        Depth       24
    EndSubSection
EndSection


I have already seen kde screenshots with tahoma 8pt as system font who look exactly like under windows, but it seems i am missing something.

Maybe you can help me out, the tahoma font is really important to me.

Thanks.

hberg
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5592

PostPosted: Thu Jun 08, 2017 6:19 pm    Post subject: Reply with quote

Have you tried using a standard fontconfig setup with the v35 interpreter?
Back to top
View user's profile Send private message
hberg
n00b
n00b


Joined: 08 Jun 2017
Posts: 4

PostPosted: Thu Jun 08, 2017 6:45 pm    Post subject: Reply with quote

No i did not. Are there any use-flags?
I tested truetype without infinality by using the standard configuration, seems the same.

I just tried out Kubuntu (Ubuntu + KDE), there it works without any fontconfig changes and looks identical to windows.
Tomorrow i will go through the configurations in /etc/fonts of both systems, maybe i find something.

It could also be a x-server dpi issue, because the system fonts under gentoo are all a bit smaller as in kubuntu.
The DPI values are the same (97x96), but the monitor dimensions are a bit off (about 2mm in x/y).

Edit:
Here a screenshot from kubuntu (virtual machine) with tahoma 8pt as default font and disabled antialiasing:
https://up.hihn.org/media/images/kubuntu.png

No config-file changes has been made by me, just in the frontend.
Back to top
View user's profile Send private message
FinnPanther
n00b
n00b


Joined: 05 Jul 2017
Posts: 1

PostPosted: Wed Jul 05, 2017 12:17 pm    Post subject: Reply with quote

Did you already find a solution?

I had a similar problem. It's actually related to media-libs/freetype. Starting from version 2.7 it shipped with a new hinting system, set by the use flag: cleartype_hinting
Re-emerge freetype without that use flag and restart X, see how it looks like. It fixed my ugly unantialiased fonts problem.

Also, it's easy to disable antialiasing for small fonts like this. Create the file ~/.config/fontconfig/fonts.conf:
Code:

<match target="font">

    <edit name="hinting" mode="assign">
        <bool>true</bool>
    </edit>

    <edit name="hintstyle" mode="assign">
        <const>hintslight</const>
    </edit>

    <edit name="autohint" mode="assign">
        <bool>false</bool>
    </edit>

    <test qual="any" name="size" compare="less_eq">
        <int>8</int>
    </test>
    <edit name="antialias" mode="assign">
        <bool>false</bool>
    </edit>

</match>


I find it easier to write a short fonts.conf file rather than to figure out a working combination with the fontconfig tool. Quicker to test the hinting, too. Changes to the file are usually applied right away, no need to restart X.
Back to top
View user's profile Send private message
hberg
n00b
n00b


Joined: 08 Jun 2017
Posts: 4

PostPosted: Sun Jul 09, 2017 6:23 pm    Post subject: Reply with quote

Yes!! Removing the use-flag cleartype_hinting did the trick! I also removed all fontconfig configurations but 50-user.conf and just did the configuration in the settings-tool.
Some fonts in KDE apps still look strange (maybe they are using smaller fonts than tahoma 8pt), but firefox looks exactly like firefox under windows.

Thank you very much!
Back to top
View user's profile Send private message
hberg
n00b
n00b


Joined: 08 Jun 2017
Posts: 4

PostPosted: Sun Jul 09, 2017 8:09 pm    Post subject: Reply with quote

This is my fonts.conf:
Code:
<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
 <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="hintstyle">
   <const>hintslight</const>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="antialias">
   <bool>true</bool>
  </edit>
 </match>
 <match target="font">
  <edit mode="assign" name="autohint">
   <bool>false</bool>
  </edit>
 </match>
 <match target="font">
  <test compare="more_eq" name="size" qual="any">
   <double>6</double>
  </test>
  <test compare="less_eq" name="size" qual="any">                                                                                                           
   <double>15</double>                                                                                                                                       
  </test>                                                                                                                                                   
  <edit mode="assign" name="antialias">                                                                                                                     
   <bool>false</bool>                                                                                                                                       
  </edit>                                                                                                                                                   
 </match>                                                                                                                                                   
 <match target="font">
  <test compare="more_eq" name="pixelsize" qual="any">
   <double>8</double>
  </test>
  <test compare="less_eq" name="pixelsize" qual="any">
   <double>20</double>
  </test>
  <edit mode="assign" name="antialias">
   <bool>false</bool>
  </edit>
 </match>
 <dir>~/.fonts</dir>
</fontconfig>


And here you can see the working Tahoma 8pt in firefox, 10pt Courier New in the console and the strange looking text for the kde start-menu:
https://up.hihn.org/media/images/Screenshot_20170710_000717.png

Seems like some kind of hinting problem, but only in kde apps. For example in the screenshot, the "i" in "Firefox" in the start menu nearly overlaps. Or the "e" and "h" in "Rechner". Really strange.
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