ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Static Public Member Functions | |
static | setAutoSizeMethod ($pValue=self::AUTOSIZE_METHOD_APPROX) |
Set autoSize method. More... | |
static | getAutoSizeMethod () |
Get autoSize method. More... | |
static | setTrueTypeFontPath ($pValue='') |
Set the path to the folder containing .ttf files. More... | |
static | getTrueTypeFontPath () |
Get the path to the folder containing .ttf files. More... | |
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. More... | |
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. More... | |
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. More... | |
static | fontSizeToPixels ($fontSizeInPoints=11) |
Calculate an (approximate) pixel size, based on a font points size. More... | |
static | inchSizeToPixels ($sizeInInch=1) |
Calculate an (approximate) pixel size, based on inch size. More... | |
static | centimeterSizeToPixels ($sizeInCm=1) |
Calculate an (approximate) pixel size, based on centimeter size. More... | |
static | getTrueTypeFontFileFromFont ($font) |
Returns the font path given the font. More... | |
static | getCharsetFromFontName ($name) |
Returns the associated charset for the font name. More... | |
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) More... | |
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. More... | |
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. More... | |
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 = 0xDD |
const | CHARSET_ANSI_LATIN_II = 0xEE |
const | CHARSET_OEM_LATIN_I = 0xFF |
const | ARIAL = 'arial.ttf' |
Font filenames. More... | |
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 | $_autoSizeMethods |
static | $autoSizeMethod = self::AUTOSIZE_METHOD_APPROX |
static | $trueTypeFontPath = null |
|
static |
Calculate an (approximate) OpenXML column width, based on font size and text contained.
PHPExcel_Style_Font | $font | Font object |
PHPExcel_RichText | string | $cellText | Text to calculate width |
integer | $rotation | Rotation angle |
PHPExcel_Style_Font | NULL | $defaultFont | Font object |
Definition at line 252 of file Font.php.
References array, 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 414 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 394 of file Font.php.
Referenced by PHPExcel_Shared_Excel5\sizeRow(), and PHPExcel_Reader_Excel2007\toCSSArray().
|
static |
|
static |
Returns the associated charset for the font name.
string | $name | Font name |
Definition at line 551 of file Font.php.
References $name.
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 571 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 603 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 338 of file Font.php.
References PHPExcel_Shared_String\CountCharacters().
|
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 |
PHPExcel_Exception |
Definition at line 304 of file Font.php.
References $text, and PHPExcel_Style_Font\getSize().
|
static |
Returns the font path given the font.
PHPExcel_Style_Font |
Definition at line 424 of file Font.php.
References $name.
|
static |
|
static |
Calculate an (approximate) pixel size, based on inch size.
int | $sizeInInch | Font size (in inch) |
Definition at line 404 of file Font.php.
Referenced by PHPExcel_Reader_Excel2007\toCSSArray().
|
static |
|
static |
Set the path to the folder containing .ttf files.
There should be a trailing slash. Typical locations on variout some platforms:
string | $pValue |
|
staticprivate |
|
staticprivate |
|
static |
Definition at line 151 of file Font.php.
Referenced by PHPExcel_Shared_Drawing\cellDimensionToPixels(), and PHPExcel_Shared_Drawing\pixelsToCellDimension().
|
staticprivate |
const PHPExcel_Shared_Font::ARIAL = 'arial.ttf' |
const PHPExcel_Shared_Font::ARIAL_BOLD_ITALIC = 'arialbi.ttf' |
const PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX = 'approx' |
Definition at line 39 of file Font.php.
Referenced by FontTest\testGetAutoSizeMethod(), and FontTest\testSetAutoSizeMethod().
const PHPExcel_Shared_Font::AUTOSIZE_METHOD_EXACT = 'exact' |
Definition at line 40 of file Font.php.
Referenced by FontTest\testSetAutoSizeMethod().
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 |
const PHPExcel_Shared_Font::COMIC_SANS_MS_BOLD = 'comicbd.ttf' |
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_ITALIC = 'georgiaz.ttf' |
const PHPExcel_Shared_Font::LIBERATION_SANS = 'LiberationSans-Regular.ttf' |
const PHPExcel_Shared_Font::LIBERATION_SANS_BOLD = 'LiberationSans-Bold.ttf' |
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_SANS_UNICODE = 'l_10646.ttf' |
const PHPExcel_Shared_Font::MICROSOFT_SANS_SERIF = 'micross.ttf' |
const PHPExcel_Shared_Font::PALATINO_LINOTYPE_BOLD = 'palab.ttf' |
const PHPExcel_Shared_Font::PALATINO_LINOTYPE_BOLD_ITALIC = 'palabi.ttf' |
const PHPExcel_Shared_Font::PALATINO_LINOTYPE_ITALIC = 'palai.ttf' |
const PHPExcel_Shared_Font::TIMES_NEW_ROMAN_BOLD = 'timesbd.ttf' |
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' |
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_ITALIC = 'verdanaz.ttf' |
const PHPExcel_Shared_Font::VERDANA_ITALIC = 'verdanai.ttf' |