public abstract class Mapper extends Object
Modifier and Type | Field and Description |
---|---|
protected ConcurrentHashMap<String,PhysicalFont> |
boldForms |
protected ConcurrentHashMap<String,PhysicalFont> |
boldItalicForms |
static String |
FONT_FALLBACK |
protected static Map<String,PhysicalFont> |
fontMappings |
protected ConcurrentHashMap<String,PhysicalFont> |
italicForms |
protected static org.slf4j.Logger |
log |
protected ConcurrentHashMap<String,PhysicalFont> |
regularForms |
Constructor and Description |
---|
Mapper() |
Modifier and Type | Method and Description |
---|---|
PhysicalFont |
get(String key)
Get a PhysicalFont from FontMappings,
by case-insensitive name.
|
PhysicalFont |
getBoldForm(String fontNameAsInFontTablePart,
PhysicalFont pf) |
PhysicalFont |
getBoldItalicForm(String fontNameAsInFontTablePart,
PhysicalFont pf) |
Map<String,PhysicalFont> |
getFontMappings()
Deprecated.
|
PhysicalFont |
getItalicForm(String fontNameAsInFontTablePart,
PhysicalFont pf) |
PhysicalFont |
getRegularForm(String fontNameAsInFontTablePart) |
static String |
getSubstituteFontXsltExtension(Mapper s,
String documentStyleId,
String bolditalic,
boolean fontFamilyStack) |
String |
getSubstituteFontXsltExtension(String documentStyleId,
String bolditalic,
boolean fontFamilyStack) |
abstract void |
populateFontMappings(Set<String> documentFontNames,
Fonts wmlFonts)
Populate the fontMappings object.
|
void |
put(String key,
PhysicalFont pf)
Put a PhysicalFont into FontMappings,
by case-insensitive name.
|
void |
registerBoldForm(String fontNameAsInFontTablePart,
PhysicalFont pfBold) |
void |
registerBoldItalicForm(String fontNameAsInFontTablePart,
PhysicalFont pfBoldItalic) |
void |
registerItalicForm(String fontNameAsInFontTablePart,
PhysicalFont pfItalic) |
void |
registerRegularForm(String fontNameAsInFontTablePart,
PhysicalFont pfRegular) |
int |
size() |
protected static org.slf4j.Logger log
protected ConcurrentHashMap<String,PhysicalFont> regularForms
protected ConcurrentHashMap<String,PhysicalFont> boldForms
protected ConcurrentHashMap<String,PhysicalFont> italicForms
protected ConcurrentHashMap<String,PhysicalFont> boldItalicForms
protected static final Map<String,PhysicalFont> fontMappings
public static final String FONT_FALLBACK
@Deprecated public Map<String,PhysicalFont> getFontMappings()
public PhysicalFont get(String key)
key
- public void put(String key, PhysicalFont pf)
key
- pf
- public int size()
public abstract void populateFontMappings(Set<String> documentFontNames, Fonts wmlFonts) throws Exception
documentFontNames
- - the fonts used in the documentwmlFonts
- - the content model for the fonts partException
public static String getSubstituteFontXsltExtension(Mapper s, String documentStyleId, String bolditalic, boolean fontFamilyStack)
public String getSubstituteFontXsltExtension(String documentStyleId, String bolditalic, boolean fontFamilyStack)
public void registerRegularForm(String fontNameAsInFontTablePart, PhysicalFont pfRegular)
public void registerBoldForm(String fontNameAsInFontTablePart, PhysicalFont pfBold)
public void registerItalicForm(String fontNameAsInFontTablePart, PhysicalFont pfItalic)
public void registerBoldItalicForm(String fontNameAsInFontTablePart, PhysicalFont pfBoldItalic)
public PhysicalFont getRegularForm(String fontNameAsInFontTablePart)
public PhysicalFont getBoldForm(String fontNameAsInFontTablePart, PhysicalFont pf)
public PhysicalFont getItalicForm(String fontNameAsInFontTablePart, PhysicalFont pf)
public PhysicalFont getBoldItalicForm(String fontNameAsInFontTablePart, PhysicalFont pf)
Copyright © 2007-2019. All Rights Reserved.