Class FopConfigUtil

java.lang.Object
org.docx4j.fonts.fop.util.FopConfigUtil

public class FopConfigUtil extends Object
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.
Author:
jharrop
  • Field Details

    • log

      protected static org.slf4j.Logger log
  • Constructor Details

    • FopConfigUtil

      public FopConfigUtil()
  • Method Details

    • createConfigurationObject

      public static Fop createConfigurationObject(Mapper fontMapper, Set<String> fontsInUse) throws Docx4JException
      Throws:
      Docx4JException
    • declareRendererFonts

      protected static Fonts declareRendererFonts(Mapper fontMapper, Set<String> fontsInUse)
      Create a FOP font configuration for each font used in the document.
      Returns:
    • addFontTriplet

      protected static void addFontTriplet(StringBuilder result, String familyName, String style, String weight)
    • weightToCSS2FontWeight

      protected static String weightToCSS2FontWeight(int i)