org.apache.fop.fonts

Class LazyFont

Implemented Interfaces:
FontDescriptor, FontMetrics

public class LazyFont
extends Typeface
implements FontDescriptor

This class is used to defer the loading of a font until it is really used.

Constructor Summary

LazyFont(EmbedFontInfo fontInfo, FontResolver resolver)
Main constructor

Method Summary

int
getAscender()
int
getAscender(int size)
int
getCapHeight()
int
getCapHeight(int size)
int
getDescender()
int
getDescender(int size)
String
getEmbedFontName()
String
getEncoding()
Set
getFamilyNames()
int
getFlags()
int[]
getFontBBox()
String
getFontName()
FontType
getFontType()
String
getFullName()
int
getItalicAngle()
Map
getKerningInfo()
int
getMaxAscent(int size)
Typeface
getRealFont()
Gets the real font.
int
getStemV()
int
getWidth(int i, int size)
int[]
getWidths()
int
getXHeight(int size)
boolean
hadMappingOperations()
boolean
hasChar(char c)
boolean
hasKerningInfo()
boolean
isEmbeddable()
boolean
isMultiByte()
char
mapChar(char c)
String
toString()
String representation of LazyFont

Methods inherited from class org.apache.fop.fonts.Typeface

getEncoding, getMaxAscent, hadMappingOperations, hasChar, isMultiByte, mapChar, notifyMapOperation

Constructor Details

LazyFont

public LazyFont(EmbedFontInfo fontInfo,
                FontResolver resolver)
Main constructor
Parameters:
fontInfo - the font info to embed
resolver - the font resolver to handle font URIs

Method Details

getAscender

public int getAscender()
Specified by:
getAscender in interface FontDescriptor

getAscender

public int getAscender(int size)
Specified by:
getAscender in interface FontMetrics

getCapHeight

public int getCapHeight()
Specified by:
getCapHeight in interface FontDescriptor

getCapHeight

public int getCapHeight(int size)
Specified by:
getCapHeight in interface FontMetrics

getDescender

public int getDescender()
Specified by:
getDescender in interface FontDescriptor

getDescender

public int getDescender(int size)
Specified by:
getDescender in interface FontMetrics

getEmbedFontName

public String getEmbedFontName()
Specified by:
getEmbedFontName in interface FontMetrics

getEncoding

public String getEncoding()
Overrides:
getEncoding in interface Typeface

getFamilyNames

public Set getFamilyNames()
Specified by:
getFamilyNames in interface FontMetrics

getFlags

public int getFlags()
Specified by:
getFlags in interface FontDescriptor

getFontBBox

public int[] getFontBBox()
Specified by:
getFontBBox in interface FontDescriptor

getFontName

public String getFontName()
Specified by:
getFontName in interface FontMetrics

getFontType

public FontType getFontType()
Specified by:
getFontType in interface FontMetrics

getFullName

public String getFullName()
Specified by:
getFullName in interface FontMetrics

getItalicAngle

public int getItalicAngle()
Specified by:
getItalicAngle in interface FontDescriptor

getKerningInfo

public Map getKerningInfo()
Specified by:
getKerningInfo in interface FontMetrics

getMaxAscent

public int getMaxAscent(int size)
Specified by:
getMaxAscent in interface FontMetrics
Overrides:
getMaxAscent in interface Typeface

getRealFont

public Typeface getRealFont()
Gets the real font.
Returns:
the real font

getStemV

public int getStemV()
Specified by:
getStemV in interface FontDescriptor

getWidth

public int getWidth(int i,
                    int size)
Specified by:
getWidth in interface FontMetrics

getWidths

public int[] getWidths()
Specified by:
getWidths in interface FontMetrics

getXHeight

public int getXHeight(int size)
Specified by:
getXHeight in interface FontMetrics

hadMappingOperations

public boolean hadMappingOperations()
Overrides:
hadMappingOperations in interface Typeface

hasChar

public boolean hasChar(char c)
Overrides:
hasChar in interface Typeface

hasKerningInfo

public boolean hasKerningInfo()
Specified by:
hasKerningInfo in interface FontMetrics

isEmbeddable

public boolean isEmbeddable()
Specified by:
isEmbeddable in interface FontDescriptor

isMultiByte

public boolean isMultiByte()
Overrides:
isMultiByte in interface Typeface

mapChar

public char mapChar(char c)
Overrides:
mapChar in interface Typeface

toString

public String toString()
String representation of LazyFont

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