SCOUG Logo


Next Meeting: Sat, TBD
Meeting Directions


Be a Member
Join SCOUG

Navigation:


Help with Searching

20 Most Recent Documents
Search Archives
Index by date, title, author, category.


Features:

Mr. Know-It-All
Ink
Download!










SCOUG:

Home

Email Lists

SIGs (Internet, General Interest, Programming, Network, more..)

Online Chats

Business

Past Presentations

Credits

Submissions

Contact SCOUG

Copyright SCOUG



warp expowest
Pictures from Sept. 1999

The views expressed in articles on this site are those of their authors.

warptech
SCOUG was there!


Copyright 1998-2024, Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.

The Southern California OS/2 User Group
USA

December 2004


Fonts and OS/2

November 2004 Presentation Outline

by Steven Levine

What is a font?

It depends on who you ask and where you look.

The Cognitive Sciences Department at Princeton says:

A specific size and style of type within a type family

Abobe says

One weight, width, and style of a typeface. Before scalable type, there was little distinction between the terms font, face, and family. Font and face still tend to be used interchangeably, although the term face is usually more correct.

unicode.org says

A collection of glyphs used for the visual depiction of character data. A font is often associated with a set of parameters (for example, size, posture, weight, and serifness), which, when set to particular values, generate a collection of imagable glyphs.

Where are fonts used?

  • Screen
  • Printer
  • Embedded in document files

Some basic terms

glyph
A shape to be displayed. Often the shape is a character.
typeface
The design of a set of characters. Users often use typeface and font interchangeably.
font family
A collection of typefaces designed to be used together.
font size
A number representing the character height. The unit of measure is usually the point which is 1/72 of an inch.
pitch
A number representing the average width of a character from a typeface. The unit of measure is typically characters per inch. Fonts may be designed as fixed pitch or proportional.
scalable fonts
A scalable font is a font encoding that can be rendered in more than one size and pitch.
font replacement
A method for choosing an alternate font when the requested font is not available.
font encoding
A method for storing the definition of font in a form that can be used by software or hardware to render the font.

What types of font encodings does OS/2 support?

  • Postscript Type 1
  • Bitmap
  • TrueType
  • Built-in (printer, video, terminal)
  • Downloadable (printer, video)
  • Other (Bitstream etc.)
  • Unicode

The FreeType engine

An anti-aliasing rendering engine for TrueType fonts. See The FreeType Project - European Morrow or The FreeType Project - US Mirror

The OS/2 port was originally developed by Michal Necasek.

InnoTek updated and enhanced this engine and released InnoTek Font Engine for OS/2

The original InnoTek implementation supported Mozilla. The engine has been extended to support the InnoTek applications. The engine may be compatible with other applications. The readme explains the registry edits to enable additional applications.

How to use fonts in OS/2 - for the end user

WPS

  • Drag and drop from Font Palette.

PM applications

  • Drag and drop from Font Palette
  • Select from Font dialogs

WINOS2 applications

  • Select from font dialogs

DOS applications

  • Almost entirely application defined. The selection method is often extremely low level and device dependent.

Soft Fonts and Font Cartridges

The Printer Object provides support for font loading and unloading.

The capabilities of a specific printer will vary depending on what the printer supports and what the driver implements.

To learn a printer's font capabilities, open up the printer object properties notebook and look around.

Most of the settings will be under Printer driver tab, but other tabs may contain font settings. There's no standard.

Check the Job Properties sub-notebook.

Check also for driver specific capabilities in the driver properties notebook. Look under the Fonts or Advanced tab.

How to use fonts in OS/2 - for the programmer

WPS

The WPS programming API is layered on top of the PM API.

Simple APIs are provided for managing the fonts applied to folders

  • wpQueryFldrFont()
  • wpSetFldrFont()
The full PM API is available for more complex font control.

Presentation Manager (PM)

The font associated with a PM window is defined in the Presentation Parameters (PresParams).

The PM API provides functions to query and set Presentation Parameter values.

  • WinQueryPresParam()
  • WinSetPresParam()
  • WinSetWindowText()

Presentation Parameters apply to all characters within the window.

The Graphics Programming Interface (GPI) provides a lower level font control interface.

  • GpiQueryFonts()
  • GpiLoadFont()
  • GpiCreateLogFont()
  • GpiCharString() and variants
