ILIAS
eassessment Revision 61809
|
Static Public Member Functions | |
static | setAutoSizeMethod ($pValue= 'approx') |
Set autoSize method. | |
static | getAutoSizeMethod () |
Get autoSize method. | |
static | setTrueTypeFontPath ($pValue= '') |
Set the path to the folder containing .ttf files. | |
static | getTrueTypeFontPath () |
Get the path to the folder containing .ttf files. | |
static | calculateColumnWidth (PHPExcel_Style_Font $font, $cellText= '', $rotation=0, PHPExcel_Style_Font $defaultFont=null) |
Calculate an (approximate) OpenXML column width, based on font size and text contained. | |
static | getTextWidthPixelsExact ($text, PHPExcel_Style_Font $font, $rotation=0) |
Get GD text width in pixels for a string of text in a certain font at a certain rotation angle. | |
static | getTextWidthPixelsApprox ($columnText, PHPExcel_Style_Font $font=null, $rotation=0) |
Get approximate width in pixels for a string of text in a certain font at a certain rotation angle. | |
static | fontSizeToPixels ($fontSizeInPoints=11) |
Calculate an (approximate) pixel size, based on a font points size. | |
static | inchSizeToPixels ($sizeInInch=1) |
Calculate an (approximate) pixel size, based on inch size. | |
static | centimeterSizeToPixels ($sizeInCm=1) |
Calculate an (approximate) pixel size, based on centimeter size. | |
static | getTrueTypeFontFileFromFont ($font) |
Returns the font path given the font. | |
static | getCharsetFromFontName ($name) |
Returns the associated charset for the font name. | |
static | getDefaultColumnWidthByFont (PHPExcel_Style_Font $font, $pPixels=false) |
Get the effective column width for columns without a column dimension or column with width -1 For example, for Calibri 11 this is 9.140625 (64 px) | |
static | getDefaultRowHeightByFont (PHPExcel_Style_Font $font) |
Get the effective row height for rows without a row dimension or rows with height -1 For example, for Calibri 11 this is 15 points. |
Data Fields | |
const | AUTOSIZE_METHOD_APPROX = 'approx' |
const | AUTOSIZE_METHOD_EXACT = 'exact' |
const | CHARSET_ANSI_LATIN = 0x00 |
Character set codes used by BIFF5-8 in Font records. | |
const | CHARSET_SYSTEM_DEFAULT = 0x01 |
const | CHARSET_SYMBOL = 0x02 |
const | CHARSET_APPLE_ROMAN = 0x4D |
const | CHARSET_ANSI_JAPANESE_SHIFTJIS = 0x80 |
const | CHARSET_ANSI_KOREAN_HANGUL = 0x81 |
const | CHARSET_ANSI_KOREAN_JOHAB = 0x82 |
const | CHARSET_ANSI_CHINESE_SIMIPLIFIED = 0x86 |
const | CHARSET_ANSI_CHINESE_TRADITIONAL = 0x88 |
const | CHARSET_ANSI_GREEK = 0xA1 |
const | CHARSET_ANSI_TURKISH = 0xA2 |
const | CHARSET_ANSI_VIETNAMESE = 0xA3 |
const | CHARSET_ANSI_HEBREW = 0xB1 |
const | CHARSET_ANSI_ARABIC = 0xB2 |
const | CHARSET_ANSI_BALTIC = 0xBA |
const | CHARSET_ANSI_CYRILLIC = 0xCC |
const | CHARSET_ANSI_THAI = 0xDE |
const | CHARSET_ANSI_LATIN_II = 0xEE |
const | CHARSET_OEM_LATIN_I = 0xFF |
const | ARIAL = 'arial.ttf' |
Font filenames. | |
const | ARIAL_BOLD = 'arialbd.ttf' |
const | ARIAL_ITALIC = 'ariali.ttf' |
const | ARIAL_BOLD_ITALIC = 'arialbi.ttf' |
const | CALIBRI = 'CALIBRI.TTF' |
const | CALIBRI_BOLD = 'CALIBRIB.TTF' |
const | CALIBRI_ITALIC = 'CALIBRII.TTF' |
const | CALIBRI_BOLD_ITALIC = 'CALIBRIZ.TTF' |
const | COMIC_SANS_MS = 'comic.ttf' |
const | COMIC_SANS_MS_BOLD = 'comicbd.ttf' |
const | COURIER_NEW = 'cour.ttf' |
const | COURIER_NEW_BOLD = 'courbd.ttf' |
const | COURIER_NEW_ITALIC = 'couri.ttf' |
const | COURIER_NEW_BOLD_ITALIC = 'courbi.ttf' |
const | GEORGIA = 'georgia.ttf' |
const | GEORGIA_BOLD = 'georgiab.ttf' |
const | GEORGIA_ITALIC = 'georgiai.ttf' |
const | GEORGIA_BOLD_ITALIC = 'georgiaz.ttf' |
const | IMPACT = 'impact.ttf' |
const | LIBERATION_SANS = 'LiberationSans-Regular.ttf' |
const | LIBERATION_SANS_BOLD = 'LiberationSans-Bold.ttf' |
const | LIBERATION_SANS_ITALIC = 'LiberationSans-Italic.ttf' |
const | LIBERATION_SANS_BOLD_ITALIC = 'LiberationSans-BoldItalic.ttf' |
const | LUCIDA_CONSOLE = 'lucon.ttf' |
const | LUCIDA_SANS_UNICODE = 'l_10646.ttf' |
const | MICROSOFT_SANS_SERIF = 'micross.ttf' |
const | PALATINO_LINOTYPE = 'pala.ttf' |
const | PALATINO_LINOTYPE_BOLD = 'palab.ttf' |
const | PALATINO_LINOTYPE_ITALIC = 'palai.ttf' |
const | PALATINO_LINOTYPE_BOLD_ITALIC = 'palabi.ttf' |
const | SYMBOL = 'symbol.ttf' |
const | TAHOMA = 'tahoma.ttf' |
const | TAHOMA_BOLD = 'tahomabd.ttf' |
const | TIMES_NEW_ROMAN = 'times.ttf' |
const | TIMES_NEW_ROMAN_BOLD = 'timesbd.ttf' |
const | TIMES_NEW_ROMAN_ITALIC = 'timesi.ttf' |
const | TIMES_NEW_ROMAN_BOLD_ITALIC = 'timesbi.ttf' |
const | TREBUCHET_MS = 'trebuc.ttf' |
const | TREBUCHET_MS_BOLD = 'trebucbd.ttf' |
const | TREBUCHET_MS_ITALIC = 'trebucit.ttf' |
const | TREBUCHET_MS_BOLD_ITALIC = 'trebucbi.ttf' |
const | VERDANA = 'verdana.ttf' |
const | VERDANA_BOLD = 'verdanab.ttf' |
const | VERDANA_ITALIC = 'verdanai.ttf' |
const | VERDANA_BOLD_ITALIC = 'verdanaz.ttf' |
Static Public Attributes | |
static | $defaultColumnWidths |
Static Private Attributes | |
static | $autoSizeMethod = self::AUTOSIZE_METHOD_APPROX |
static | $trueTypeFontPath = null |
|
static |
Calculate an (approximate) OpenXML column width, based on font size and text contained.
int | $fontSize | Font size (in pixels or points) |
bool | $fontSizeInPixels | Is the font size specified in pixels (true) or in points (false) ? |
string | $cellText | Text to calculate width |
int | $rotation | Rotation angle |
Definition at line 241 of file Font.php.
References getTextWidthPixelsApprox(), getTextWidthPixelsExact(), and PHPExcel_Shared_Drawing\pixelsToCellDimension().
Referenced by PHPExcel_Worksheet\calculateColumnWidths().
|
static |
Calculate an (approximate) pixel size, based on centimeter size.
int | $sizeInCm | Font size (in centimeters) |
Definition at line 404 of file Font.php.
Referenced by PHPExcel_Reader_Excel2007\toCSSArray().
|
static |
Calculate an (approximate) pixel size, based on a font points size.
int | $fontSizeInPoints | Font size (in points) |
Definition at line 384 of file Font.php.
Referenced by PHPExcel_Shared_Excel5\sizeRow(), and PHPExcel_Reader_Excel2007\toCSSArray().
|
static |
Get autoSize method.
Definition at line 201 of file Font.php.
References $autoSizeMethod.
|
static |
Returns the associated charset for the font name.
string | $name | Font name |
Definition at line 541 of file Font.php.
References $name, CHARSET_ANSI_LATIN, CHARSET_ANSI_THAI, and CHARSET_SYMBOL.
Referenced by PHPExcel_Writer_Excel5_Font\writeFont().
|
static |
Get the effective column width for columns without a column dimension or column with width -1 For example, for Calibri 11 this is 9.140625 (64 px)
PHPExcel_Style_Font | $font | The workbooks default font |
boolean | $pPixels | true = return column width in pixels, false = return in OOXML units |
Definition at line 561 of file Font.php.
References PHPExcel_Style_Font\getName(), and PHPExcel_Style_Font\getSize().
Referenced by PHPExcel_Writer_Excel5_Worksheet\close(), and PHPExcel_Shared_Excel5\sizeCol().
|
static |
Get the effective row height for rows without a row dimension or rows with height -1 For example, for Calibri 11 this is 15 points.
PHPExcel_Style_Font | $font | The workbooks default font |
Definition at line 593 of file Font.php.
References PHPExcel_Style_Font\getName(), and PHPExcel_Style_Font\getSize().
Referenced by PHPExcel_Writer_HTML\buildCSS(), and PHPExcel_Shared_Excel5\sizeRow().
|
static |
Get approximate width in pixels for a string of text in a certain font at a certain rotation angle.
string | $columnText | |
PHPExcel_Style_Font | $font | |
int | $rotation |
Definition at line 329 of file Font.php.
References PHPExcel_Shared_String\CountCharacters().
Referenced by calculateColumnWidth().
|
static |
Get GD text width in pixels for a string of text in a certain font at a certain rotation angle.
string | $text | |
PHPExcel_Style_Font | ||
int | $rotation |
Exception |
Definition at line 295 of file Font.php.
References PHPExcel_Style_Font\getSize(), and getTrueTypeFontFileFromFont().
Referenced by calculateColumnWidth().
|
static |
Returns the font path given the font.
PHPExcel_Style_Font |
Definition at line 414 of file Font.php.
References $name, ARIAL_BOLD, CALIBRI_BOLD, COMIC_SANS_MS, COURIER_NEW_BOLD, GEORGIA_BOLD, IMPACT, LIBERATION_SANS_BOLD, LUCIDA_CONSOLE, LUCIDA_SANS_UNICODE, MICROSOFT_SANS_SERIF, PALATINO_LINOTYPE_BOLD, SYMBOL, TAHOMA, TIMES_NEW_ROMAN_BOLD, TREBUCHET_MS_BOLD, and VERDANA_BOLD.
Referenced by getTextWidthPixelsExact().
|
static |
Get the path to the folder containing .ttf files.
Definition at line 227 of file Font.php.
References $trueTypeFontPath.
|
static |
Calculate an (approximate) pixel size, based on inch size.
int | $sizeInInch | Font size (in inch) |
Definition at line 394 of file Font.php.
Referenced by PHPExcel_Reader_Excel2007\toCSSArray().
|
static |
|
static |
|
staticprivate |
Definition at line 130 of file Font.php.
Referenced by getAutoSizeMethod().
|
static |
Definition at line 146 of file Font.php.
Referenced by PHPExcel_Shared_Drawing\cellDimensionToPixels(), and PHPExcel_Shared_Drawing\pixelsToCellDimension().
|
staticprivate |
Definition at line 137 of file Font.php.
Referenced by getTrueTypeFontPath().
const PHPExcel_Shared_Font::ARIAL = 'arial.ttf' |
const PHPExcel_Shared_Font::ARIAL_BOLD = 'arialbd.ttf' |
Definition at line 66 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::ARIAL_BOLD_ITALIC = 'arialbi.ttf' |
const PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX = 'approx' |
const PHPExcel_Shared_Font::CALIBRI_BOLD = 'CALIBRIB.TTF' |
Definition at line 71 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::CALIBRI_BOLD_ITALIC = 'CALIBRIZ.TTF' |
const PHPExcel_Shared_Font::CHARSET_ANSI_CHINESE_SIMIPLIFIED = 0x86 |
const PHPExcel_Shared_Font::CHARSET_ANSI_CHINESE_TRADITIONAL = 0x88 |
const PHPExcel_Shared_Font::CHARSET_ANSI_JAPANESE_SHIFTJIS = 0x80 |
const PHPExcel_Shared_Font::CHARSET_ANSI_KOREAN_HANGUL = 0x81 |
const PHPExcel_Shared_Font::CHARSET_ANSI_KOREAN_JOHAB = 0x82 |
const PHPExcel_Shared_Font::CHARSET_ANSI_LATIN = 0x00 |
Character set codes used by BIFF5-8 in Font records.
Definition at line 43 of file Font.php.
Referenced by getCharsetFromFontName().
const PHPExcel_Shared_Font::CHARSET_ANSI_THAI = 0xDE |
Definition at line 59 of file Font.php.
Referenced by getCharsetFromFontName().
const PHPExcel_Shared_Font::CHARSET_SYMBOL = 0x02 |
Definition at line 45 of file Font.php.
Referenced by getCharsetFromFontName().
const PHPExcel_Shared_Font::COMIC_SANS_MS = 'comic.ttf' |
Definition at line 75 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::COMIC_SANS_MS_BOLD = 'comicbd.ttf' |
const PHPExcel_Shared_Font::COURIER_NEW_BOLD = 'courbd.ttf' |
Definition at line 79 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::COURIER_NEW_BOLD_ITALIC = 'courbi.ttf' |
const PHPExcel_Shared_Font::COURIER_NEW_ITALIC = 'couri.ttf' |
const PHPExcel_Shared_Font::GEORGIA_BOLD = 'georgiab.ttf' |
Definition at line 84 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::GEORGIA_BOLD_ITALIC = 'georgiaz.ttf' |
const PHPExcel_Shared_Font::IMPACT = 'impact.ttf' |
Definition at line 88 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::LIBERATION_SANS = 'LiberationSans-Regular.ttf' |
const PHPExcel_Shared_Font::LIBERATION_SANS_BOLD = 'LiberationSans-Bold.ttf' |
Definition at line 91 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::LIBERATION_SANS_BOLD_ITALIC = 'LiberationSans-BoldItalic.ttf' |
const PHPExcel_Shared_Font::LIBERATION_SANS_ITALIC = 'LiberationSans-Italic.ttf' |
const PHPExcel_Shared_Font::LUCIDA_CONSOLE = 'lucon.ttf' |
Definition at line 95 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::LUCIDA_SANS_UNICODE = 'l_10646.ttf' |
Definition at line 96 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::MICROSOFT_SANS_SERIF = 'micross.ttf' |
Definition at line 98 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::PALATINO_LINOTYPE_BOLD = 'palab.ttf' |
Definition at line 101 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::PALATINO_LINOTYPE_BOLD_ITALIC = 'palabi.ttf' |
const PHPExcel_Shared_Font::PALATINO_LINOTYPE_ITALIC = 'palai.ttf' |
const PHPExcel_Shared_Font::SYMBOL = 'symbol.ttf' |
Definition at line 105 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::TAHOMA = 'tahoma.ttf' |
Definition at line 107 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::TIMES_NEW_ROMAN_BOLD = 'timesbd.ttf' |
Definition at line 111 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::TIMES_NEW_ROMAN_BOLD_ITALIC = 'timesbi.ttf' |
const PHPExcel_Shared_Font::TIMES_NEW_ROMAN_ITALIC = 'timesi.ttf' |
const PHPExcel_Shared_Font::TREBUCHET_MS_BOLD = 'trebucbd.ttf' |
Definition at line 116 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::TREBUCHET_MS_BOLD_ITALIC = 'trebucbi.ttf' |
const PHPExcel_Shared_Font::TREBUCHET_MS_ITALIC = 'trebucit.ttf' |
const PHPExcel_Shared_Font::VERDANA_BOLD = 'verdanab.ttf' |
Definition at line 121 of file Font.php.
Referenced by getTrueTypeFontFileFromFont().
const PHPExcel_Shared_Font::VERDANA_BOLD_ITALIC = 'verdanaz.ttf' |
const PHPExcel_Shared_Font::VERDANA_ITALIC = 'verdanai.ttf' |