Class FontFace

java.lang.Object
io.github.jwharm.cairobindings.Proxy
org.freedesktop.cairo.FontFace
Direct Known Subclasses:
FTFontFace, ToyFontFace, UserFontFace

public sealed class FontFace extends Proxy permits ToyFontFace, FTFontFace, UserFontFace
The base class for font faces.

FontFace represents a particular font at a particular weight, slant, and other characteristic but no size, transformation, or size.

Font faces are created using font-backend-specific constructors, typically of the form FontFaceClass.create(), or implicitly using the toy text API by way of Context.selectFontFace(String, FontSlant, FontWeight). The resulting face can be accessed using Context.getFontFace().

A FontFace specifies all aspects of a font other than the size or font matrix (a font matrix is used to distort a font by shearing it or scaling it unequally in the two directions) . A font face can be set on a Context by using Context.setFontFace(FontFace) the size and font matrix are set with Context.setFontSize(double) and Context.setFontMatrix(Matrix).

There are various types of font faces, depending on the font backend they use. The type of a font face can be queried using getFontType().

Since:
1.0
See Also: