Difference between pages "Glance" and "Fonts"

(Difference between pages)
 
(LibXft)
 
Line 1: Line 1:
Glance is a component of [[OpenStack]] that allows you to manage virtual machine images. It does have relatively good documentation available at http://glance.openstack.org/.
+
== LCD-Filtering overlay ==
 +
Funtoo Linux planning to integrate LCD-filtering overlay into main tree in order to have very good font experience. Before that the overlay available via layman and manual steps required as described below. Overlay consist of patched versions of <tt>cairo</tt>, <tt>libXft</tt>, <tt>fontconfig</tt>, <tt>freetype</tt> with the aim of getting nice hinting and rendering, emulate the Ubuntu/MS Windows/Mac OS X fonts appearance.
 +
== Install the packages ==
 +
<console> # emerge -uN fontconfig freetype cairo libXft</console>
 +
== Advanced configuration ==
 +
=== Fontconfig ===
  
To install {{Package|app-admin/glance}}, follow these steps:
+
=== Default configuration ===
  
<console>
+
<console>eselect fontconfig enable 10-antialias.conf
# ##i##emerge -av glance
+
eselect fontconfig enable 10-autohint.conf 
# ##i##rc-update add glance-api default
+
eselect fontconfig enable 10-hinting.conf 
# ##i##rc
+
eselect fontconfig enable 10-hinting-slight.conf 
</console>
+
eselect fontconfig enable 10-sub-pixel-rgb.conf 
 +
eselect fontconfig enable 11-lcdfilter-default.conf 
 +
eselect fontconfig enable 70-no-bitmaps.conf 
 +
eselect fontconfig disable 10-hinting-full.conf 
 +
eselect fontconfig disable 10-hinting-medium.conf 
 +
eselect fontconfig disable 10-no-sub-pixel.conf 
 +
eselect fontconfig disable 10-sub-pixel-bgr.conf 
 +
eselect fontconfig disable 10-sub-pixel-vbgr.conf 
 +
eselect fontconfig disable 10-sub-pixel-vrgb.conf 
 +
eselect fontconfig disable 10-unhinted.conf</console>
 +
===Linux configuration ===
  
This will start <tt>glance-registry</tt>, the actual repository service, as well as <tt>glance-api</tt>, which allows remote access to the repository via the Glance API.
+
Same as default configuration except:
 +
<console>eselect fontconfig enable 21-hinting-small-aquabase-slight.conf
 +
eselect fontconfig enable 21-hinting-small-browallia-slight.conf 
 +
eselect fontconfig enable 22-hinting-courier-italic-slight.conf</console>
 +
=== Infinality’s configuration ===
  
To see if you can properly connect to the Glance API, use the <tt>glance index</tt> command, which should show an index of virtual machine images currently being stored. Since this is a brand-new install, this list should be empty:
+
Same as default configuration except:
 +
<console>eselect fontconfig enable 15-hinting-tt-instructed-full.conf
 +
eselect fontconfig enable 20-hinting-small-fonts-slight.conf 
 +
eselect fontconfig enable 21-hinting-small-aquabase-slight.conf 
 +
eselect fontconfig enable 21-hinting-small-browallia-slight.conf 
 +
eselect fontconfig enable 22-hinting-courier-italic-slight.conf 
 +
eselect fontconfig enable 25-hinting-small-arial-black-slight.conf</console>
 +
=== Windows configuration ===
  
<console>
+
Same as default except:
# ##i##glance index
+
<console>eselect fontconfig disable 10-autohint.conf
#
+
eselect fontconfig disable 10-hinting-slight.conf 
</console>
+
eselect fontconfig enable 10-hinting-full.conf 
 +
eselect fontconfig enable 15-hinting-non-tt-instructed-slight.conf 
 +
eselect fontconfig enable 20-hinting-small-fonts-slight.conf 
 +
eselect fontconfig enable 21-hinting-small-aquabase-slight.conf 
 +
