[]
• new PDFFontsManager()
Represent a pdf fonts manager.
▸ Static fallbackFont(font): any
Provide a fallback font for the specific font.
static
example
// import fonts file
var font = {
normal: fontsObj['customFont2.ttf']
};
GC.Spread.Sheets.PDF.PDFFontsManager.fallbackFont = function (font) {
var fontInfoArray = font.split(' '), fontName = fontInfoArray[fontInfoArray.length - 1];
if (fontName === 'Calibri') {
return fonts.normal;
}
}
| Name | Type | Description |
|---|---|---|
font |
string |
the css font string. |
any
The font file in base64 string or ArrayBuffer.
▸ Static registerFont(name, font): void
Register a Font for export PDF.
static
example
// import fonts file
var font = {
normal: fonts['customFont1.ttf']
};
GC.Spread.Sheets.PDF.PDFFontsManager.registerFont('customFont1', font);
| Name | Type | Description |
|---|---|---|
name |
string |
The font name. |
font |
Object |
- |
void