org.apache.poi.common.usermodel.fonts

## Class FontHeader

- java.lang.Object
- - org.apache.poi.common.usermodel.fonts.FontHeader

- All Implemented Interfaces:
    FontInfo, GenericRecord

      public class FontHeader
      extends java.lang.Object
      implements FontInfo, GenericRecord

  The header data of an EOT font.

  Currently only version 1 fields are read to identify a stream to be embedded.

  See Also:
    Embedded OpenType (EOT) File Format

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `FontHeader.PanoseArmStyle`
    `static class` | `FontHeader.PanoseContrast`
    `static class` | `FontHeader.PanoseFamily`
    `static class` | `FontHeader.PanoseLetterForm`
    `static class` | `FontHeader.PanoseMidLine`
    `static class` | `FontHeader.PanoseProportion`
    `static class` | `FontHeader.PanoseSerif`
    `static class` | `FontHeader.PanoseStroke`
    `static class` | `FontHeader.PanoseWeight`
    `static class` | `FontHeader.PanoseXHeight`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `REGULAR_WEIGHT` Fonts with a font weight of 400 are regarded as regular weighted.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FontHeader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.io.InputStream` | `bufferInit(java.io.InputStream fontStream)`
    `FontCharset` | `getCharset()`
    `byte` | `getCharsetByte()`
    `FontFamily` | `getFamily()`
    `java.lang.String` | `getFamilyName()`
    `int` | `getFlags()`
    `java.lang.String` | `getFullName()`
    `java.util.Map<java.lang.String,java.util.function.Supplier<?>>` | `getGenericProperties()`
    `byte[]` | `getPanose()`
    `FontHeader.PanoseArmStyle` | `getPanoseArmStyle()`
    `FontHeader.PanoseContrast` | `getPanoseContrast()`
    `FontHeader.PanoseFamily` | `getPanoseFamily()`
    `FontHeader.PanoseLetterForm` | `getPanoseLetterForm()`
    `FontHeader.PanoseMidLine` | `getPanoseMidLine()`
    `FontHeader.PanoseProportion` | `getPanoseProportion()`
    `FontHeader.PanoseSerif` | `getPanoseSerif()`
    `FontHeader.PanoseStroke` | `getPanoseStroke()`
    `FontHeader.PanoseWeight` | `getPanoseWeight()`
    `FontHeader.PanoseXHeight` | `getPanoseXHeight()`
    `FontPitch` | `getPitch()`
    `java.lang.String` | `getStyleName()`
    `java.lang.String` | `getTypeface()`
    `java.lang.String` | `getVersionName()`
    `int` | `getWeight()`
    `void` | `init(byte[] source, int offset, int length)`
    `void` | `init(LittleEndianInput leis)`
    `boolean` | `isBold()`
    `boolean` | `isItalic()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.apache.poi.common.usermodel.fonts.FontInfo

      `getFacets, getIndex, setCharset, setFamily, setIndex, setPanose, setPitch, setTypeface`

    - ### Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord

      `getGenericChildren, getGenericRecordType`

- - ### Field Detail

    - #### REGULAR_WEIGHT

          public static final int REGULAR_WEIGHT

      Fonts with a font weight of 400 are regarded as regular weighted. Higher font weights (up to 1000) are bold - lower weights are thin.
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### FontHeader

          public FontHeader()

  - ### Method Detail

    - #### init

          public void init(byte[] source,
                           int offset,
                           int length)

    - #### init

          public void init(LittleEndianInput leis)

    - #### bufferInit

          public java.io.InputStream bufferInit(java.io.InputStream fontStream)
                                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### isItalic

          public boolean isItalic()

    - #### getWeight

          public int getWeight()

    - #### isBold

          public boolean isBold()

    - #### getCharsetByte

          public byte getCharsetByte()

    - #### getCharset

          public FontCharset getCharset()

      Specified by:
        `getCharset` in interface `FontInfo`
      Returns:
        the font charset

    - #### getPitch

          public FontPitch getPitch()

      Specified by:
        `getPitch` in interface `FontInfo`
      Returns:
        the font pitch or `null` if unsupported

    - #### getFamily

          public FontFamily getFamily()

      Specified by:
        `getFamily` in interface `FontInfo`
      Returns:
        the family class

    - #### getFamilyName

          public java.lang.String getFamilyName()

    - #### getStyleName

          public java.lang.String getStyleName()

    - #### getVersionName

          public java.lang.String getVersionName()

    - #### getFullName

          public java.lang.String getFullName()

    - #### getPanose

          public byte[] getPanose()

      Specified by:
        `getPanose` in interface `FontInfo`
      Returns:
        panose info in binary form or `null` if unknown

    - #### getTypeface

          public java.lang.String getTypeface()

      Specified by:
        `getTypeface` in interface `FontInfo`
      Returns:
        the full name of the font, i.e. font family + type face

    - #### getFlags

          public int getFlags()

    - #### getGenericProperties

          public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()

      Specified by:
        `getGenericProperties` in interface `GenericRecord`

    - #### getPanoseFamily

          public FontHeader.PanoseFamily getPanoseFamily()

    - #### getPanoseSerif

          public FontHeader.PanoseSerif getPanoseSerif()

    - #### getPanoseWeight

          public FontHeader.PanoseWeight getPanoseWeight()

    - #### getPanoseProportion

          public FontHeader.PanoseProportion getPanoseProportion()

    - #### getPanoseContrast

          public FontHeader.PanoseContrast getPanoseContrast()

    - #### getPanoseStroke

          public FontHeader.PanoseStroke getPanoseStroke()

    - #### getPanoseArmStyle

          public FontHeader.PanoseArmStyle getPanoseArmStyle()

    - #### getPanoseLetterForm

          public FontHeader.PanoseLetterForm getPanoseLetterForm()

    - #### getPanoseMidLine

          public FontHeader.PanoseMidLine getPanoseMidLine()

    - #### getPanoseXHeight

          public FontHeader.PanoseXHeight getPanoseXHeight()

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.