To contents Next section

12.26.1 Image.TTF.Face

CLASS
Image.TTF.Face

DESCRIPTION
This represents instances of TTF Faces.

METHOD
Image.TTF.Face.flush

SYNTAX
object flush()

DESCRIPTION
This flushes all cached information. Might be used to save memory - the face information is read back from disk upon need.

RETURNS
the called object

METHOD
Image.TTF.Face.names,
Image.TTF.Face._names

SYNTAX
mapping names()
array(array) _names()

DESCRIPTION
Gives back the names or the complete name-list of this face.

The result from names() is a mapping, which has any or all of these indices:

"copyright":   ("Copyright the Foo Corporation...bla bla")
"family":      ("My Little Font")
"style":       ("Bold")
"full":        ("Foo: My Little Font: 1998")
"expose":      ("My Little Font Bold")
"version":     ("June 1, 1998; 1.00, ...")
"postscript":  ("MyLittleFont-Bold")
"trademark":   ("MyLittleFont is a registered...bla bla")

This is extracted from the information from _names(), and fit into pike-strings using unicode or iso-8859-1, if possible.

The result from _names() is a matrix, on this form:

({ ({ int platform, encoding, language, id, string name }),
({ int platform, encoding, language, id, string name }),
...
})

RETURNS
the name as a mapping to string or the names as a matrix

NOTE
To use the values from _names(), check the TrueType standard documentation.

METHOD
Image.TTF.Face.properties

SYNTAX
mapping properties()

DESCRIPTION
This gives back a structure of the face's properties. Most of this stuff is information you can skip.

The most interesting item to look at may be ->num_Faces, which describes the number of faces in a .TTC font collection.

RETURNS
a mapping of a lot of properties

METHOD
Image.TTF.Face.`

SYNTAX
object `()()

DESCRIPTION
This instantiates the face for normal usage - to convert font data to images.

RETURNS
a Image.TTF.FaceInstance object.

To contents Next section