| |
|
| java.lang.Object com.sun.perseus.builder.DefaultFontFace
DefaultFontFace | final public class DefaultFontFace (Code) | | This helper class encapsulates the creation of a default FontFace
which a renderer can use.
This class tries to load an SVG file containing a font. The resource
identifier for the default font is:
com/sun/perseus/renderer/resources/defaultFont.svg
Note: the defaultFont.svg is loaded and its first
<font> element is loaded. The first <font>
element must be the first child of the root <svg> element. Any
other structure for the defaultFont.svg file will result in an
Error.
This helper class also encapsulates the creation and loading of a set
of FontFaces for the initial font-family value. The fonts are
expected to all be in a single initial font file:
com/sun/perseus/renderer/resources/initialFont.svg
Note: the initialFont.svg is loaded and all the
children of the root <svg> element are expected to
be <font> elements. Any
other structure for the initialFont.svg file will result in an
Error.
See Also: com.sun.perseus.render.RenderGraphics version: $Id: DefaultFontFace.java,v 1.6 2006/07/17 00:35:43 st125089 Exp $ |
defaultFontFace | protected static FontFace defaultFontFace(Code) | | The default font face is cached so that it is loaded only
once
|
initialFontFaces | protected static FontFace[] initialFontFaces(Code) | | The set of initial font faces is cached so that it is loaded
only once.
|
loadDefaultFontFace | static void loadDefaultFontFace() throws Error(Code) | | Loads the default font face. This assumes that the font face file
has not been loaded already. If the load of the font face fails, the
application throws an error.
throws: Error - if there is an error while loading the default font face file. See Also: DefaultFontFace.getDefaultFontFace |
loadInitialFontFaces | static void loadInitialFontFaces() throws Error(Code) | | Loads the initial font faces. This assumes that the font face file
has not been loaded already. If the load of the font face fails, the
application throws an error.
throws: Error - if there is an error while loading the file. An error is generated. See Also: DefaultFontFace.getInitialFontFaces |
loadSVGFontResource | protected static ModelNode loadSVGFontResource(InputStream is) throws Exception(Code) | | Helper method: loads an SVG Font resource file
Parameters: svgResource - the SVG Font resource file The root <svg> element representing the resource file. throws: Exception - if an error happens while loading the resource |
|
|
|