GPI Font control is at the per character level.

Java

Font control in Java is via the Font class.

When a Font object is created it is associated with a specific font. The typical method for applying a font to a specific component, is to invoke the component's setFont() method passing the Font object.

DOS

The DOS programming API has no real notion of font control.

Everything is left up to the programmer.

Font files - what is what?

Postscript type 1

  • pfb - outline definitions
  • pfm - font metrics, Windows only
  • afm - adobe font metrics, text, required by OS/2
  • ofm - font metrics, OS/2 only, encoded afm, generated by installer

TrueType

  • .ttf - font outlines and metrics
  • .fot - index to .ttf, WINOS2 again, generated by installer

OS/2 Bitmap

  • .fon - font definition, pixels

Printer

  • .fnt - LaserJet downloadable fonts

Built-in

Stored in device hardware. Format is device dependent.

Others

Supported by specific WINOS2 and DOS applications.
  • Bitstream Speedo
  • Intellifont

How does OS/2 find installed fonts?

Presentation Manager

Installed fonts are listed in OS2.INI as keys of PM_Fonts Application. The key values are the names of the font files.

WINOS2 TrueType

The installed TrueType fonts are listed in win.ini under the [fonts] The section lists the .fot file pathname for each installed font.

WINOS2 Postscript

The installed TrueType fonts are listed in atm.ini under the [Fonts] This section lists the .pfb and .pfm file pathname for each installed font.

How to manage your fonts

Where should you put the font files?

Fonts are where you find them...

There are no one set of rules. The OS/2 installer has its standards. Applications may or may not have their own standards.

It is probably best to install additional fonts where they will not get lost if you uninstall an application.

Postscript

  • \psfonts
  • \lotusw4\fonts

TrueType

  • \os2\mdos\winos2\system
  • \java131\jre\lib\fonts

Bitmap

  • \os2
  • \os2\dll
  • \os2\mdos\winos2\system

Using the Font Palette

The Font Palette is the built-in tool for managing your fonts. It does a reasonable job when working with one font at a time.
  • Applying a Font
  • Installing a Font
  • Removing a Font
  • Multiple palettes

Using the Scheme Palette

The Scheme Palette is the built-in tool for managing desktop window schemes. The schema allows a coordinated set of fonts to be applied to the components of a folder window.

Using Soft Fonts and Cartridges

The printer object provides support for loading and unloading of printer soft fonts.

The controls are usually found in driver properties notebook within the printer object properties notebook.

Using FontFolder

FontFolder terms

Library
A named collection of fonts.
Font Pack
A named collection of fonts that can be installed and uninstalled as a group.

FontFolder actions

  • Register - adds font to library, does not install fonts
  • Install
  • Delete
  • Preview

Modifying Java v1.3.1 fonts

Java can use any physical font installed on the underlying OS, although on OS/2 TrueType fonts seem to be used more often.

Java defines a well known set of logical fonts that are used by components such as AWT.

The mapping from logical to physical font is defined in jre\lib\f.prp .

Modifying Java 1.4.x fonts

Java 1.4.x provides font support comparable to other Java versions.

The mapping from logical to physical font is defined in \java142\jre\lib\font.properties .

Where do I find additional fonts?

MS Web Fonts - Sourceforge

Hobbes

Font cartridges and font CDs are available from many sources.

Creating your own fonts

There are very few native OS/2 tools.

The Warp4 Toolkit includes Font Editor limited to FONT resources.

Hobbes has a few specialized bitmap font editors.

Nothing for Postscript or TrueType.

Some Windows tools work under Odin.

Solving font problems

Font does not render correctly.

Application font dialog crashes.

Mozilla fonts fuzzy.

The Art of choosing a font

Come back next month. Tony will tell all.


The Southern California OS/2 User Group
P.O. Box 26904
Santa Ana, CA 92799-6904, USA

Copyright 2004 the Southern California OS/2 User Group. ALL RIGHTS RESERVED.

SCOUG, Warp Expo West, and Warpfest are trademarks of the Southern California OS/2 User Group. OS/2, Workplace Shell, and IBM are registered trademarks of International Business Machines Corporation. All other trademarks remain the property of their respective owners.