Class OpenHtmlGvtFont

java.lang.Object
com.openhtmltopdf.svgsupport.OpenHtmlGvtFont
All Implemented Interfaces:
org.apache.batik.gvt.font.GVTFont

public class OpenHtmlGvtFont extends Object implements org.apache.batik.gvt.font.GVTFont
An adapter around awt.Font to GVTFont. Code from: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/fop-core/src/main/java/org/apache/fop/svg/font/FOPGVTFont.java
  • Field Details

    • baseFont

      private final Font baseFont
    • fontFamily

      private final org.apache.batik.gvt.font.GVTFontFamily fontFamily
  • Constructor Details

  • Method Details

    • toFontWeight

      private static int toFontWeight(Float weight)
    • toStyle

      private static int toStyle(Float posture)
    • canDisplay

      public boolean canDisplay(char c)
      Specified by:
      canDisplay in interface org.apache.batik.gvt.font.GVTFont
    • canDisplayUpTo

      public int canDisplayUpTo(String str)
      Specified by:
      canDisplayUpTo in interface org.apache.batik.gvt.font.GVTFont
    • canDisplayUpTo

      public int canDisplayUpTo(char[] str, int start, int limit)
      Specified by:
      canDisplayUpTo in interface org.apache.batik.gvt.font.GVTFont
    • canDisplayUpTo

      public int canDisplayUpTo(CharacterIterator iter, int start, int limit)
      Specified by:
      canDisplayUpTo in interface org.apache.batik.gvt.font.GVTFont
    • createGlyphVector

      public org.apache.batik.gvt.font.GVTGlyphVector createGlyphVector(FontRenderContext frc, char[] arg1)
      Specified by:
      createGlyphVector in interface org.apache.batik.gvt.font.GVTFont
    • createGlyphVector

      public org.apache.batik.gvt.font.GVTGlyphVector createGlyphVector(FontRenderContext frc, CharacterIterator arg1)
      Specified by:
      createGlyphVector in interface org.apache.batik.gvt.font.GVTFont
    • createGlyphVector

      public org.apache.batik.gvt.font.GVTGlyphVector createGlyphVector(FontRenderContext frc, String arg1)
      Specified by:
      createGlyphVector in interface org.apache.batik.gvt.font.GVTFont
    • createGlyphVector

      public org.apache.batik.gvt.font.GVTGlyphVector createGlyphVector(FontRenderContext frc, int[] arg1, CharacterIterator arg2)
      Specified by:
      createGlyphVector in interface org.apache.batik.gvt.font.GVTFont
    • deriveFont

      public org.apache.batik.gvt.font.GVTFont deriveFont(float arg0)
      Specified by:
      deriveFont in interface org.apache.batik.gvt.font.GVTFont
    • getFamilyName

      public String getFamilyName()
      Specified by:
      getFamilyName in interface org.apache.batik.gvt.font.GVTFont
    • getHKern

      public float getHKern(int arg0, int arg1)
      Specified by:
      getHKern in interface org.apache.batik.gvt.font.GVTFont
    • getLineMetrics

      public org.apache.batik.gvt.font.GVTLineMetrics getLineMetrics(String arg0, FontRenderContext arg1)
      Specified by:
      getLineMetrics in interface org.apache.batik.gvt.font.GVTFont
    • getLineMetrics

      public org.apache.batik.gvt.font.GVTLineMetrics getLineMetrics(char[] arg0, int arg1, int arg2, FontRenderContext arg3)
      Specified by:
      getLineMetrics in interface org.apache.batik.gvt.font.GVTFont
    • getLineMetrics

      public org.apache.batik.gvt.font.GVTLineMetrics getLineMetrics(CharacterIterator arg0, int arg1, int arg2, FontRenderContext arg3)
      Specified by:
      getLineMetrics in interface org.apache.batik.gvt.font.GVTFont
    • getLineMetrics

      public org.apache.batik.gvt.font.GVTLineMetrics getLineMetrics(String arg0, int arg1, int arg2, FontRenderContext arg3)
      Specified by:
      getLineMetrics in interface org.apache.batik.gvt.font.GVTFont
    • getSize

      public float getSize()
      Specified by:
      getSize in interface org.apache.batik.gvt.font.GVTFont
    • getVKern

      public float getVKern(int arg0, int arg1)
      Specified by:
      getVKern in interface org.apache.batik.gvt.font.GVTFont