org.freehep.graphicsio.svg
Class SVGFontTable
java.lang.Object
org.freehep.graphicsio.svg.SVGFontTable
public class SVGFontTable
- extends Object
A table to remember which glyphs were used while writing a svg file.
Entries are added by calling addGlyphs(String, java.awt.Font).
The final SVG tag for the section is generated using toString().
Use normalize(java.util.Map) for referencing embedded glyphs
in tags.
- Version:
- $Id: freehep-graphicsio-svg/src/main/java/org/freehep/graphicsio/svg/SVGFontTable.java 4c4708a97391 2007/06/12 22:32:31 duns $
- Author:
- Steffen Greiffenberg
SVGFontTable
public SVGFontTable()
addGlyphs
protected void addGlyphs(String string,
Font font)
- creates the glyph for the string
- Parameters:
string - font -
toString
public String toString()
- creates the font entry:
...
- Overrides:
toString in class Object
- Returns:
- string representing the entry
normalize
public static void normalize(Map<AttributedCharacterIterator.Attribute,Object> attributes)
- Replaces TextAttribute.FAMILY by values of replaceFonts. When a
font created using the result of this method the transformation would be:
java.awt.Font[family=SansSerif,name=SansSerif,style=plain,size=30]
will result to:
java.awt.Font[family=SansSerif,name=Helvetica,style=plain,size=30]
Uses FontTable.normalize(java.util.Map) first.
- Parameters:
attributes - with font name to change
Copyright © 2014. All rights reserved.