@ThreadSafe public class PreloadFontManager extends Object implements IPreloadFontResolver
PreloadFonts.| Constructor and Description |
|---|
PreloadFontManager()
Default constructor which registers the standard 14 fonts.
|
PreloadFontManager(boolean bRegisterStandardFonts)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPreloadFont(PreloadFont aPreloadFont)
Add a pre-created
PreloadFont. |
com.helger.commons.collection.ext.ICommonsList<PreloadFont> |
getAllPreloadFonts() |
com.helger.commons.collection.ext.ICommonsList<PreloadFont> |
getAllPreloadFonts(Predicate<? super PreloadFont> aFilter) |
PreloadFont |
getOrAddEmbeddingPreloadFont(com.helger.font.api.IFontResource aFontRes)
Create and add a new embedding
PreloadFont if it is not yet
contained. |
PreloadFont |
getOrAddEmbeddingPreloadFont(com.helger.font.api.IHasFontResource aFontResProvider)
Create and add a new embedding
PreloadFont if it is not yet
contained. |
PreloadFont |
getPreloadFontOfID(String sID)
Get the
PreloadFont with the provided ID. |
String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetPreloadFontOfID, getPreloadFontOfIDpublic PreloadFontManager()
public PreloadFontManager(boolean bRegisterStandardFonts)
bRegisterStandardFonts - true to register the standard 14 fonts,
false to not do it.public void addPreloadFont(@Nonnull PreloadFont aPreloadFont)
PreloadFont.aPreloadFont - The font to be added. May not be null.@Nonnull public PreloadFont getOrAddEmbeddingPreloadFont(@Nonnull com.helger.font.api.IHasFontResource aFontResProvider)
PreloadFont if it is not yet
contained.aFontResProvider - The font resource provider to be added for embedding. May not be
null.PreloadFont. Never null.@Nonnull public PreloadFont getOrAddEmbeddingPreloadFont(@Nonnull com.helger.font.api.IFontResource aFontRes)
PreloadFont if it is not yet
contained.aFontRes - The font resource to be added for embedding. May not be
null.PreloadFont. Never null.@Nullable public PreloadFont getPreloadFontOfID(@Nullable String sID)
IPreloadFontResolverPreloadFont with the provided ID.getPreloadFontOfID in interface IPreloadFontResolversID - The ID to be resolved. May be null.null if no such PreloadFont exists.@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsList<PreloadFont> getAllPreloadFonts()
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsList<PreloadFont> getAllPreloadFonts(@Nullable Predicate<? super PreloadFont> aFilter)
Copyright © 2014–2016 Philip Helger. All rights reserved.