java.lang.Object
io.github.jwharm.cairobindings.Proxy
org.freedesktop.cairo.FontFace
org.freedesktop.cairo.FTFontFace
Provides a FontFace for FreeType.
The FreeType font backend is primarily used to render text on GNU/Linux systems, but can be used on other platforms too.
- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionFTFontFace(MemorySegment address) Constructor used internally to instantiate a java FTFontFace object for a nativecairo_font_faceinstance -
Method Summary
Modifier and TypeMethodDescriptionstatic FTFontFaceCreates a new font face for the FreeType font backend from a pre-opened FreeType face.SeeFTSynthesize.voidsetSynthesize(Set<FTSynthesize> synthFlags) FreeType provides the ability to synthesize different glyphs from a base font, which is useful if you lack those glyphs from a true bold or oblique font.voidunsetSynthesize(Set<FTSynthesize> synthFlags) SeeFTSynthesize.Methods inherited from class org.freedesktop.cairo.FontFace
destroy, getFontType, getType, getUserData, setUserData, status
-
Constructor Details
-
FTFontFace
Constructor used internally to instantiate a java FTFontFace object for a nativecairo_font_faceinstance- Parameters:
address- the memory address of the nativecairo_font_faceinstance
-
-
Method Details
-
create
Creates a new font face for the FreeType font backend from a pre-opened FreeType face. This font can then be used withContext.setFontFace(FontFace)orFTScaledFont.create(FTFontFace, Matrix, Matrix, FontOptions). TheFTScaledFontreturned fromFTScaledFont.create()is also for the FreeType backend and can be used with functions such asFTScaledFont.lockFace(). Note that Cairo may keep a reference to the FT_Face alive in a font-cache and the exact lifetime of the reference depends highly upon the exact usage pattern and is subject to external factors. The Java bindings will callFT_Done_Face()when the last reference to theFTFontFacehas been dropped (using aCleaner).- Parameters:
ftFace- A FreeType face object, already opened.loadFlags- flags to pass toFT_Load_Glyphwhen loading glyphs from the font. These flags are OR'ed together with the flags derived from theFontOptionspassed toScaledFont.create(FontFace, Matrix, Matrix, FontOptions), so only a few values such asFT_LOAD_VERTICAL_LAYOUT, andFT_LOAD_FORCE_AUTOHINTare useful. You should not pass any of the flags affecting the load target, such asFT_LOAD_TARGET_LIGHT.- Returns:
- a newly created FTFontFace.
- Since:
- 1.0
-
getSynthesize
SeeFTSynthesize.- Returns:
- the current set of synthesis options.
- Since:
- 1.12
-
setSynthesize
FreeType provides the ability to synthesize different glyphs from a base font, which is useful if you lack those glyphs from a true bold or oblique font. See alsoFTSynthesize.- Parameters:
synthFlags- the set of synthesis options to enable- Since:
- 1.12
-
unsetSynthesize
SeeFTSynthesize.- Parameters:
synthFlags- the set of synthesis options to disable- Since:
- 1.12
-