Class Annotations.Font
Annotations.Font
Constructor Attributes | Constructor Name and Description |
---|---|
Annotations.Font(object)
A class representing a PDF font.
|
Field Attributes | Field Name and Description |
---|---|
The calculated size of the font if size is 0
|
|
The font's fill color
|
|
The font's name
|
|
The font's size
|
|
The font's stroke color
|
|
The font's type (One of CIDType0, CIDType2, MMType1, TrueType, Type0, Type1, Type3)
|
Method Attributes | Method Name and Description |
---|---|
isBlack()
Is the font solid black?
|
|
set(options)
Set all properties on Font using a Font or a Font-like object.
|
|
toCSS(zoom)
Convert the font to a CSS object like one would pass to jQuery.css().
|
Class Detail
Annotations.Font(object)
A class representing a PDF font.
- Parameters:
- {params} object Optional, Default: {}
- An object containing parameters to be initialised on the font.
Field Detail
{number}
calculatedSize
The calculated size of the font if size is 0
{(Annotations.Color|array|object)}
fillColor
The font's fill color
- Default Value:
- new Annotations.Color([0,0,0])
{string}
name
The font's name
{number}
size
The font's size
- Default Value:
- 0
{(Annotations.Color|array|object)}
strokeColor
The font's stroke color
- Default Value:
- new Annotations.Color([0,0,0])
{string}
type
The font's type (One of CIDType0, CIDType2, MMType1, TrueType, Type0, Type1, Type3)
- Default Value:
- 'Type1'
Method Detail
{boolean}
isBlack()
Is the font solid black?
- Returns:
- {boolean} Whether the font is solid black
set(options)
Set all properties on Font using a Font or a Font-like object.
- Parameters:
- {Annotations.Font|object} options
- The options to set on the Font
{object}
toCSS(zoom)
Convert the font to a CSS object like one would pass to jQuery.css().
- Parameters:
- zoom
- Returns:
- {object} An object appropriate to pass to jQuery.css()