|
Porting
Fonts Across Platforms:
Intro 1 |
|
|
|
|
|
|
|
Understanding Mac® and PC Fonts
|
|
Note:
This is a very basic description of how to port
fonts across platforms and is intended for personal
use only. It is not intended for making commercial
fonts. There are many aspects to font conversion
and you should be aware that a font you prepare
may not function exactly like a commercial font.
It takes a lot of study and practice to get it right. |
Porting fonts between Macintosh® and Windows®
systems is an intermediate to advanced topic depending
on the software you use and the approach you take. Not
all fonts are totally cross-platform compatible. One
reason is that the keyboards of the two platforms are
different and the codes representing the keystrokes
in the font don't always reconcile when the font is
converted. However, it can be very useful to be able
to convert Mac and PC fonts even on a basic level. You
may only have one version of a font that you absolutely
need for the other platform and a converted font will
do in a pinch.
Differences Between Mac and PC Fonts
The biggest difference between Mac and PC fonts is
that the Macintosh file system stores fonts as resources.
As mentioned here,
Mac resources are unusable in the PC file system. Fortunately,
the available font
conversion utilities are fairly inexpensive and
they take care of this difference. As mentioned previously,
another difference is the way the two systems map characters
to the keyboard.
One Byte Fonts
Each character in a font uses a keystroke or combination
of keystrokes to produce the character. Fonts based
on most Western languages will have 256 possible characters.
Each character in these fonts is one-byte in length.
A one-byte character can have one of 256 possible values.
One byte is 8-bits long and
each bit is one of two possible values (either a one
or a zero) so that's 2 to the 8th or 256. Other languages
may require more than 256 characters. Asian languages
use many more characters than Western languages so they
require two bytes per character. Each character in a
two-byte font has one of 65536 possible values.
How Fonts Are Mapped To The Keyboard
All of the characters in a one-byte font can be displayed
in a 256-character map. Shown below is a character map
for Adobe® Garamond on a PC:
In a font, each character is arranged in a specific
order. This is called a font's "encoding",
which is explained in more detail below. The computer
uses this information to tell which character to display
or print when a key is pressed. The spaces occupied
by characters are called "slots". Each slot
represents a different keypress. For example, if you
were working on a word-processing document and you were
to hold the Shift key while pressing the letter "A"
on the keyboard, you would see the letter "A"
appear on the screen.
If you will notice, the above character map is divided
into 2 "zones" - the top zone and the bottom
zone. The top zone has characters 0 through 127 and
the bottom zone has characters 128 through 255. The
point to this is that characters occupying slots 32
through 127 in the top zone are identical in both Macintosh
and Windows operating systems. Characters 0 through
31 (the "lower 32") are usually reserved for
the operating system. The slots in the bottom zone (the
"extended characters") are different. These
are the ones you need to watch.
Encoding
Note: The FontLab® user
manual has a more thorough description of encoding.
The FontLab web site has an online version in Adobe
Acrobat® format which you can download by clicking
here. You can also download the free Adobe Acrobat®
reader from the Adobe web site by clicking
here.
It is important to understand how font conversion software
handles the ordering of characters and the assignment
of their slots in the character map. This is called
the "encoding" of the font. Getting the right
encoding will make the difference between pressing a
key and getting the right character or the wrong character.
All text printed or displayed by a computer is made
up of computer codes. Something has to translate the
codes into character pictures contained in the font.
A font's encoding is simply a lookup table (an index)
which is used to translate computer codes into the characters
in the font.
How the encoding table functions
The graphic below illustrates how the encoding table
functions. The software looks up the computer code in
the encoding table and obtains the name of the character
(three). Then it finds the character in the font whose
name is "three" and displays or prints the
character picture "3" from that font:
Two kinds of encoding
Every character in a font is identified by a unique
name or a number. All standard encoding methods use
either names or numbers to identify characters. Font
conversion or editing software can usually detect the
encoding automatically because it will recognize the
character names or numbers used to identify them.
1. Character identification
by names
Type 1 fonts use names to identify characters. The
graphic below is an example of using names to identify
characters. The number of characters in a font that
uses names encoding is limited to 256.
Examples of using names
to identify characters:
2. Character identification
by numbers
TrueType® fonts use numbers
to identify characters. The graphic below is an example
of using numbers to identify characters. The most widely
supported standard for using numbers to identify characters
is called Unicode. Most Macintosh TrueType fonts and
all Windows TrueType fonts use Unicode to identify characters.
The advantage to using Unicode to identify characters
is that the font can have more than 256 characters.
The Unicode standard uses two bytes per character for
the identifier and, as a result, a font using Unicode
can have up to 65536 possible characters (see
above for one byte and two-byte fonts).
When using Unicode in Western languages, most Windows
Latin fonts use MS Windows 1252 Latin 1 encoding and
most Macintosh Latin fonts use Mac OS Roman encoding.
Examples of using numbers
to identify characters:
Always Use The Correct Encoding
You may be able to get all the characters of the alphabet
right as well as numerals 0 through 9 (because there
is no difference in the way Macintosh and Windows encodes
characters 32 through 127), but one of the tests of
a successful conversion between platforms is to get
ALL the characters right. The only way to do this is
to make sure that the font is properly encoded when
the conversion is made.
Although most font conversion software can select the
encoding automatically, it is not always correct. It
is wise to print out or view the font's character map
to check its encoding after it has been converted (more
here on font utilities which you can use to print out
a character map). It also helps to identify a font's
encoding before the conversion takes place so you can
control the process. As I mentioned at the beginning
of this tutorial this can be an intermediate or an advanced
topic depending upon the software and the approach you
take.
Let's take a look at the software, next...
Click
Here To Continue...
|