include/Sugarpdf/FontManager.php

Show: inherited
Table of Contents

\FontManager

Package:

Properties

Propertypublic\String[]  $errors= 'array()'

Contain all the errors generated during the process of FontManager

Default valuearray()Details
Type
\String[]
PropertypublicString  $filename= '""'

Current font filename

Default value""Details
Type
String
PropertypublicArray  $fontList= 'array()'

Multidimentional array which contain all the detail of all the available fonts

Default valuearray()Details
Type
Array
PropertypublicString  $fontPath= '""'

Current font file path

Default value""Details
Type
String
PropertypublicString  $font_displayname= '""'

Display name of the current font

Default value""Details
Type
String
PropertypublicString  $font_enc= '""'

Encoding of the current font

Default value""Details
Type
String
PropertypublicString  $font_name= '""'

Name of the font of the current font file

Default value""Details
Type
String
PropertypublicString  $font_type= '""'

Type of the current font

Default value""Details
Type
String
PropertypublicString  $log= '""'

store the log string when addFont is call

Default value""Details
Type
String

Methods

methodpublicaddFont( \$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()

Parameters
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

Returns
Type Description
boolean true on success
Details
See
\MakeFont()  
methodpublicclearCachedFile( ) : boolean

This method delete the cached file cachedFontList.php

Returns
Type Description
boolean
methodpublicdeleteFont( ) : boolean

This method delete all the files related to the font define in the filename attribute.

Returns
Type Description
boolean true on success
methodpublicfontFileExist(  $filename ) : boolean

Check if the given font filename exist in the font directories

Parameters
Name Type Description
$filename
Returns
Type Description
boolean
methodpublicgetDetail( ) : void

Fill the fontList attribute with the data contains in the font file.

methodprivategetEmbedded( ) : boolean

This method return a boolean which describe if the font define in filename is embedded or not.

Returns
Type Description
boolean true if embedded.
methodprivategetFilenameShort( ) : String

This method return the filename without the ".php"

Returns
Type Description
String The short filename
methodprivategetFontSize( ) : Integer

This method calculate the font size of $this->filename in KB .php file + .z file + .ctg.z file

Returns
Type Description
Integer font Size in KB
methodpublicgetSelectFontList( ) : Array

This method generate an array of font which can be use with get_select_options_with_id

Returns
Type Description
Array
methodprivategetStyle( ) : array\empty

This method return the style of the given font set in filename Values can be regular, bold, italic.

Returns
Type Description
array\empty of styles on successarray on failure
methodpubliclistFontFiles( ) : void

This method fill the fontList with all the fonts available

methodprivateloadFontFile( ) : boolean

This method load the font file and check if it is good formatted.

Returns
Type Description
boolean true on success
methodprivateparseFolder( ) : boolean

This method parse the font path defined in the sugarpdf config file and fill the fontList

Returns
Type Description
boolean true if font files have been found
methodprivatesetFontPath( ) : void

Documentation was generated by DocBlox 0.18.1.