public class PdfJavaGlyphs extends Object implements PdfGlyphs, Serializable
| Modifier and Type | Field and Description |
|---|---|
String |
baseFontName |
protected PdfGlyph[] |
cachedEmbeddedShapes |
int[] |
CMAP_Translate
lookup to translate CMAP chars
|
String |
defaultFont
default font to use in display
|
String |
font_family_name |
String |
fontName
lookup for font names less any + suffix
|
static FontRenderContext |
frc
used to render page by drawing routines
|
protected int |
globalBias |
protected int |
glyphCount |
protected boolean |
hasGIDtoCID |
boolean |
isArialInstalledLocally |
boolean |
isCIDFont |
boolean |
isFontInstalled |
boolean |
isSubsetted |
float[][] |
lastTrm
copy of Trm so we can choose if cache should be flushed
|
protected int |
localBias |
String |
logicalfontName |
protected int |
objID |
protected boolean |
remappedCFFFont |
int |
style |
| Constructor and Description |
|---|
PdfJavaGlyphs() |
| Modifier and Type | Method and Description |
|---|---|
void |
flush() |
String |
getBaseFontName() |
Area |
getCachedShape(int idx)
Returns the specified shape from the cache, or
null if the shape
is not in the cache. |
AffineTransform |
getCachedTransform(int idx)
Returns the specified shape from the cache, or
null if the shape
is not in the cache. |
String |
getCharGlyph(Integer key) |
Map<Integer,String> |
getCharGlyphs() |
Map |
getCharStrings() |
int |
getCMAPValue(int rawInt)
return value or -1
|
int |
getConvertedGlyph(int rawInt)
should never be called - just to allow TTGlyphs to extend
|
String |
getDisplayValue(Integer key) |
Map<Integer,String> |
getDisplayValues() |
PdfGlyph |
getEmbeddedCachedShape(int idx)
Returns the specified shape from the cache, or
null if the shape
is not in the cache. |
String |
getEmbeddedEnc(Integer key) |
Map<Integer,String> |
getEmbeddedEncs() |
PdfGlyph |
getEmbeddedGlyph(GlyphFactory factory,
String glyph,
float[][] trm,
int rawInt,
String displayValue,
float currentWidth,
String key)
template used by t1/t3/tt fonts
|
float[] |
getFontBoundingBox() |
Area |
getGlyph(String displayValue,
float currentWidth)
returns a generic glyph using inbuilt fonts
|
int |
getGlyphCount() |
String |
getIndexForCharString(int jj) |
static String |
getPostName(int rawInt) |
Area |
getStandardGlyph(float[][] Trm,
int rawInt,
String displayValue,
float currentWidth,
boolean isSTD)
used for standard non-substituted version
|
Table |
getTable(int id) |
float |
getTTWidth(String charGlyph,
int rawInt,
String displayValue,
boolean b) |
int |
getType() |
Font |
getUnscaledFont()
Returns the unscaled font, initializing it first if it hasn't been used before.
|
boolean |
hasGIDtoCID() |
void |
init(int maxCharCount,
boolean isCIDFont) |
boolean |
is1C() |
boolean |
isCorrupted() |
boolean |
isIdentity()
flag to show if CID TT fonts have identity matrix
|
boolean |
isRemappedCFFFont() |
boolean |
isValidGIDtoCID(int value) |
int |
readEmbeddedFont(boolean TTstreamisCID,
byte[] fontDataAsArray,
FontData fontData) |
void |
setBaseFontName(String baseFontName) |
void |
setCachedShape(int idx,
Area shape,
AffineTransform at)
Caches the specified shape.
|
void |
setCharGlyphs(Map<Integer,String> chars) |
void |
setCharString(String s,
byte[] bytes,
int glyphNo) |
void |
setCorrupted(boolean corrupt) |
void |
setDisplayValues(Map<Integer,String> displayValues) |
void |
setEmbeddedCachedShape(int idx,
PdfGlyph shape)
Caches the specified shape.
|
void |
setEmbeddedEncs(Map<Integer,String> embeddedChars) |
void |
setEncodingToUse(boolean hasEncoding,
int fontEncoding,
boolean isCIDFont) |
void |
setFont(String name,
int size)
set the font being used or try to approximate
|
void |
setFontEmbedded(boolean isSet) |
void |
setGIDtoCID(int[] cidToGIDMap) |
void |
setGlobalBias(int i) |
void |
setGlyphCount(int nGlyphs) |
void |
setHasWidths(boolean hasWidths) |
void |
setIndexForCharString(int jj,
String glyphName) |
void |
setis1C(boolean b) |
void |
setIsIdentity(boolean isIdentity)
flag for CID TT fonts
|
void |
setIsSubsetted(boolean b) |
void |
setLocalBias(int i) |
void |
setObjID(int objID) |
void |
setRemappedCFFFont(boolean remappedCFFFont) |
void |
setRenderer(DynamicVectorRenderer current) |
void |
setT3Glyph(int key,
int altKey,
PdfGlyph glyph) |
void |
setValuesForGlyph(int rawInt,
String charGlyph,
String displayValue,
String embeddedChar) |
protected boolean hasGIDtoCID
public int[] CMAP_Translate
protected int glyphCount
public boolean isFontInstalled
public String defaultFont
public String fontName
public String logicalfontName
protected int objID
protected boolean remappedCFFFont
public String baseFontName
public boolean isSubsetted
public float[][] lastTrm
public boolean isArialInstalledLocally
public boolean isCIDFont
public String font_family_name
public int style
public static final FontRenderContext frc
protected PdfGlyph[] cachedEmbeddedShapes
protected int localBias
protected int globalBias
public void flush()
public String getBaseFontName()
getBaseFontName in interface PdfGlyphspublic void setBaseFontName(String baseFontName)
public Area getStandardGlyph(float[][] Trm, int rawInt, String displayValue, float currentWidth, boolean isSTD)
getStandardGlyph in interface PdfGlyphsTrm - rawInt - displayValue - currentWidth - public Area getGlyph(String displayValue, float currentWidth)
public final void setCachedShape(int idx,
Area shape,
AffineTransform at)
public final AffineTransform getCachedTransform(int idx)
null if the shape
is not in the cache.public boolean isValidGIDtoCID(int value)
public final Area getCachedShape(int idx)
null if the shape
is not in the cache.public void init(int maxCharCount,
boolean isCIDFont)
public final void setFont(String name, int size)
public final Font getUnscaledFont()
public final void setEmbeddedCachedShape(int idx,
PdfGlyph shape)
public final PdfGlyph getEmbeddedCachedShape(int idx)
null if the shape
is not in the cache.public PdfGlyph getEmbeddedGlyph(GlyphFactory factory, String glyph, float[][] trm, int rawInt, String displayValue, float currentWidth, String key)
getEmbeddedGlyph in interface PdfGlyphspublic void setGIDtoCID(int[] cidToGIDMap)
public void setEncodingToUse(boolean hasEncoding,
int fontEncoding,
boolean isCIDFont)
public int readEmbeddedFont(boolean TTstreamisCID,
byte[] fontDataAsArray,
FontData fontData)
public void setIsSubsetted(boolean b)
public void setT3Glyph(int key,
int altKey,
PdfGlyph glyph)
public void setCharString(String s, byte[] bytes, int glyphNo)
public boolean is1C()
public void setis1C(boolean b)
public void setValuesForGlyph(int rawInt,
String charGlyph,
String displayValue,
String embeddedChar)
public String getDisplayValue(Integer key)
getDisplayValue in interface PdfGlyphspublic String getCharGlyph(Integer key)
getCharGlyph in interface PdfGlyphspublic String getEmbeddedEnc(Integer key)
getEmbeddedEnc in interface PdfGlyphspublic void setLocalBias(int i)
public void setGlobalBias(int i)
public static String getPostName(int rawInt)
public int getConvertedGlyph(int rawInt)
rawInt - public void setIsIdentity(boolean isIdentity)
isIdentity - public boolean isIdentity()
public float[] getFontBoundingBox()
public void setFontEmbedded(boolean isSet)
public int getType()
public void setHasWidths(boolean hasWidths)
public int getCMAPValue(int rawInt)
public boolean isCorrupted()
public void setCorrupted(boolean corrupt)
public void setIndexForCharString(int jj,
String glyphName)
public String getIndexForCharString(int jj)
public Map getCharStrings()
public void setGlyphCount(int nGlyphs)
public int getGlyphCount()
public void setRenderer(DynamicVectorRenderer current)
public Table getTable(int id)
public boolean hasGIDtoCID()
public void setObjID(int objID)
public void setRemappedCFFFont(boolean remappedCFFFont)
public boolean isRemappedCFFFont()
Copyright © 2017. All rights reserved.