# Cairo::ToyFontFace Class Reference

A simple font face used for the cairo 'toy' font API. More...

Inheritance diagram for Cairo::ToyFontFace:
[legend]

List of all members.

## Public Member Functions

std::string | get_family () const
| Gets the familly name of a toy font.
FontSlant | get_slant () const
| Gets the slant a toy font.
FontWeight | get_weight () const
| Gets the weight a toy font.

## Static Public Member Functions

static RefPtr< ToyFontFace > | create (const std::string& family, FontSlant slant, FontWeight weight)
| Creates a font face from a triplet of family, slant, and weight.

## Protected Member Functions

| ToyFontFace (const std::string& family, FontSlant slant, FontWeight weight)

## Detailed Description

A simple font face used for the cairo 'toy' font API.

Since:
  1.8

## Constructor & Destructor Documentation

Cairo::ToyFontFace::ToyFontFace | ( | const std::string & | family,
|  | FontSlant | slant,
|  | FontWeight | weight
| ) |  | `[protected]`

## Member Function Documentation

static RefPtr<ToyFontFace> Cairo::ToyFontFace::create | ( | const std::string & | family,
|  | FontSlant | slant,
|  | FontWeight | weight
| ) |  | `[static]`

Creates a font face from a triplet of family, slant, and weight.

These font faces are used in implementation of the the Context "toy" font API.

If family is the zero-length string "", the platform-specific default family is assumed. The default family then can be queried using get_family().

The Context::select_font_face() function uses this to create font faces. See that function for limitations of toy font faces.

Parameters:

  family | a font family name, encoded in UTF-8.
  slant | the slant for the font.
  weight | the weight for the font.

Examples:
  toy-text.cc, and user-font.cc.

std::string Cairo::ToyFontFace::get_family | ( |  | ) | const

Gets the familly name of a toy font.

FontSlant Cairo::ToyFontFace::get_slant | ( |  | ) | const

Gets the slant a toy font.

FontWeight Cairo::ToyFontFace::get_weight | ( |  | ) | const

Gets the weight a toy font.

The documentation for this class was generated from the following file:

- cairomm/fontface.h