|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mt4j.components.visibleComponents.font.FontManager
public class FontManager
Manager for creating fonts. Manages a set of IFontFactory classes.
Method Summary | |
---|---|
IFont |
createFont(processing.core.PApplet pa, java.lang.String fontFileName, int fontSize) Loads and returns a font from a file. |
IFont |
createFont(processing.core.PApplet pa, java.lang.String fontFileName, int fontSize, MTColor fillColor, MTColor strokeColor) Loads and returns a vector font from a file. |
static boolean |
fontsAreEqual(IFont font, java.lang.String IVectorFontFileName, int fontSize, MTColor fillColor, MTColor strokeColor) Fonts are equal. |
static FontManager |
getInstance() Gets the instance. |
static boolean |
isFontsAreEqual(IFont font1, IFont font2) Checks if is fonts are equal. |
void |
registerFontFactory(java.lang.String fileSuffix, IFontFactory factory) Register a new fontfactory for a file type. |
void |
unregisterFontFactory(IFontFactory factory) Unregister a fontfactory for a file type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static FontManager getInstance()
createFont
to create a font with itpublic IFont createFont(processing.core.PApplet pa, java.lang.String fontFileName, int fontSize)
pa
- the pafontFileName
- the font file namefontSize
- the font sizepublic IFont createFont(processing.core.PApplet pa, java.lang.String fontFileName, int fontSize, MTColor fillColor, MTColor strokeColor)
pa
- the pafontFileName
- the font file namefontSize
- the font sizefillColor
- the fill colorstrokeColor
- the stroke colorpublic void registerFontFactory(java.lang.String fileSuffix, IFontFactory factory)
factory
- the factoryfileSuffix
- the file suffix to use with that factory. ".ttf" for example.public void unregisterFontFactory(IFontFactory factory)
factory
- the factorypublic static boolean fontsAreEqual(IFont font, java.lang.String IVectorFontFileName, int fontSize, MTColor fillColor, MTColor strokeColor)
font
- the fontIVectorFontFileName
- the i vector font file namefontSize
- the font sizefillColor
- the fill colorstrokeColor
- the stroke colorpublic static boolean isFontsAreEqual(IFont font1, IFont font2)
font1
- the font1font2
- the font2
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |