diff --git a/docs/glyphs/glyphs-1.html b/docs/glyphs/glyphs-1.html index 15bd0cca5..df4bee7c3 100644 --- a/docs/glyphs/glyphs-1.html +++ b/docs/glyphs/glyphs-1.html @@ -1,12 +1,13 @@ - + - - - - FreeType Glyph Conventions + + + FreeType Glyph Conventions - -

-FreeType Glyph Conventions -

+

+ FreeType Glyph Conventions +

-

-version 2.1 -

- -

-Copyright 1998-2000 David Turner (david@freetype.org)
-Copyright 2000 The FreeType Development Team (devel@freetype.org) -

- -
+
- -
- - - -
-  - -Contents - -Next -
- -
-

-I. Basic typographic concepts +

+ Version 2.1

-
-

-1. Font files, format and information -

+

+ Copyright 1998-2000 David Turner (david@freetype.org)
+ Copyright 2000 The FreeType Development Team (devel@freetype.org) +

-

-A font is a collection of various character images that can -be used to display or print text. The images in a single font share some -common properties, including look, style, serifs, etc.. Typographically -speaking, one has to distinguish between a font family and its -multiple font faces, which usually differ in style though come -from the same template.

+
+ +
-For example, "Palatino Regular" and "Palatino Italic" are -two distinct faces from the same famous family, called -"Palatino" itself.

+
+ + + + + + +
+   + + Contents + + Next +
+
-

The single term font is nearly always used in ambiguous ways to refer -to either a given family or given face, depending on the context. For example, -most users of word-processors use "font" to describe a font family (e.g. -Courier, Palatino, etc..); however most of these families are implemented -through several data files depending on the file format : for TrueType, -this is usually one per face (i.e. ARIAL.TFF for "Arial Regular", ARIALI.TTF -for "Arial Italic", etc..). The file is also called a "font" but really -contains a font face. -

+ + +
+

+ I. Basic typographic concepts +

+
-

A digital font is thus a data file that may contain one or -more font faces. For each of these, it contains character images, -character metrics, as well as other kind of information important to the -layout of text and the processing of specific character encodings. In some -awkward formats, like Adobe Type1, a single font face is described through -several files (i.e. one contains the character images, another one the -character metrics). We will ignore this implementation issue in most of -this document and consider digital fonts as single files, though FreeType -2.0 is able to support multiple-files fonts correctly. -

+ +

+ 1. Font files, format and information +

-

As a convenience, a font file containing more than one face is called -a font collection. This case is rather rare but can be seen in many asian -fonts, which contain images for two or more scripts for a given language. -

+

A font is a collection of various character images that can be used + to display or print text. The images in a single font share some common + properties, including look, style, serifs, etc. Typographically + speaking, one has to distinguish between a font family and its + multiple font faces, which usually differ in style though come + from the same template.

+ + For example, "Palatino Regular" and "Palatino Italic" are two distinct + faces from the same famous family, called "Palatino" + itself.

+ +

The single term font is nearly always used in ambiguous ways + to refer to either a given family or given face, depending on the + context. For example, most users of word-processors use "font" to + describe a font family (e.g. "Courier", "Palatino", etc.); however most + of these families are implemented through several data files depending + on the file format: For TrueType, this is usually one per face (i.e. + arial.ttf for "Arial Regular", ariali.ttf for "Arial + Italic", etc.). The file is also called a "font" but really contains a + font face.

+ +

A digital font is thus a data file that may contain one + or more font faces. For each of these, it contains character + images, character metrics, as well as other kind of information + important to the layout of text and the processing of specific character + encodings. In some awkward formats, like Adobe's Type 1, a single + font face is described through several files (i.e. one contains the + character images, another one the character metrics). We will ignore + this implementation issue in most parts of this document and consider + digital fonts as single files, though FreeType 2.0 is able to + support multiple-files fonts correctly.

+ +

