Class FontHeader
- java.lang.Object
-
- org.apache.poi.common.usermodel.fonts.FontHeader
-
- All Implemented Interfaces:
FontInfo
,GenericRecord
public class FontHeader extends 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InputStream
bufferInit(InputStream fontStream)
FontCharset
getCharset()
byte
getCharsetByte()
FontFamily
getFamily()
String
getFamilyName()
int
getFlags()
String
getFullName()
Map<String,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()
String
getStyleName()
String
getTypeface()
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
-
-
Method Detail
-
init
public void init(byte[] source, int offset, int length)
-
init
public void init(LittleEndianInput leis)
-
bufferInit
public InputStream bufferInit(InputStream fontStream) throws IOException
- Throws:
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 String getFamilyName()
-
getStyleName
public String getStyleName()
-
getVersionName
public String getVersionName()
-
getFullName
public String getFullName()
-
getPanose
public byte[] getPanose()
-
getTypeface
public 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 Map<String,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()
-
-