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, toString
protected Type1Font()
protected Type1Font(String metricsPath, String binaryPath, byte[] afm, byte[] pfb) throws IOException
IOException
protected Type1Font(String baseFont)
protected static Type1Font createStandardFont(String name) throws IOException
IOException
public boolean isBuiltInFont()
public int getPdfFontFlags()
getPdfFontFlags
in class FontProgram
public String getCharacterSet()
public boolean hasKernPairs()
hasKernPairs
in class FontProgram
true
if the font has any kerning pairs.
public int getKerning(Glyph first, Glyph second)
FontProgram
getKerning
in class FontProgram
first
- the first glyph
second
- the second glyph
public 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 name
public byte[] getFontStreamBytes()
public int[] getFontStreamLengths()
public boolean isBuiltWith(String fontProgram)
FontProgram
FontProgram
was built with corresponding fontName. Default value is false unless overridden.
isBuiltWith
in class FontProgram
fontProgram
- a font name or path to a font program
protected void process() throws IOException
IOException
Copyright © 1998–2023 iText Group NV. All rights reserved.