Class HwmfFont

java.lang.Object
org.apache.poi.hwmf.record.HwmfFont
All Implemented Interfaces:
FontInfo

public class HwmfFont extends Object implements FontInfo
The Font object specifies the attributes of a logical font
  • Constructor Details

    • HwmfFont

      public HwmfFont()
  • Method Details

    • init

      public int init(LittleEndianInputStream leis) throws IOException
      Throws:
      IOException
    • getHeight

      public int getHeight()
    • getWidth

      public int getWidth()
    • getEscapement

      public int getEscapement()
    • getOrientation

      public int getOrientation()
    • getWeight

      public int getWeight()
    • isItalic

      public boolean isItalic()
    • isUnderline

      public boolean isUnderline()
    • isStrikeOut

      public boolean isStrikeOut()
    • getOutPrecision

      public HwmfFont.WmfOutPrecision getOutPrecision()
    • getClipPrecision

      public HwmfFont.WmfClipPrecision getClipPrecision()
    • getQuality

      public HwmfFont.WmfFontQuality getQuality()
    • getPitchAndFamily

      public int getPitchAndFamily()
    • getFamily

      public FontFamily getFamily()
      Specified by:
      getFamily in interface FontInfo
      Returns:
      the family class
    • setFamily

      public void setFamily(FontFamily family)
      Description copied from interface: FontInfo
      Sets the font family class
      Specified by:
      setFamily in interface FontInfo
      Parameters:
      family - the font family class
    • getPitch

      public FontPitch getPitch()
      Specified by:
      getPitch in interface FontInfo
      Returns:
      the font pitch or null if unsupported
    • setPitch

      public void setPitch(FontPitch pitch)
      Description copied from interface: FontInfo
      Set the font pitch
      Specified by:
      setPitch in interface FontInfo
      Parameters:
      pitch - the font pitch
    • getIndex

      public Integer getIndex()
      Description copied from interface: FontInfo
      Get the index within the collection of Font objects
      Specified by:
      getIndex in interface FontInfo
      Returns:
      unique index number of the underlying record this Font represents (probably you don't care unless you're comparing which one is which)
    • setIndex

      public void setIndex(int index)
      Description copied from interface: FontInfo
      Sets the index within the collection of Font objects
      Specified by:
      setIndex in interface FontInfo
      Parameters:
      index - the index within the collection of Font objects
    • getTypeface

      public String getTypeface()
      Specified by:
      getTypeface in interface FontInfo
      Returns:
      the full name of the font, i.e. font family + type face
    • setTypeface

      public void setTypeface(String typeface)
      Description copied from interface: FontInfo
      Sets the font name
      Specified by:
      setTypeface in interface FontInfo
      Parameters:
      typeface - the full name of the font, when null removes the font definition - removal is implementation specific
    • getCharset

      public FontCharset getCharset()
      Specified by:
      getCharset in interface FontInfo
      Returns:
      the font charset
    • setCharset

      public void setCharset(FontCharset charset)
      Description copied from interface: FontInfo
      Sets the charset
      Specified by:
      setCharset in interface FontInfo
      Parameters:
      charset - the charset