java.lang.Object
com.dua3.utility.fx.FxFontUtil
- Alle implementierten Schnittstellen:
com.dua3.utility.text.FontUtil<Font>
Utility class for working with fonts in JavaFX.
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen com.dua3.utility.text.FontUtil
com.dua3.utility.text.FontUtil.FontTypes -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungconvert(com.dua3.utility.text.Font font) Converts a com.dua3.utility.text.Font object to a JavaFX Font object.com.dua3.utility.text.FontConverts a JavaFX Font object to a com.dua3.utility.text.Font object.com.dua3.utility.text.FontderiveFont(com.dua3.utility.text.Font font, com.dua3.utility.text.FontDef fontDef) com.dua3.utility.text.FontgetFamilies(com.dua3.utility.text.FontUtil.FontTypes types) static com.dua3.utility.text.FontDatagetFontData(Font fxFont) Extracts font data from a JavaFX Font object.static com.dua3.utility.text.FontDefgetFontDef(Font fxFont) Extracts font characteristics from a JavaFX Font object and creates a corresponding FontDef object.static FxFontUtilReturns an instance of FxUtil.com.dua3.utility.math.geometry.Rectangle2fgetTextDimension(CharSequence s, com.dua3.utility.text.Font f) com.dua3.utility.math.geometry.Rectangle2fgetTextDimension(CharSequence s, Font f) Calculates the dimensions of the given text when rendered with the specified font.doublegetTextHeight(CharSequence s, com.dua3.utility.text.Font f) doublegetTextWidth(CharSequence s, com.dua3.utility.text.Font f) com.dua3.utility.text.FontloadFontAs(InputStream in, com.dua3.utility.text.Font font) List<com.dua3.utility.text.Font> loadFonts(InputStream in) Von Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden com.dua3.utility.text.FontUtil
getFamilies, getFont, getFont, getRichTextDimension
-
Methodendetails
-
getInstance
Returns an instance of FxUtil.- Gibt zurück:
- the instance of FxUtil
-
convert
Converts a com.dua3.utility.text.Font object to a JavaFX Font object.- Angegeben von:
convertin Schnittstellecom.dua3.utility.text.FontUtil<Font>- Parameter:
font- the com.dua3.utility.text.Font object to be converted- Gibt zurück:
- the converted JavaFX Font object
-
convert
Converts a JavaFX Font object to a com.dua3.utility.text.Font object.- Angegeben von:
convertin Schnittstellecom.dua3.utility.text.FontUtil<Font>- Parameter:
fxFont- the JavaFX Font object to be converted- Gibt zurück:
- the converted com.dua3.utility.text.Font object
-
getFontData
Extracts font data from a JavaFX Font object.- Parameter:
fxFont- the JavaFX Font object from which the font data is extracted- Gibt zurück:
- a FontData object containing detailed information about the font, including its family, size, style attributes such as bold, italic, underline, and strike-through, and additional metrics like ascent, descent, height, and space width
-
getFontDef
Extracts font characteristics from a JavaFX Font object and creates a corresponding FontDef object.- Parameter:
fxFont- the JavaFX Font object to be analyzed- Gibt zurück:
- a FontDef object containing the extracted font properties such as family, size, bold, italic, underline, and strikethrough
-
getTextDimension
public com.dua3.utility.math.geometry.Rectangle2f getTextDimension(CharSequence s, com.dua3.utility.text.Font f) - Angegeben von:
getTextDimensionin Schnittstellecom.dua3.utility.text.FontUtil<Font>
-
getTextDimension
Calculates the dimensions of the given text when rendered with the specified font.- Parameter:
s- the text to measuref- the font used to render the text- Gibt zurück:
- a
Rectangle2fobject representing the dimensions of the rendered text
-
getTextWidth
- Angegeben von:
getTextWidthin Schnittstellecom.dua3.utility.text.FontUtil<Font>
-
getTextHeight
- Angegeben von:
getTextHeightin Schnittstellecom.dua3.utility.text.FontUtil<Font>
-
loadFonts
- Angegeben von:
loadFontsin Schnittstellecom.dua3.utility.text.FontUtil<Font>
-
getFamilies
- Angegeben von:
getFamiliesin Schnittstellecom.dua3.utility.text.FontUtil<Font>
-
loadFontAs
public com.dua3.utility.text.Font loadFontAs(InputStream in, com.dua3.utility.text.Font font) throws IOException - Angegeben von:
loadFontAsin Schnittstellecom.dua3.utility.text.FontUtil<Font>- Löst aus:
IOException
-
getDefaultFont
public com.dua3.utility.text.Font getDefaultFont()- Angegeben von:
getDefaultFontin Schnittstellecom.dua3.utility.text.FontUtil<Font>
-
deriveFont
public com.dua3.utility.text.Font deriveFont(com.dua3.utility.text.Font font, com.dua3.utility.text.FontDef fontDef) - Angegeben von:
deriveFontin Schnittstellecom.dua3.utility.text.FontUtil<Font>
-