Class GD2::Font
In: lib/gd2/font.rb
Parent: Object

Description

Font objects represent a particular font in a particular size.

Built-in Fonts

The following font classes may be used without further instantiation:

  Font::Tiny
  Font::Small
  Font::MediumBold
  Font::Large
  Font::Giant

TrueType Fonts

To use a TrueType font, first instantiate the font at a particular size:

  font = Font::TrueType[fontname, ptsize]

Here fontname may be a path to a TrueType font, or a fontconfig pattern if fontconfig support is enabled (see Font::TrueType.fontconfig).

See Font::TrueType.new for further options.

Classes and Modules

Class GD2::Font::Giant
Class GD2::Font::Large
Class GD2::Font::MediumBold
Class GD2::Font::Small
Class GD2::Font::Tiny
Class GD2::Font::TrueType

[Validate]