public class Type3Font extends FontProgram
Type3Glyph
. Type3Glyphs belong to a particular pdf document. Note, an instance of Type3Font can not be reused for multiple pdf documents.
avgWidth, codeToGlyph, DEFAULT_WIDTH, encodingScheme, fontIdentification, fontMetrics, fontNames, isFontSpecific, registry, unicodeToGlyph, UNITS_NORMALIZATION
Modifier and Type | Method and Description |
---|---|
int |
getKerning(Glyph glyph1, Glyph glyph2)
Gets the kerning between two glyphs.
|
int |
getNumberOfGlyphs()
Returns number of glyphs for this font.
|
int |
getPdfFontFlags() |
Type3Glyph |
getType3Glyph(int unicode)
Returns a glyph by unicode.
|
Type3Glyph |
getType3GlyphByCode(int code)
Returns a glyph by its code.
|
boolean |
isColorized() |
boolean |
isFontSpecific() |
protected void |
setCapHeight(int capHeight)
Sets the capital letters height.
|
protected void |
setFontFamily(String fontFamily)
Sets a preferred font family name.
|
protected void |
setFontName(String fontName)
Sets the PostScript name of the font.
|
protected void |
setFontStretch(String fontWidth)
Sets font width in css notation (font-stretch property)
|
protected void |
setFontWeight(int fontWeight)
Sets font weight.
|
protected void |
setItalicAngle(int italicAngle)
Sets the PostScript italic angle.
|
protected void |
setTypoAscender(int ascender)
Sets typo ascender.
|
protected void |
setTypoDescender(int descender)
Sets typo descender.
|
countOfGlyphs, fixSpaceIssue, getAvgWidth, getCharBBox, getFontIdentification, getFontMetrics, getFontNames, getGlyph, getGlyphByCode, getKerning, getRegistry, getWidth, hasKernPairs, isBuiltWith, setBbox, setBold, setFixedPitch, setRegistry, setStemH, setStemV, setXHeight, toString
public Type3Glyph getType3Glyph(int unicode)
unicode
- glyph unicode
Type3Glyph
glyph, or null
if this font does not contain glyph for the unicode
public Type3Glyph getType3GlyphByCode(int code)
code
- glyph code
Type3Glyph
glyph, or null
if this font does not contain glyph for the code
public int getPdfFontFlags()
getPdfFontFlags
in class FontProgram
public boolean isFontSpecific()
isFontSpecific
in class FontProgram
public boolean isColorized()
public int getKerning(Glyph glyph1, Glyph glyph2)
FontProgram
getKerning
in class FontProgram
glyph1
- the first glyph
glyph2
- the second glyph
public int getNumberOfGlyphs()
type3GlyphsWithoutUnicode
.
int
number off all glyphs
protected void setFontName(String fontName)
If full name is null, it will be set as well.
setFontName
in class FontProgram
fontName
- the PostScript name of the font, shall not be null or empty.
protected void setFontFamily(String fontFamily)
setFontFamily
in class FontProgram
fontFamily
- a preferred font family name.
protected void setFontWeight(int fontWeight)
setFontWeight
in class FontProgram
fontWeight
- integer form 100 to 900. See FontWeights
.
protected void setFontStretch(String fontWidth)
setFontStretch
in class FontProgram
fontWidth
- FontStretches
.
protected void setCapHeight(int capHeight)
FontMetrics.setCapHeight(int)
.
setCapHeight
in class FontProgram
capHeight
- cap height in 1000-units
protected void setItalicAngle(int italicAngle)
Italic angle in counter-clockwise degrees from the vertical. Zero for upright text, negative for text that leans to the right (forward).
setItalicAngle
in class FontProgram
italicAngle
- in counter-clockwise degrees from the vertical
protected void setTypoAscender(int ascender)
FontMetrics.setTypoAscender(int)
.
setTypoAscender
in class FontProgram
ascender
- typo ascender value in 1000-units
protected void setTypoDescender(int descender)
FontMetrics.setTypoDescender(int)
.
setTypoDescender
in class FontProgram
descender
- typo descender value in 1000-units
Copyright © 1998–2023 iText Group NV. All rights reserved.