Package com.itextpdf.io.font
Class FontNames
java.lang.Object
com.itextpdf.io.font.FontNames
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanString[][]String[][]Get extra family name if exists.Gets font stretch in css notation (font-stretch property).intString[][]protected intString[][]getNames(int id) Extracts the names of the font in all the languages available.getStyle()booleanisBold()booleanbooleanbooleanisItalic()booleanbooleanisShadow()booleanprotected voidsetAllNames(Map<Integer, List<String[]>> allNames) protected voidsetAllowEmbedding(boolean allowEmbedding) protected voidsetCidFontName(String cidFontName) protected voidsetFamilyName(String familyName) protected voidsetFamilyName(String[][] familyName) protected voidsetFamilyName2(String[][] familyName2) Set extra family name used for better fonts match.protected voidsetFontName(String psFontName) protected voidsetFontStretch(String fontStretch) Sets font stretch in css notation (font-stretch property).protected voidsetFontWeight(int weight) Sets font weight.protected voidsetFullName(String fullName) protected voidsetFullName(String[][] fullName) protected voidsetMacStyle(int macStyle) Sets Open Type head.macStyle.protected voidprotected voidsetSubfamily(String subfamily) protected voidsetSubfamily(String[][] subfamily) toString()
-
Field Details
-
allNames
-
-
Constructor Details
-
FontNames
public FontNames()
-
-
Method Details
-
getNames
Extracts the names of the font in all the languages available.- Parameters:
-
id- the name id to retrieve in OpenType notation - Returns:
-
not empty
String[][]if any names exists, otherwisenull.
-
getFullName
-
getFontName
-
getCidFontName
-
getFamilyName
-
getFamilyName2
Get extra family name if exists.- Returns:
-
extra family name if exists in the font,
nullotherwise.
-
getStyle
-
getSubfamily
-
getFontWeight
public int getFontWeight() -
setFontWeight
protected void setFontWeight(int weight) Sets font weight.- Parameters:
-
weight- integer form 100 to 900. SeeFontWeights.
-
getFontStretch
Gets font stretch in css notation (font-stretch property).- Returns:
-
One of
FontStretchesvalues.
-
setFontStretch
Sets font stretch in css notation (font-stretch property).- Parameters:
-
fontStretch-FontStretches.
-
allowEmbedding
public boolean allowEmbedding() -
isBold
public boolean isBold() -
isItalic
public boolean isItalic() -
isUnderline
public boolean isUnderline() -
isOutline
public boolean isOutline() -
isShadow
public boolean isShadow() -
isCondensed
public boolean isCondensed() -
isExtended
public boolean isExtended() -
setAllNames
-
setFullName
-
setFullName
-
setFontName
-
setCidFontName
-
setFamilyName
-
setFamilyName2
Set extra family name used for better fonts match.- Parameters:
-
familyName2- family name to set.
-
setFamilyName
-
setStyle
-
setSubfamily
-
setSubfamily
-
setMacStyle
protected void setMacStyle(int macStyle) Sets Open Type head.macStyle.- Parameters:
-
macStyle- macStyle flag
-
getMacStyle
protected int getMacStyle() -
setAllowEmbedding
protected void setAllowEmbedding(boolean allowEmbedding) -
toString
-