210 likes | 436 Views
X-Windows Configuring and Using Fonts – The New Way (Chapter 11) . XWN740. Agenda. Working with Fonts: Server-side vs Client-side Fonts Aliasing vs Anti-aliasing Adding / Deleting Fonts (command & graphical) Fontconfig Utilities Demo: Installing Micro$oft Fonts Rendering Options.
E N D
X-Windows Configuring and Using Fonts – The New Way (Chapter 11) XWN740
Agenda Working with Fonts: • Server-side vs Client-side Fonts • Aliasing vs Anti-aliasing • Adding / Deleting Fonts (command & graphical) • Fontconfig Utilities • Demo: Installing Micro$oft Fonts • Rendering Options
Configuring X Windows • Server-Side vs Client-Side Fonts • Since 2000, fonts are handled in X windows system with a new method – more from the client side. • This new method allows fonts to be displayed without the “staircase effect” as with the older core fonts discussed in the previous lesson. • Eventually (hopefully) this newer method will replace the older method of rendering fonts...
Fonts and X Windows • Fonts the Old Way (Core Fonts) • The original X11 font system is called core fonts. It can use bitmapped fonts or (more recently) scalable fonts; these fonts are managed on the server using the X11 protocol. • The problem with core fonts is that they are monochrome only, meaning they are only one color, and as a result, produce a “staircase effect” referred to as “aliasing” that give the font a blocky appearance.
Fonts and X Windows • Fonts the New Way (Anti-Aliasing) • Since the newer font system allows for different shades(i.e. gray-scales), these fonts can be avoid the “staircase effect” and provide a better-looking appearance. Aliasing Anti-aliasing
Configuring X Windows • Client-Side Fonts • There are 3 components that allow fonts to be displayed on the X Window system using this newer method: • Fontconfig • A library (and 2 utilities) for font configuration and matching • Xft or Pango • Libraries that provide high-quality client-side font rendering
Configuring X Windows • Client-Side Fonts • There are 3 components that allow fonts to be displayed on the X Window system using this newer method: • RENDER • An X server extension that enables rapid rendering of anti-aliased glyphs (i.e. character pictures).RENDER is the “server-side of the component that improves performance...
Configuring X Windows • Adding Fonts • The process for adding fonts is easier using the newer method. • Adding a font is simply a process of downloading, placing and unpacking fonts in one of the directories that the fontconfig utility recognizes (for example: /usr/share/fonts, /usr/share/X11/fonts, ~/.font, etc...)
Configuring X Windows • Adding Fonts – Example #1(Adding a user's customized font) • cd ~/.fonts • wget [zipped font URL] • tar xvfz [zipped font filename] “*.ttf” “*.TTF”
Configuring X Windows • Adding Fonts – Example #2(Adding System-wide Fonts) • cd /usr/share/fonts • mkdir newfonts • cd newfonts • wget [zipped font URL] • tar xvfz [zipped font filename] “*.ttf” “*.TTF”
Configuring X Windows • Deleting Fonts • The process for deleting fonts is also simple. • Deleting a font requires user to use the rm command to delete the specified fonts. • This gives the administrator of specifying whether to remove a user's customized font(s) or system-wide fonts(s)...
Configuring X Windows • Adding/Deleting Fonts – Graphical Method • There are graphical methods in Desktop environments(such as Gnome or KDE). • In Gnome, you can use the file manager application nautilus and manage the fonts by selecting File –> Open Location and entering the URI fonts:/ • You can then drag and drop downloaded and unpacked fonts into this location to add new fonts, or select and press the DELETE button to remove fonts. • A similar method can be using the file manager application called konqueror in the KDE desktop environment.
Configuring X Windows • Adding/Deleting Fonts – Graphical Method
Configuring X Windows • Fontconfig Utilty • Fontconfig library uses a font-naming scheme which is more user friendly than with the XLFD font naming system. Refer to textbook (X Power tools) page 155 for examples. • The fc-list utility lists the fonts available through the Fontconfig font library. • The fc-cache utility generates (or updates) cache files in each font directory so they can be rendered efficiency....
Configuring X Windows • Adding Fonts - Adding M$ Fonts cd /usr/share/fonts; mkdir msfonts; cd msfonts wget http://fontconfig.org/webfonts/webfonts.tar.gz tar xvzf webfonts.tar.gz cabextract *.exe mkdir /usr/share/fonts/microsoft cd .. rm -rf msfonts fc-cache
Configuring X Windows • RENDERING OPTIONS • The system administrator can “tweak” the amount of time that the CPU uses to render or display fonts in the X Windows server. • There are various methods that can be performed graphically using such desktop environments like Gnome or KDE. • The next slide uses the graphical method in Gnome....(System -> Preferences -> Appearance, then select the Font tab...)
Configuring X Windows • RENDERING OPTIONS
Configuring X Windows • RENDERING OPTIONS
Configuring X Windows • RENDERING OPTIONS
Configuring X Windows • RENDERING OPTIONS • Aliasing (monochrome) vs Anti-aliasing(i.e. grayscale or Subpixel vs None) • Turning off Anti-aliasing may help the performance of older computer systems with slower CPU speed. • Subpixel Hinting • Generally only useful on LCD displays • Involves treating each of the RGB color elements in a pixel as a partial pixel. This order is based on the manufacturer's LCD design (usually view up close to determine)...
Configuring X Windows • RENDERING OPTIONS • The system administrator can “tweak” the amount of time that the CPU uses to render or display fonts in the X Windows server. • There are various methods that can be performed graphically using such desktop environments like Gnome or KDE. • The next slide uses the graphical method in Gnome....(System -> Preferences -> Appearance, then select the Font tab...)