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 classFontHeader.PanoseArmStylestatic classFontHeader.PanoseContraststatic classFontHeader.PanoseFamilystatic classFontHeader.PanoseLetterFormstatic classFontHeader.PanoseMidLinestatic classFontHeader.PanoseProportionstatic classFontHeader.PanoseSerifstatic classFontHeader.PanoseStrokestatic classFontHeader.PanoseWeightstatic classFontHeader.PanoseXHeight
-
Field Summary
Fields Modifier and Type Field Description static intREGULAR_WEIGHTFonts 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 InputStreambufferInit(InputStream fontStream)FontCharsetgetCharset()bytegetCharsetByte()FontFamilygetFamily()StringgetFamilyName()intgetFlags()StringgetFullName()Map<String,Supplier<?>>getGenericProperties()byte[]getPanose()FontHeader.PanoseArmStylegetPanoseArmStyle()FontHeader.PanoseContrastgetPanoseContrast()FontHeader.PanoseFamilygetPanoseFamily()FontHeader.PanoseLetterFormgetPanoseLetterForm()FontHeader.PanoseMidLinegetPanoseMidLine()FontHeader.PanoseProportiongetPanoseProportion()FontHeader.PanoseSerifgetPanoseSerif()FontHeader.PanoseStrokegetPanoseStroke()FontHeader.PanoseWeightgetPanoseWeight()FontHeader.PanoseXHeightgetPanoseXHeight()FontPitchgetPitch()StringgetStyleName()StringgetTypeface()StringgetVersionName()intgetWeight()voidinit(byte[] source, int offset, int length)voidinit(LittleEndianInput leis)booleanisBold()booleanisItalic()-
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:
getCharsetin 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:
getTypefacein 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:
getGenericPropertiesin 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()
-
-