+ All Categories

XWN740

Date post: 05-Jan-2016
Category:
Upload: bluma
View: 56 times
Download: 0 times
Share this document with a friend
Description:
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. - PowerPoint PPT Presentation
Popular Tags:
21
XWN740 X-Windows Configuring and Using Fonts – The New Way (Chapter 11)
Transcript
Page 1: XWN740

XWN740

X-WindowsConfiguring and Using

Fonts – The New Way(Chapter 11)

Page 2: 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

Page 3: XWN740

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...

Page 4: XWN740

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.

Page 5: XWN740

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

Page 6: XWN740

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

Page 7: XWN740

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...

Page 8: XWN740

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...)

Page 9: XWN740

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”

Page 10: XWN740

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”

Page 11: XWN740

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)...

Page 12: XWN740

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.

Page 13: XWN740

Configuring X Windows

  Adding/Deleting Fonts – Graphical Method

Page 14: XWN740

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....

Page 15: XWN740

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

Page 16: XWN740

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...)

Page 17: XWN740

Configuring X Windows

  RENDERING OPTIONS

Page 18: XWN740

Configuring X Windows

  RENDERING OPTIONS

Page 19: XWN740

Configuring X Windows

  RENDERING OPTIONS

Page 20: XWN740

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)...

Page 21: XWN740

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...)


Recommended