public class FontCache extends Object
Constructor and Description |
---|
FontCache() |
Modifier and Type | Method and Description |
---|---|
List<String> |
getAlternatives(String name)
Given a font name, returns alternatives for other scripts, based on the assumption they start
with the same base name, e.g., "Noto Sans" also has a number of alternative fonts dedicated
to specific scripts, like "Noti Sans Urdu", "Noto Sans Arabic", "Noto Sans Javanese" and so
on.
|
Set<String> |
getAvailableFonts()
Returns the set of font families and font faces available in the system and those manually
loaded into the cache
|
static FontCache |
getDefaultInstance()
Returns the default, system wide font cache
|
Font |
getFont(String requestedFont) |
static Font |
loadFromUrl(String fontUrl)
Tries to load the specified font name as a URL.
|
void |
registerFont(Font f)
Adds the specified font in the font cache.
|
void |
resetCache()
Resets the font loading cache.
|
public static FontCache getDefaultInstance()
public static Font loadFromUrl(String fontUrl)
public void registerFont(Font f)
public void resetCache()
public Set<String> getAvailableFonts()
public List<String> getAlternatives(String name)
Copyright © 1996–2023 Geotools. All rights reserved.