fop 2.1

org.apache.fop.afp.fonts
Class OutlineFont

java.lang.Object
  extended by org.apache.fop.fonts.Typeface
      extended by org.apache.fop.afp.fonts.AFPFont
          extended by org.apache.fop.afp.fonts.AbstractOutlineFont
              extended by org.apache.fop.afp.fonts.OutlineFont
All Implemented Interfaces:
FontMetrics
Direct Known Subclasses:
AFPFontConfig.AFPTrueTypeFont

public class OutlineFont
extends AbstractOutlineFont

Default implementation of AbstractOutlineFont.


Field Summary
 
Fields inherited from class org.apache.fop.afp.fonts.AbstractOutlineFont
charSet
 
Fields inherited from class org.apache.fop.afp.fonts.AFPFont
name
 
Fields inherited from class org.apache.fop.fonts.Typeface
eventListener, NOT_FOUND
 
Constructor Summary
OutlineFont(java.lang.String name, boolean embeddable, CharacterSet charSet, AFPEventProducer eventProducer)
          Construct outline font with specified name and character set.
 
Method Summary
 java.awt.Rectangle getBoundingBox(int character, int size)
          Returns the bounding box of the glyph at the given index, for the given font size.
 int getWidth(int character, int size)
          Obtain the width of the character for the specified point size.
 
Methods inherited from class org.apache.fop.afp.fonts.AbstractOutlineFont
getAscender, getCapHeight, getCharacterSet, getCharacterSet, getDescender, getEncodingName, getUnderlinePosition, getUnderlineThickness, getXHeight, hasChar, mapChar
 
Methods inherited from class org.apache.fop.afp.fonts.AFPFont
getEmbedFontName, getFamilyNames, getFontName, getFontType, getFontURI, getFullName, getKerningInfo, getStrikeoutPosition, getStrikeoutThickness, getWidths, hasKerningInfo, isEmbeddable, toString, toUnicodeCodepoint
 
Methods inherited from class org.apache.fop.fonts.Typeface
getMaxAscent, hadMappingOperations, hasFeature, isMultiByte, notifyMapOperation, setEventListener, warnMissingGlyph
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OutlineFont

public OutlineFont(java.lang.String name,
                   boolean embeddable,
                   CharacterSet charSet,
                   AFPEventProducer eventProducer)
Construct outline font with specified name and character set.

Parameters:
name - font's name
embeddable - whether or not this font is embeddable
charSet - font's character set
eventProducer - Handles any AFP related events
Method Detail

getWidth

public int getWidth(int character,
                    int size)
Obtain the width of the character for the specified point size.

Parameters:
character - the character
size - the font size (in mpt)
Returns:
the width of the character for the specified point size

getBoundingBox

public java.awt.Rectangle getBoundingBox(int character,
                                         int size)
Description copied from class: AFPFont
Returns the bounding box of the glyph at the given index, for the given font size.

Specified by:
getBoundingBox in interface FontMetrics
Specified by:
getBoundingBox in class AFPFont
Parameters:
character - glyph index
size - font size
Returns:
the scaled bounding box scaled in 1/1000ths of the given size

fop 2.1

Copyright 1999-2016 The Apache Software Foundation. All Rights Reserved.