Difference between revisions of "Fonts"

From Funtoo
Jump to navigation Jump to search
m (more details)
m (more details)
Line 4: Line 4:
{{console|body=
{{console|body=
###i## cd /usr/share/consolefonts/
###i## cd /usr/share/consolefonts/
###i## ls #todisplaythefont files
###i## ls #to display the font files
###i## setfont default8x9 #sets the 8x9 default font (this will be tiny, and you may not like it)
###i## setfont default8x9 #sets the 8x9 default font (this will be tiny, and you may not like it)
###i## setfont #returns the system to the system default}}
###i## setfont #returns the system to the system default font}}


Once you determine the font you like make it the system default:
Once you determine the font you like make it the system default:
Line 18: Line 18:
###i## emerge media-fonts/terminus-font
###i## emerge media-fonts/terminus-font
}}
}}
We suggest tiny console fonts so more information can be displayed from a single page.


The readme files in /usr/share/consolefonts contain valuable information, make sure to go through them.
The readme files in /usr/share/consolefonts contain valuable information, make sure to go through them.
{{file|name=/etc/conf.d/consolefont|lang=|desc=setting the system default font to the tiny text terminus font|body=
consolefont="ter-112n"}}
To set consolefonts as early as possible @ init:
{{console|body=
###i## rc-update add consolefont sysinit}}


== Fontconfig ==
== Fontconfig ==

Revision as of 02:45, June 1, 2015

Console Only Fonts

Console fonts for tty's are easily configurable, and testable.

root # cd /usr/share/consolefonts/
root # ls #to display the font files
root # setfont default8x9 #sets the 8x9 default font (this will be tiny, and you may not like it)
root # setfont #returns the system to the system default font

Once you determine the font you like make it the system default:

   /etc/conf.d/consolefont - setting the system default font to the tiny text default8x9
consolefont="default8x9"

More console font packages exist in portage:

root # emerge media-fonts/terminus-font

We suggest tiny console fonts so more information can be displayed from a single page.

The readme files in /usr/share/consolefonts contain valuable information, make sure to go through them.

   /etc/conf.d/consolefont - setting the system default font to the tiny text terminus font
consolefont="ter-112n"

To set consolefonts as early as possible @ init:

root # rc-update add consolefont sysinit

Fontconfig

By default font configurations do not look ideal. This can be solved by rebuilding media-libs/freetype with the infinality USE flag, which applies the infinality patch set.

root # echo "media-libs/freetype infinality" >> /etc/portage/package.use
root # emerge -uN fontconfig

Default configuration

root # eselect fontconfig enable 10-antialias.conf
root # eselect fontconfig enable 10-autohint.conf  
root # eselect fontconfig enable 10-hinting.conf  
root # eselect fontconfig enable 10-hinting-slight.conf  
root # eselect fontconfig enable 10-sub-pixel-rgb.conf  
root # eselect fontconfig enable 11-lcdfilter-default.conf  
root # eselect fontconfig enable 70-no-bitmaps.conf  
root # eselect fontconfig disable 10-hinting-full.conf  
root # eselect fontconfig disable 10-hinting-medium.conf  
root # eselect fontconfig disable 10-no-sub-pixel.conf  
root # eselect fontconfig disable 10-sub-pixel-bgr.conf  
root # eselect fontconfig disable 10-sub-pixel-vbgr.conf  
root # eselect fontconfig disable 10-sub-pixel-vrgb.conf  
root # eselect fontconfig disable 10-unhinted.conf

Linux configuration

Same as default configuration except:

root # eselect fontconfig enable 21-hinting-small-aquabase-slight.conf
root # eselect fontconfig enable 21-hinting-small-browallia-slight.conf  
root # eselect fontconfig enable 22-hinting-courier-italic-slight.conf

Infinality’s configuration

Same as default configuration except:

root # eselect fontconfig enable 15-hinting-tt-instructed-full.conf
root # eselect fontconfig enable 20-hinting-small-fonts-slight.conf  
root # eselect fontconfig enable 21-hinting-small-aquabase-slight.conf  
root # eselect fontconfig enable 21-hinting-small-browallia-slight.conf  
root # eselect fontconfig enable 22-hinting-courier-italic-slight.conf  
root # eselect fontconfig enable 25-hinting-small-arial-black-slight.conf

Windows configuration

Same as default except:

root # eselect fontconfig disable 10-autohint.conf
root # eselect fontconfig disable 10-hinting-slight.conf  
root # eselect fontconfig enable 10-hinting-full.conf  
root # eselect fontconfig enable 15-hinting-non-tt-instructed-slight.conf  
root # eselect fontconfig enable 20-hinting-small-fonts-slight.conf  
root # eselect fontconfig enable 21-hinting-small-aquabase-slight.conf  
root # eselect fontconfig enable 21-hinting-small-browallia-slight.conf  
root # eselect fontconfig enable 22-hinting-courier-italic-slight.conf  
root # eselect fontconfig enable 25-hinting-small-arial-black-slight.conf

OSX configuration

Same as default configuration except:

root # eselect fontconfig disable 10-autohint.conf
root # eselect fontconfig disable 10-hinting.conf  
root # eselect fontconfig disable 10-hinting-slight.conf  
root # eselect fontconfig enable 10-unhinted.conf  
root # eselect fontconfig enable 15-hinting-tt-instructed-none.conf

Freetype

Freetype can be configured through environment variables (see /etc/env.d/99lcdfilter for a list of the variables and their description). Those variables can be overridden on a per-user basis by either redefining them in a startup file (such as ~/.bash_profile) or by sourcing the /usr/lib/ft-settings.sh script with the desired style in parameter (you can, of course, source the script from a startup file).

usage:

root # source /usr/lib/ft-settings.sh
Possible styles:   
  default      - Use default settings.  A compromise that should please most people  
  osx          - Simulate OSX rendering  
  ubuntu       - Simulate UBUNTU rendering  
  linux        - Generic Linux style - no snapping or certain other tweaks  
  windows      - Simulate Windows rendering  
  vanilla      - Just subpixel hinting

Infinality styles:  
  classic      - Infinality rendering circa 2010. No snapping  
  nudge        - CLASSIC with lightly stem snapping and tweaks  
  push         - CLASSIC with medium stem snapping and tweaks  
  shove        - Full stem snapping and tweaks without sharpening  
  sharpened    - Full stem snapping, tweaks, and Windows-style sharpening  
  infinality   - Settings used by Infinality

LibXft

Only legacy programs still use libXft. The default configuration is defined in /usr/share/X11/app-defaults/Xft. It can be overriden on a per-user basis in the ~/.Xresources or ~/.Xdefaults files:

   ~/.Xdefaults
Xft.antialias:  1
Xft.autohint:   0  
Xft.dpi:        96  
Xft.hinting:    1  
Xft.hintstyle:  hintfull  
Xft.lcdfilter:  lcddefault  
Xft.rgba:       rgb