include/Sugarpdf/FontManager.php
\FontManager
Properties
\String[]
$errors= 'array()'
Contain all the errors generated during the process of FontManager
array()
Details- Type
- \String[]
Array
$fontList= 'array()'
Multidimentional array which contain all the detail of all the available fonts
array()
Details- Type
- Array
String
$font_name= '""'
Name of the font of the current font file
""
Details- Type
- String
Methods
addFont(
\$font_file $font_file, \$metric_file $metric_file, \$embedded $embedded
=
true, \$encoding_table $encoding_table
=
'cp1252', \$patch $patch
=
array(), \$cid_info $cid_info
=
"", \$style $style
=
"regular"
)
:
boolean
This method add a font to SugarCRM from a font file and a metric file using MakeFont()
Name | Type | Description |
---|---|---|
$font_file | \$font_file | string |
$metric_file | \$metric_file | string |
$embedded | \$embedded | boolean |
$encoding_table | \$encoding_table | string |
$patch | \$patch | array |
$cid_info | \$cid_info | string |
$style | \$style | string |
Type | Description |
---|---|
boolean | true on success |
- See
- \MakeFont()
clearCachedFile(
)
:
boolean
This method delete the cached file cachedFontList.php
Type | Description |
---|---|
boolean |
deleteFont(
)
:
boolean
This method delete all the files related to the font define in the filename attribute.
Type | Description |
---|---|
boolean | true on success |
fontFileExist(
$filename
)
:
boolean
Check if the given font filename exist in the font directories
Name | Type | Description |
---|---|---|
$filename |
Type | Description |
---|---|
boolean |
getEmbedded(
)
:
boolean
This method return a boolean which describe if the font define in filename is embedded or not.
Type | Description |
---|---|
boolean | true if embedded. |
getFilenameShort(
)
:
String
This method return the filename without the ".php"
Type | Description |
---|---|
String | The short filename |
getFontSize(
)
:
Integer
This method calculate the font size of $this->filename in KB .php file + .z file + .ctg.z file
Type | Description |
---|---|
Integer | font Size in KB |
getSelectFontList(
)
:
Array
This method generate an array of font which can be use with get_select_options_with_id
Type | Description |
---|---|
Array |
getStyle(
)
:
array\empty
This method return the style of the given font set in filename Values can be regular, bold, italic.
Type | Description |
---|---|
array\empty | of styles on successarray on failure |
loadFontFile(
)
:
boolean
This method load the font file and check if it is good formatted.
Type | Description |
---|---|
boolean | true on success |
parseFolder(
)
:
boolean
This method parse the font path defined in the sugarpdf config file and fill the fontList
Type | Description |
---|---|
boolean | true if font files have been found |