Package org.docx4j.fonts
Class IdentityPlusMapper
java.lang.Object
org.docx4j.fonts.Mapper
org.docx4j.fonts.IdentityPlusMapper
Maps font names used in the document to
corresponding fonts physically available
on the system.
This mapper automatically maps
document fonts for which the exact
font is physically available. Think
of this as an identity mapping. For
this reason, it will work best on
Windows, or a system on which
Microsoft fonts have been installed.
You can manually add your own
additional mappings if you wish.
- Author:
- jharrop
-
Field Summary
FieldsFields inherited from class org.docx4j.fonts.Mapper
boldForms, boldItalicForms, FONT_FALLBACK, fontMappings, italicForms, regularForms -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.docx4j.fonts.Mapper
get, getBoldForm, getBoldItalicForm, getFontMappings, getItalicForm, getRegularForm, getSubstituteFontXsltExtension, getSubstituteFontXsltExtension, put, registerBoldForm, registerBoldItalicForm, registerItalicForm, registerRegularForm, size
-
Field Details
-
log
protected static org.slf4j.Logger log
-
-
Constructor Details
-
IdentityPlusMapper
public IdentityPlusMapper()
-
-
Method Details
-
populateFontMappings
Populate the fontMappings object. We make an entry for each of the documentFontNames.- Specified by:
populateFontMappingsin classMapper- Parameters:
documentFontNames- - the fonts used in the documentwmlFonts- - the content model for the fonts part- Throws:
Exception
-
main
- Throws:
Exception
-