public class PrismFontLoader extends FontLoader
| Constructor and Description |
|---|
PrismFontLoader() |
| Modifier and Type | Method and Description |
|---|---|
float |
computeStringWidth(String string,
Font font) |
Font |
font(String family,
FontWeight weight,
FontPosture posture,
float size)
Searches for an appropriate font based on the font family name and
weight and posture style.
|
List<String> |
getFamilies()
Gets all the font families installed on the user's system, including any
embedded fonts or SDK fonts.
|
FontMetrics |
getFontMetrics(Font font) |
List<String> |
getFontNames()
Gets the names of all fonts that are installed on the users system,
including any embedded fonts and SDK fonts.
|
List<String> |
getFontNames(String family)
Gets the names of all fonts in the specified font family that are
installed on the users system, including any embedded fonts and
SDK fonts.
|
static PrismFontLoader |
getInstance() |
float |
getSystemFontSize() |
void |
loadFont(Font font) |
Font |
loadFont(InputStream in,
double size) |
Font |
loadFont(String path,
double size) |
public static PrismFontLoader getInstance()
public Font loadFont(InputStream in, double size)
loadFont in class FontLoaderpublic Font loadFont(String path, double size)
loadFont in class FontLoaderpublic List<String> getFamilies()
getFamilies in class FontLoaderpublic List<String> getFontNames()
getFontNames in class FontLoaderpublic List<String> getFontNames(String family)
getFontNames in class FontLoaderpublic Font font(String family, FontWeight weight, FontPosture posture, float size)
font in class FontLoaderfamily - The family of the fontweight - The weight of the fontposture - The posture or posture of the fontsize - The point size of the font. This can be a fractional valuepublic void loadFont(Font font)
loadFont in class FontLoaderfont - public FontMetrics getFontMetrics(Font font)
getFontMetrics in class FontLoaderpublic float computeStringWidth(String string, Font font)
computeStringWidth in class FontLoaderpublic float getSystemFontSize()
getSystemFontSize in class FontLoaderCopyright © 2025. All rights reserved.