java.lang.Object
io.github.jwharm.cairobindings.Proxy
org.freedesktop.cairo.FontFace
org.freedesktop.cairo.ToyFontFace
ToyFontFace is used in cairo's toy text API. The toy API takes UTF-8 encoded
text and is limited in its functionality to rendering simple left-to-right
text with no advanced features. That means for example that most complex
scripts like Hebrew, Arabic, and Indic scripts are out of question. No
kerning or correct positioning of diacritical marks either. The font
selection is pretty limited too and doesn't handle the case that the selected
font does not cover the characters in the text. This set of functions are
really that, a toy text API, for testing and demonstration purposes. Any
serious application should avoid ToyFontFace.
- Since:
- 1.8
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionToyFontFace(MemorySegment address) Constructor used internally to instantiate a java ToyFontFace object for a nativecairo_font_face_tinstance -
Method Summary
Modifier and TypeMethodDescriptionstatic ToyFontFacecreate()Convenience constructor that invokescreate(String, FontSlant, FontWeight)with anullfamilyto specify the platform-specific default font family,FontSlant.NORMALandFontWeight.NORMAL.static ToyFontFacecreate(String family, FontSlant slant, FontWeight weight) Creates a toy font face from a triplet of family, slant, and weight.Gets the family name of a toy font.getSlant()Gets the slant of a toy font.Gets the weight a toy font.Methods inherited from class org.freedesktop.cairo.FontFace
destroy, getFontType, getType, getUserData, setUserData, status
-
Constructor Details
-
ToyFontFace
Constructor used internally to instantiate a java ToyFontFace object for a nativecairo_font_face_tinstance- Parameters:
address- the memory address of the nativecairo_font_face_tinstance
-
-
Method Details
-
create
Convenience constructor that invokescreate(String, FontSlant, FontWeight)with anullfamilyto specify the platform-specific default font family,FontSlant.NORMALandFontWeight.NORMAL.- Returns:
- a newly created ToyFontFace
-
create
Creates a toy font face from a triplet of family, slant, and weight. These font faces are used in implementation of the Cairo "toy" font API.If
familyis empty, the platform-specific default family is assumed. The default family then can be queried usinggetFamily().The
Context.selectFontFace(String, FontSlant, FontWeight)function uses this to create font faces. See that function for limitations and other details of toy font faces.- Parameters:
family- a font family nameslant- the slant for the fontweight- the weight for the font- Returns:
- a newly created ToyFontFace
- Since:
- 1.8
-
getFamily
-
getSlant
-
getWeight
-