Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Ugly fonts in gentoo
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
risq
Tux's lil' helper
Tux's lil' helper


Joined: 03 Dec 2004
Posts: 75

PostPosted: Mon Jun 16, 2014 9:57 pm    Post subject: Ugly fonts in gentoo Reply with quote

I feel really sorry about this, since im a gentoo fan overall but one thing i could never really deal with is a good looking font setup. the more i read about fonts and fontconfig the less i get it.

the disaster is almost complete. ugly firefox and thunderbird fonts, cruel terminal font, ...almost all by default. i installed some fonts, try to adjust and made it worse.

can u help me in a simple way to get (sorry for the word..!!) windows-like fonts.

my fontconfig is

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-dejavu-sans.conf
[13] 20-unhint-small-dejavu-sans-mono.conf
[14] 20-unhint-small-dejavu-serif.conf
[15] 20-unhint-small-vera.conf *
[16] 25-unhint-nonlatin.conf
[17] 30-metric-aliases.conf *
[18] 30-urw-aliases.conf *
[19] 40-nonlatin.conf *
[20] 42-luxi-mono.conf *
[21] 45-latin.conf *
[22] 49-sansserif.conf *
[23] 50-user.conf *
[24] 51-local.conf *
[25] 57-dejavu-sans.conf
[26] 57-dejavu-sans-mono.conf
[27] 57-dejavu-serif.conf
[28] 59-google-droid-sans.conf *
[29] 59-google-droid-sans-mono.conf *
[30] 59-google-droid-serif.conf *
[31] 60-latin.conf *
[32] 65-fonts-persian.conf *
[33] 65-khmer.conf
[34] 65-nonlatin.conf *
[35] 69-unifont.conf *
[36] 70-no-bitmaps.conf
[37] 70-yes-bitmaps.conf
[38] 80-delicious.conf *
[39] 90-synthetic.conf *
[40] 99pdftoopvp.conf

and i dont know what i should activate, where it is used, and why the hell firefox looks that bad for some sites..

and i use xfce


thx in advance
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10156
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Jun 16, 2014 10:09 pm    Post subject: Reply with quote

See Getting Beautiful Fonts in Gentoo. :)

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
risq
Tux's lil' helper
Tux's lil' helper


Joined: 03 Dec 2004
Posts: 75

PostPosted: Mon Jun 16, 2014 10:35 pm    Post subject: Reply with quote

thx for the quick answer. some websites look better now, a lot (like Facebook..forgive me) still look very ugly. Thunderbird still looks ugly 2.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10156
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Jun 16, 2014 11:06 pm    Post subject: Reply with quote

This works well for me, even in Thunderbird; I don't use Facebook. There's another detailed thread on fonts that I can't locate at the moment. I'll try to find it & forward you a link. Or maybe someone else will beat me to it. ;)

- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 10156
Location: Somewhere over Atlanta, Georgia

PostPosted: Mon Jun 16, 2014 11:12 pm    Post subject: Reply with quote

One more thought. Reproducing here some of the chatter produced by the initial install of Chromium:
Quote:
Some web pages may require additional fonts to display properly.
Try installing some of the following packages if some characters
are not displayed properly:
- media-fonts/arphicfonts
- media-fonts/bitstream-cyberbit
- media-fonts/droid
- media-fonts/ipamonafont
- media-fonts/ja-ipafonts
- media-fonts/takao-fonts
- media-fonts/wqy-microhei
- media-fonts/wqy-zenhei

Depending on your desktop environment, you may need
to install additional packages to get icons on the Downloads page.

For KDE, the required package is kde-base/oxygen-icons.

For other desktop environments, try one of the following:
- x11-themes/gnome-icon-theme
- x11-themes/tango-icon-theme
- John
_________________
I can confirm that I have received between 0 and 499 National Security Letters.
Back to top
View user's profile Send private message
yufw
n00b
n00b


Joined: 11 Nov 2013
Posts: 57

PostPosted: Tue Jun 17, 2014 1:09 pm    Post subject: Reply with quote

risq,

Actually I just tweaked my font rendering and it's really not that hard, though it's the second time I tried to do that. The configuration related to the font rendering quality include anti-aliasing, hinting and subpixel rendering. I recommend the wiki articles from Gentoo and Arch. Notice that the 'bindist' USE flag will disable subpixel rendering altogether, so disable it if you want to enable subpixel rendering, which makes a significant improvement on my monitor.

After some tweaking, you will get very good font rendering, better than Windows, I must say.
Back to top
View user's profile Send private message
risq
Tux's lil' helper
Tux's lil' helper


Joined: 03 Dec 2004
Posts: 75

PostPosted: Tue Jun 17, 2014 3:25 pm    Post subject: Reply with quote

thx for your help, but i think the approach is as wrong as i did in the past: trying some fonts, emerging some others, activating some, tweaking this and that.

the basic problem is, that i dont understand how fonts are set up!

what does it mean when firefox has been setup for proportional=serif, serif=serif, ... ??! which fonts are actually used on a specific site?
which fonts does a standard application like thunderbird use in menus, which in the app itself,
what fonts do the system use general?
which are the consolefonts?
what happens if i emerge a font and activate it via fontconfig? will it override another font?
???

i havent find a tutorial which explains this from the button on..there are many tweaks and tips, but they havent got me a basic understanding of fonts in linux/gentoo.. yeath, im frustrated with this one ;(
Back to top
View user's profile Send private message
Tractor Girl
Apprentice
Apprentice


Joined: 16 May 2013
Posts: 159

PostPosted: Tue Jun 17, 2014 4:33 pm    Post subject: Reply with quote

Quote:
what does it mean when firefox has been setup for proportional=serif, serif=serif, ... ??!

serif is just an alias for some specific font that is installed on your system.
There are three main font types serif, sans (or sans-serif) and monospace (or mono). To check what is your current default serif, sans and mono run
Code:
fc-match sans && fc-match serif && fc-match mono

This will give you the default fonts used by your GUI applications.
To list all avible fonts on your system run
Code:
fc-list


To change deafault fonts paste this into /etc/fonts/conf.d/51-local.conf (this example sets all deafaut font types to Dejavu and fallback font types to Ubuntu)
Code:
 <alias>
    <family>sans-serif</family>
    <prefer>
      <family>Dejavu Sans</family>
      <family>Ubuntu</family>
    </prefer>
    <default><family>DejaVu Sans</family></default>
  </alias>

  <alias>
    <family>serif</family>
    <prefer>
      <family>DejaVu Serif</family>
      <family>Ubuntu</family>
    </prefer>
    <default><family>DejaVu Serif</family></default>
  </alias>

  <alias>
    <family>monospace</family>
    <prefer>
      <family>DejaVu Sans Mono</family>
      <family>Ubuntu Mono</family>
    </prefer>
    <default><family>DejaVu Sans Mono</family></default>
  </alias>

You must also make sure that 51-local.conf is active. Run
Code:
eselect fontconfig list

check 51-local.conf number and run
Code:
eselect fontconfig enable NUMBER


In the same file you can also tweak some other stuff. For example:
Code:
<!-- PIXEL per INCH (check with: "xdpyinfo |grep dots") -->
  <match target="pattern">
    <edit name="dpi" mode="assign">
      <double>96</double>
    </edit>
  </match>

<!-- ENABLE CLASSIC BCI HINTING -->   
  <match target="font">
    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>
  </match>

<!-- SET HINTING STYLE {hintlight|hintmedium|hintfull} -->
  <match target="font">
    <edit name="hintstyle" mode="assign">
      <const>hintfull</const>
    </edit>
  </match>

<!-- ENABLE ALTERNATIVE HINTING METHOD (AUTOHINTER)
  <match target="font">
    <edit name="autohint" mode="assign">
      <bool>true</bool>
    </edit>
  </match>  -->

<!-- DISABLE AUTOHINTER FOR BOLD FONTS
  <match target="font">
    <test name="weight" compare="more">
        <const>medium</const>
    </test>
    <edit name="autohint" mode="assign">
        <bool>false</bool>
    </edit>
  </match>  -->

<!-- ENABLE SUBPIXEL RENDERING {rgb|bgr|v-rgb|v-bgr} -->
  <match target="font">
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
  </match>

<!-- ENABLE LCD FILTER {default|light|legacy|none} -->
  <match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
  </match>


Generally GUI fonts can also be set somewhere in DE settings or if you're using just WM - it can be set via simple applications like lxappearance (for gtk).

Quote:
which fonts are actually used on a specific site

The site itself defines that - if you don't have this particular font on your system, substitute will be used. For example if you don't have corefonts, probably something from liberation will be used (even if it's not set as default on your system). If you don't have any substitute, then your default fonts will be used.

To set console font (_console_ not the terminal) edit /etc/conf.d/consolefont
and add it to default runlevel
Code:
rc-update add consolefont default


To set fonts in terminals like xterm or urxvt use .Xresources file. For example
Code:
! ---------------------------------------------------------- URXVT --------------------------------------------------------------- !

URxvt*boldFont:   
URxvt*scrollBar:   false
URxvt*foreground:    rgb:30/60/90
URxvt*background:    rgb:0/0/40
URxvt*cursorColor:   rgb:50/69/30
URxvt*cursorBlink:   true
URxvt*transparent:   false
URxvt*shading:      10
URxvt*font:      xft:Terminess Powerline:pixelsize=12


You can also put there some stuff from /etc/fonts/conf.d/51-local.conf (just to be sure)
Code:
! Pixel per inch (check with: "xdpyinfo | grep dots")
Xft.dpi:        96

! Enable classic hinting (BCI)
Xft.hinting:   true

! Set hinting style {hintslight|hintsmedium|hintsfull}
Xft.hintstyle:   hintsfull   

! Enable subpixel rendering {rgb|bgr|v-rgb|v-bgr}
Xft.rgba:   rgb

! Enable LCD filter {default|light|legacy|none}
Xft.lcdfilter:   lcddefault

! Enable alternative hint method (autohinter)
!Xft.autohint   true

! Enable Antyaliasing
!Xft.antialias:true


These are all just examples.
You can find some usefull stuff here:
https://wiki.archlinux.org/index.php/Font_configuration
Back to top
View user's profile Send private message
kite14
Apprentice
Apprentice


Joined: 07 Nov 2006
Posts: 199
Location: Pordenone/Italy

PostPosted: Tue Jun 17, 2014 7:47 pm    Post subject: Reply with quote

Have anyone tried the infinality patch set for fontconfig? I'm pretty happy with this setup.
Infinality is in portage (stable) and the Gentoo wiki has a nice howto to get it started.
Here another quick howto
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