As a convenience, a font file containing more than one face is called + a font collection. This case is rather rare but can be seen in + many Asian fonts, which contain images for two or more representation + forms of a given scripts (usually for horizontal and vertical + layout.

+
+

+ 2. Character images and mappings +

-

-2. Character images and mappings : -

+

The character images are called glyphs. A single character + can have several distinct images, i.e. several glyphs, depending on + script, usage or context. Several characters can also take a single + glyph (good examples are Roman ligatures like "fi" and "fl" which can be + represented by a single glyph). The relationships between characters + and glyphs can be very complex, but won't be discussed in this document. + Moreover, some formats use more or less awkward schemes to store and + access glyphs. For the sake of clarity, we only retain the following + notions when working with FreeType:

+ +
    +
  • +

    A font file contains a set of glyphs; each one can be stored as a + bitmap, a vector representation or any other scheme (most scalable + formats use a combination of mathematical representation and control + data/programs). These glyphs can be stored in any order in the font + file, and is typically accessed through a simple glyph index.

    +
  • +
  • +

    The font file contains one or more tables, called a character + map (or charmap in short), which is used to convert character + codes for a given encoding (e.g. ASCII, Unicode, DBCS, Big5, etc..) + into glyph indices relative to the font file. A single font face + may contain several charmaps. For example, most TrueType fonts + contain an Apple-specific charmap as well as a Unicode charmap, + which makes them usable on both Mac and Windows platforms.

    +
  • +
+
+

+ 3. Character and font metrics +

-

The character images are called glyphs. A single character -can have several distinct images, i.e. several glyphs, depending on script, -usage or context. Several characters can also take a single glyph (good -examples are roman ligatures like "oe" and "fi" which can be represented -by a single glyph). The relationships between characters -and glyphs can be a very complex one but won't be detailed in this document. -Moreover, some formats use more or less awkward schemes to store and access -the glyphs. For the sake of clarity, we'll only retain the following notions -when working with FreeType :

+

Each glyph image is associated to various metrics which are used to + describe how must be placed and managed when rendering text. Though + they are described in more details in section III, they relate to + glyph placement, cursor advances as well as text layout. They are + extremely important to compute the flow of text when rendering a string + of text.

-
    -

  • -A font file contains a set of glyphs, each one can be stored as a bitmap, -a vector representation or any other scheme (e.g. most scalable formats -use a combination of math representation and control data/programs). These -glyphs can be stored in any order in the font file, and is typically accessed -through a simple glyph index. -
  • +

    Each scalable format also contains some global metrics, expressed in + notional units, to describe some properties of all glyphs in the same + face. Examples for global metrics are the maximum glyph bounding box, + the ascender, descender and text height for the font.

    -

  • -The font file contains one (or more) table, called a character map (or -charmap in short), which is used to convert character codes for a given -encoding (e.g. ASCII, Unicode, DBCS, Big5, etc..) into glyph indexes -relative to the font file. A single font face may contain several charmaps. -For example, most TrueType fonts contain an Apple-specific charmap as well -as a Unicode charmap, which makes them usable on both Mac and Windows -platforms. -
  • -
+

Though these metrics also exist for non-scalable formats, they only + apply for a set of given character dimensions and resolutions, and + they are usually expressed in pixels then.

+
+ + + + + + +
+   + + Contents + + Next +
+
-

-3. Character and font metrics : -

- -

Each glyph image is associated to various metrics which are used to -describe the way it must be placed and managed when rendering text. Though -they are described in more details in section III, they relate to glyph -placement, cursor advances as well as text layouts. They are extremely -important to compute the flow of text when rendering string of text. -

- -

Each scalable format also contains some global metrics, expressed in -notional units, used to describe some properties of all glyphs in a same -face. For example : the maximum glyph bounding box, the ascender, descender -and text height for the font. -

- -

Though these metrics also exist for non-scalable formats, they only -apply for a set of given character dimensions and resolutions, and they're -usually expressed in pixels then.

- -
- - - -
-  - -Contents - -Next -
- -
- +
+