public class Type1Font extends FontProgram
avgWidth, codeToGlyph, DEFAULT_WIDTH, encodingScheme, fontIdentification, fontMetrics, fontNames, isFontSpecific, registry, unicodeToGlyph, UNITS_NORMALIZATION| Modifier | Constructor and Description |
|---|---|
protected |
Type1Font() |
protected |
Type1Font(String baseFont) |
protected |
Type1Font(String metricsPath,
String binaryPath,
byte[] afm,
byte[] pfb) |
| Modifier and Type | Method and Description |
|---|---|
protected static Type1Font |
createStandardFont(String name) |
String |
getCharacterSet() |
byte[] |
getFontStreamBytes() |
int[] |
getFontStreamLengths() |
Glyph |
getGlyph(String name)
Find glyph by glyph name.
|
int |
getKerning(Glyph first,
Glyph second)
Gets the kerning between two glyphs.
|
int |
getPdfFontFlags() |
boolean |
hasKernPairs()
Checks if the font has any kerning pairs.
|
boolean |
isBuiltInFont() |
boolean |
isBuiltWith(String fontProgram)
Checks whether the
FontProgram was built with corresponding fontName. |
protected void |
process() |
boolean |
setKerning(int first,
int second,
int kern)
Sets the kerning between two Unicode chars.
|
countOfGlyphs, fixSpaceIssue, getAvgWidth, getCharBBox, getFontIdentification, getFontMetrics, getFontNames, getGlyph, getGlyphByCode, getKerning, getRegistry, getWidth, isFontSpecific, setBbox, setBold, setCapHeight, setFixedPitch, setFontFamily, setFontName, setFontStretch, setFontWeight, setItalicAngle, setRegistry, setStemH, setStemV, setTypoAscender, setTypoDescender, setXHeight, toStringprotected Type1Font()
protected Type1Font(String metricsPath, String binaryPath, byte[] afm, byte[] pfb) throws IOException
IOExceptionprotected Type1Font(String baseFont)
protected static Type1Font createStandardFont(String name) throws IOException
IOExceptionpublic boolean isBuiltInFont()
public int getPdfFontFlags()
getPdfFontFlags in class FontProgrampublic String getCharacterSet()
public boolean hasKernPairs()
hasKernPairs in class FontProgramtrue if the font has any kerning pairs.public int getKerning(Glyph first, Glyph second)
FontProgramgetKerning in class FontProgramfirst - the first glyphsecond - the second glyphpublic boolean setKerning(int first,
int second,
int kern)
first - the first unicode char.second - the second unicode char.kern - the kerning to apply in normalized 1000 units.true if the kerning was applied, false otherwise.public Glyph getGlyph(String name)
name - Glyph namepublic byte[] getFontStreamBytes()
public int[] getFontStreamLengths()
public boolean isBuiltWith(String fontProgram)
FontProgramFontProgram was built with corresponding fontName.
Default value is false unless overridden.isBuiltWith in class FontProgramfontProgram - a font name or path to a font programprotected void process()
throws IOException
IOExceptionCopyright © 1998–2021 iText Group NV. All rights reserved.