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 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 Description static int
REGULAR_WEIGHT
Fonts with a font weight of 400 are regarded as regular weighted.
-
Constructor Summary
Constructors Constructor Description FontHeader()
-
Method Summary
-
Methods inherited from class java.lang.Object
equals, 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
-
-
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 interfaceFontInfo
- Returns:
- the font charset
-
getPitch
public FontPitch getPitch()
-
getFamily
public FontFamily getFamily()
-
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()
-
getTypeface
public java.lang.String getTypeface()
- Specified by:
getTypeface
in interfaceFontInfo
- 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 interfaceGenericRecord
-
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()
-
-