eselect fontconfig enable 21-hinting-small-browallia-slight.conf 
 +
eselect fontconfig enable 22-hinting-courier-italic-slight.conf 
 +
eselect fontconfig enable 25-hinting-small-arial-black-slight.conf</console>
 +
=== OSX ===
  
A virtual machine image can be added to Glance as follows:
+
Same as default configuration except:
 +
<console>eselect fontconfig disable 10-autohint.conf
 +
eselect fontconfig disable 10-hinting.conf 
 +
eselect fontconfig disable 10-hinting-slight.conf 
 +
eselect fontconfig enable 10-unhinted.conf 
 +
eselect fontconfig enable 15-hinting-tt-instructed-none.conf</console>
 +
== Freetype ==
 +
Freetype can be configured through environment variables (see <tt>/etc/env.d/99lcdfilter</tt> 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 <tt>~/.bash_profile</tt>) or by sourcing the <tt>/usr/lib/ft-settings.sh</tt> script with the desired style in parameter (you can, of course, source the script from a startup file).
  
<console>
+
usage: source ft-settings.sh <style>
# ##i##glance add name="Zenoss 3.2.1 VMWare Linux 64-bit" is_public=true container_format=bare disk_format=vmdk < zenoss-3.2.1.zip
+
========================================================================[100%] 225.027803M/s, ETA  0h  0m  0s
+
#
+
</console>
+
  
Once added, it will now show up in the index:
+
<console>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
  
<console>
+
Infinality styles: 
# ##i##glance index
+
  classic      - Infinality rendering circa 2010. No snapping 
ID                                  Name                          Disk Format          Container Format    Size         
+
  nudge        - CLASSIC with lightly stem snapping and tweaks 
------------------------------------ ------------------------------ -------------------- -------------------- --------------
+
  push        - CLASSIC with medium stem snapping and tweaks 
3ed1ece7-6510-47f3-aacd-9fab6fd1244b Zenoss 3.2.1 VMWare Linux 64-b vmdk                bare                      828108108
+
  shove        - Full stem snapping and tweaks without sharpening 
#
+
  sharpened    - Full stem snapping, tweaks, and Windows-style sharpening 
</console>
+
  infinality  - Settings used by Infinality</console>
 +
== LibXft ==
 +
Only legacy programs still use libXft. The default configuration is defined in <tt>/usr/share/X11/app-defaults/Xft</tt>. It can be overriden on a per-user basis in the <tt>~/.Xresources</tt> or <tt>~/.Xdefaults</tt> files :
  
[[Category:Virtualization]]
+
<console>Xft.antialias: 1
[[Category:OpenStack]]
+
Xft.autohint:  0 
 +
Xft.dpi:        96 
 +
Xft.hinting:    1 
 +
Xft.hintstyle:  hintfull 
 +
Xft.lcdfilter:  lcddefault 
 +
Xft.rgba:      rgb</console>
 +
 
 +
[[Category:HOWTO]]

Revision as of 20:36, November 18, 2012

LCD-Filtering overlay

Funtoo Linux planning to integrate LCD-filtering overlay into main tree in order to have very good font experience. Before that the overlay available via layman and manual steps required as described below. Overlay consist of patched versions of cairo, libXft, fontconfig, freetype with the aim of getting nice hinting and rendering, emulate the Ubuntu/MS Windows/Mac OS X fonts appearance.

Install the packages

 # emerge -uN fontconfig freetype cairo libXft

Advanced configuration

Fontconfig

Default configuration

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

Linux configuration

Same as default configuration except:

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

Infinality’s configuration

Same as default configuration except:

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

Windows configuration

Same as default except:

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

OSX

Same as default configuration except:

eselect fontconfig disable 10-autohint.conf
eselect fontconfig disable 10-hinting.conf  
eselect fontconfig disable 10-hinting-slight.conf  
eselect fontconfig enable 10-unhinted.conf  
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: source ft-settings.sh <style>

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 :

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