public static class CPDFTextAttribute.FontNameHelper
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
CPDFTextAttribute.FontNameHelper.FontType
font types
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
Font_Default_Type |
static java.lang.String |
Font_Favorite_Type |
Constructor and Description |
---|
FontNameHelper() |
Modifier and Type | Method and Description |
---|---|
static CPDFTextAttribute.FontNameHelper.FontType |
getFontType(java.lang.String fontName)
Gets standard font enumeration according to font name.
|
static android.graphics.Typeface |
getTypeface(android.content.Context context,
java.lang.String fontPsName)
Gets a typeface object according to font psname.
|
static boolean |
isBold(java.lang.String fontPsName)
Whether it is bold according to font psname.
|
static boolean |
isItalic(java.lang.String fontPsName)
Whether it is italic according to font psname.
|
static java.lang.String |
obtainFontName(CPDFTextAttribute.FontNameHelper.FontType fontType,
boolean isBold,
boolean isItalic)
Gets font psname according to fontType, isBold, isItalic, more:
CPDFTextAttribute.FontNameHelper.FontType |
static java.lang.String |
obtainFontName(java.lang.String familyName,
boolean isBold,
boolean isItalic)
Get font psname according to family name, isBold, isItalic.
|
static java.lang.String |
obtainFontName(java.lang.String familyName,
java.lang.String styleName)
Get font psname according to family name and style name.
|
public static final java.lang.String Font_Default_Type
public static final java.lang.String Font_Favorite_Type
public static java.lang.String obtainFontName(CPDFTextAttribute.FontNameHelper.FontType fontType, boolean isBold, boolean isItalic)
CPDFTextAttribute.FontNameHelper.FontType
fontType
- Standard font type.isBold
- Whether it is bold.isItalic
- Whether it is italic.public static java.lang.String obtainFontName(java.lang.String familyName, boolean isBold, boolean isItalic)
familyName
- Font family name.isBold
- Whether bold.isItalic
- Whether italic.public static java.lang.String obtainFontName(java.lang.String familyName, java.lang.String styleName)
familyName
- Font family name.styleName
- Font style name.public static CPDFTextAttribute.FontNameHelper.FontType getFontType(java.lang.String fontName)
fontName
- Font name.public static boolean isBold(java.lang.String fontPsName)
fontPsName
- Font psname.public static boolean isItalic(java.lang.String fontPsName)
fontPsName
- Font psname.public static android.graphics.Typeface getTypeface(android.content.Context context, java.lang.String fontPsName)
context
- Context.fontPsName
- Font psname.