org.xhtmlrenderer.swing
Class AWTFontResolver

java.lang.Object
  extended by org.xhtmlrenderer.swing.AWTFontResolver
All Implemented Interfaces:
FontResolver

public class AWTFontResolver
extends Object
implements FontResolver

Description of the Class

Author:
Joshua Marinacci

Constructor Summary
AWTFontResolver()
          Constructor for the FontResolverTest object
 
Method Summary
protected static Font createFont(SharedContext ctx, Font root_font, float size, IdentValue weight, IdentValue style, IdentValue variant)
          Description of the Method
 void flushCache()
           
protected static String getFontInstanceHashName(SharedContext ctx, String name, float size, IdentValue weight, IdentValue style, IdentValue variant)
          Gets the fontInstanceHashName attribute of the FontResolverTest object
 FSFont resolveFont(SharedContext renderingContext, FontSpecification spec)
           
 FSFont resolveFont(SharedContext ctx, String[] families, float size, IdentValue weight, IdentValue style, IdentValue variant)
          Description of the Method
protected  Font resolveFont(SharedContext ctx, String font, float size, IdentValue weight, IdentValue style, IdentValue variant)
          Description of the Method
 void setFontMapping(String name, Font font)
          Sets the fontMapping attribute of the FontResolver object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AWTFontResolver

public AWTFontResolver()
Constructor for the FontResolverTest object

Method Detail

flushCache

public void flushCache()
Specified by:
flushCache in interface FontResolver

resolveFont

public FSFont resolveFont(SharedContext ctx,
                          String[] families,
                          float size,
                          IdentValue weight,
                          IdentValue style,
                          IdentValue variant)
Description of the Method

Parameters:
ctx -
families - PARAM
size - PARAM
weight - PARAM
style - PARAM
variant - PARAM
Returns:
Returns

setFontMapping

public void setFontMapping(String name,
                           Font font)
Sets the fontMapping attribute of the FontResolver object

Parameters:
name - The new fontMapping value
font - The new fontMapping value

createFont

protected static Font createFont(SharedContext ctx,
                                 Font root_font,
                                 float size,
                                 IdentValue weight,
                                 IdentValue style,
                                 IdentValue variant)
Description of the Method

Parameters:
ctx -
root_font - PARAM
size - PARAM
weight - PARAM
style - PARAM
variant - PARAM
Returns:
Returns

resolveFont

protected Font resolveFont(SharedContext ctx,
                           String font,
                           float size,
                           IdentValue weight,
                           IdentValue style,
                           IdentValue variant)
Description of the Method

Parameters:
ctx -
font - PARAM
size - PARAM
weight - PARAM
style - PARAM
variant - PARAM
Returns:
Returns

getFontInstanceHashName

protected static String getFontInstanceHashName(SharedContext ctx,
                                                String name,
                                                float size,
                                                IdentValue weight,
                                                IdentValue style,
                                                IdentValue variant)
Gets the fontInstanceHashName attribute of the FontResolverTest object

Parameters:
ctx -
name - PARAM
size - PARAM
weight - PARAM
style - PARAM
variant - PARAM @return The fontInstanceHashName value

resolveFont

public FSFont resolveFont(SharedContext renderingContext,
                          FontSpecification spec)
Specified by:
resolveFont in interface FontResolver


Copyright © 2012. All Rights Reserved.