Skip to Main Content
Volume 7A: XView Programming Manual
book

Volume 7A: XView Programming Manual

by Dan Heller
October 1994
Intermediate to advanced content levelIntermediate to advanced
770 pages
22h 58m
English
O'Reilly Media, Inc.
Content preview from Volume 7A: XView Programming Manual
16
Fonts
In X, a large number of fonts are provided on the server. Deciding which font to use and then
trying to specify fonts by name can be difficult since there are many different styles and sizes
of fonts. Most fonts are used to render text strings. The images, or glyphs, represent a char-
acter set defined mostly by the language used. However, a font may be built to support
glyphs that have nothing to do with a language. Fonts are stored on the server and are associ-
ated with the display of your workstation. The font ID is stored in the graphics context (GC),
which is used by Xlib functions like XDrawString(). Using fonts to render text is per-
haps the most common application. For example, the Courier font family displays the
classic typewriter or constant-width character set. This text is set in Times-Roman, a propor-
tionally spaced font. Often within a font family, there are different styles, such as bold or
italic, and different point sizes.* For example, lucidasans-bold-14 refers to the luci-
dasans font family, the style is bold, and the point size is 14.
Not all server fonts have a variety of styles and sizes. These special-purpose fonts are gener-
ally specified by name only—there are no corresponding styles or families for these fonts.
When accessing fonts, you typically want to specify a font either by name or by the family,
style, and size or scale of the font. In addition,
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Volume 6A: Motif Programming Manual

Volume 6A: Motif Programming Manual

David Brennan, Dan Heller, Paula Ferguson
Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Java™ Media APIs: Cross-Platform Imaging, Media, and Visualization

Alejandro Terrazas, John Ostuni, Michael Barlow

Publisher Resources

ISBN: 9780937175873