Package org.docx4j.fonts.fop.util
Class FopConfigUtil
java.lang.Object
org.docx4j.fonts.fop.util.FopConfigUtil
The sole role of this class is to create a configuration
which can be used to configure FOP.
As of 8.3.3, we have a JAXB representation of the FOP XML config.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static ObjectFactoryprotected static org.slf4j.Loggerprivate static Substitutions -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static voidaddFontTriplet(StringBuilder result, String familyName, String style, String weight) private static voidaddVariations(Mapper fontMapper, Fonts rendererFonts, String fontName, PhysicalFont pf, String subFontAtt) static FopcreateConfigurationObject(Mapper fontMapper, Set<String> fontsInUse) private static Fonts.Font.FontTripletcreateFontTriplet(String name, String style, String weight) private static Fonts.FontcreateVariant(PhysicalFont pf, PhysicalFont pfVariation, String subFontAtt, String style, String weight) protected static FontsdeclareRendererFonts(Mapper fontMapper, Set<String> fontsInUse) Create a FOP font configuration for each font used in the document.protected static StringweightToCSS2FontWeight(int i)
-
Field Details
-
log
protected static org.slf4j.Logger log -
substitutions
-
factory
-
-
Constructor Details
-
FopConfigUtil
public FopConfigUtil()
-
-
Method Details
-
createConfigurationObject
public static Fop createConfigurationObject(Mapper fontMapper, Set<String> fontsInUse) throws Docx4JException - Throws:
Docx4JException
-
declareRendererFonts
Create a FOP font configuration for each font used in the document.- Returns:
-
createFontTriplet
-
addVariations
private static void addVariations(Mapper fontMapper, Fonts rendererFonts, String fontName, PhysicalFont pf, String subFontAtt) -
createVariant
private static Fonts.Font createVariant(PhysicalFont pf, PhysicalFont pfVariation, String subFontAtt, String style, String weight) -
addFontTriplet
protected static void addFontTriplet(StringBuilder result, String familyName, String style, String weight) -
weightToCSS2FontWeight
-