Class PDFTranscoder.OpenHtmlFontResolver

java.lang.Object
com.openhtmltopdf.svgsupport.PDFTranscoder.OpenHtmlFontResolver
All Implemented Interfaces:
org.apache.batik.bridge.FontFamilyResolver
Enclosing class:
PDFTranscoder

public static class PDFTranscoder.OpenHtmlFontResolver extends Object implements org.apache.batik.bridge.FontFamilyResolver
  • Field Details

  • Constructor Details

    • OpenHtmlFontResolver

      public OpenHtmlFontResolver()
  • Method Details

    • resolve

      public org.apache.batik.gvt.font.GVTFontFamily resolve(String arg0, org.apache.batik.bridge.FontFace arg1)
      Specified by:
      resolve in interface org.apache.batik.bridge.FontFamilyResolver
    • resolve

      public org.apache.batik.gvt.font.GVTFontFamily resolve(String family)
      Specified by:
      resolve in interface org.apache.batik.bridge.FontFamilyResolver
    • loadFont

      public org.apache.batik.gvt.font.GVTFontFamily loadFont(InputStream arg0, org.apache.batik.bridge.FontFace arg1) throws Exception
      Specified by:
      loadFont in interface org.apache.batik.bridge.FontFamilyResolver
      Throws:
      Exception
    • getFamilyThatCanDisplay

      public org.apache.batik.gvt.font.GVTFontFamily getFamilyThatCanDisplay(char arg0)
      Specified by:
      getFamilyThatCanDisplay in interface org.apache.batik.bridge.FontFamilyResolver
    • getDefault

      public org.apache.batik.gvt.font.GVTFontFamily getDefault()
      Specified by:
      getDefault in interface org.apache.batik.bridge.FontFamilyResolver
    • getStyle

      private Float getStyle(IdentValue fontStyle)
    • getStyle

      private Float getStyle(BaseRendererBuilder.FontStyle style)
    • getWeight

      private Float getWeight(Integer weight)
    • getWeight

      private Float getWeight(IdentValue weight)
    • addFontFaceFont

      private void addFontFaceFont(String fontFamilyNameOverride, IdentValue fontWeightOverride, IdentValue fontStyleOverride, String uri, byte[] font1) throws FontFormatException
      Throws:
      FontFormatException
    • importFontFaces

      public void importFontFaces(List<FontFaceRule> fontFaces, SharedContext ctx)
    • addFontFile

      public void addFontFile(File fontFile, String family, Integer weight, BaseRendererBuilder.FontStyle style) throws IOException, FontFormatException
      Throws:
      IOException
      FontFormatException