Class PHPExcel_Shared_Font
PHPExcel_Shared_Font
Category: PHPExcel
Copyright: Copyright (c) 2006 - 2014 PHPExcel (http://www.codeplex.com/PHPExcel)
License: LGPL
Located at controlador/include/phpexcel/PHPExcel/Shared/Font.php
public static
boolean
|
#
setAutoSizeMethod( string $pValue =
Set autoSize method |
public static
string
|
|
public static
|
#
setTrueTypeFontPath( string $pValue = '' )
Set the path to the folder containing .ttf files. There should be a trailing slash. Typical locations on variout some platforms:
|
public static
string
|
|
public static
integer
|
#
calculateColumnWidth(
Calculate an (approximate) OpenXML column width, based on font size and text contained |
public static
integer
|
#
getTextWidthPixelsExact( string $text,
Get GD text width in pixels for a string of text in a certain font at a certain rotation angle |
public static
integer
|
#
getTextWidthPixelsApprox( string $columnText,
Get approximate width in pixels for a string of text in a certain font at a certain rotation angle |
public static
integer
|
#
fontSizeToPixels( integer $fontSizeInPoints = 11 )
Calculate an (approximate) pixel size, based on a font points size |
public static
integer
|
#
inchSizeToPixels( integer $sizeInInch = 1 )
Calculate an (approximate) pixel size, based on inch size |
public static
integer
|
#
centimeterSizeToPixels( integer $sizeInCm = 1 )
Calculate an (approximate) pixel size, based on centimeter size |
public static
string
|
|
public static
integer
|
|
public static
mixed
|
#
getDefaultColumnWidthByFont(
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) |
public static
float
|
#
getDefaultRowHeightByFont(
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 |
string |
AUTOSIZE_METHOD_APPROX
|
#
'approx'
|
string |
AUTOSIZE_METHOD_EXACT
|
#
'exact'
|
integer |
CHARSET_ANSI_LATIN
Character set codes used by BIFF5-8 in Font records |
#
0x00
|
integer |
CHARSET_SYSTEM_DEFAULT
|
#
0x01
|
integer |
CHARSET_SYMBOL
|
#
0x02
|
integer |
CHARSET_APPLE_ROMAN
|
#
0x4D
|
integer |
CHARSET_ANSI_JAPANESE_SHIFTJIS
|
#
0x80
|
integer |
CHARSET_ANSI_KOREAN_HANGUL
|
#
0x81
|
integer |
CHARSET_ANSI_KOREAN_JOHAB
|
#
0x82
|
integer |
CHARSET_ANSI_CHINESE_SIMIPLIFIED
|
#
0x86
|
integer |
CHARSET_ANSI_CHINESE_TRADITIONAL
|
#
0x88
|
integer |
CHARSET_ANSI_GREEK
|
#
0xA1
|
integer |
CHARSET_ANSI_TURKISH
|
#
0xA2
|
integer |
CHARSET_ANSI_VIETNAMESE
|
#
0xA3
|
integer |
CHARSET_ANSI_HEBREW
|
#
0xB1
|
integer |
CHARSET_ANSI_ARABIC
|
#
0xB2
|
integer |
CHARSET_ANSI_BALTIC
|
#
0xBA
|
integer |
CHARSET_ANSI_CYRILLIC
|
#
0xCC
|
integer |
CHARSET_ANSI_THAI
|
#
0xDD
|
integer |
CHARSET_ANSI_LATIN_II
|
#
0xEE
|
integer |
CHARSET_OEM_LATIN_I
|
#
0xFF
|
string |
ARIAL
Font filenames |
#
'arial.ttf'
|
string |
ARIAL_BOLD
|
#
'arialbd.ttf'
|
string |
ARIAL_ITALIC
|
#
'ariali.ttf'
|
string |
ARIAL_BOLD_ITALIC
|
#
'arialbi.ttf'
|
string |
CALIBRI
|
#
'CALIBRI.TTF'
|
string |
CALIBRI_BOLD
|
#
'CALIBRIB.TTF'
|
string |
CALIBRI_ITALIC
|
#
'CALIBRII.TTF'
|
string |
CALIBRI_BOLD_ITALIC
|
#
'CALIBRIZ.TTF'
|
string |
COMIC_SANS_MS
|
#
'comic.ttf'
|
string |
COMIC_SANS_MS_BOLD
|
#
'comicbd.ttf'
|
string |
COURIER_NEW
|
#
'cour.ttf'
|
string |
COURIER_NEW_BOLD
|
#
'courbd.ttf'
|
string |
COURIER_NEW_ITALIC
|
#
'couri.ttf'
|
string |
COURIER_NEW_BOLD_ITALIC
|
#
'courbi.ttf'
|
string |
GEORGIA
|
#
'georgia.ttf'
|
string |
GEORGIA_BOLD
|
#
'georgiab.ttf'
|
string |
GEORGIA_ITALIC
|
#
'georgiai.ttf'
|
string |
GEORGIA_BOLD_ITALIC
|
#
'georgiaz.ttf'
|
string |
IMPACT
|
#
'impact.ttf'
|
string |
LIBERATION_SANS
|
#
'LiberationSans-Regular.ttf'
|
string |
LIBERATION_SANS_BOLD
|
#
'LiberationSans-Bold.ttf'
|
string |
LIBERATION_SANS_ITALIC
|
#
'LiberationSans-Italic.ttf'
|
string |
LIBERATION_SANS_BOLD_ITALIC
|
#
'LiberationSans-BoldItalic.ttf'
|
string |
LUCIDA_CONSOLE
|
#
'lucon.ttf'
|
string |
LUCIDA_SANS_UNICODE
|
#
'l_10646.ttf'
|
string |
MICROSOFT_SANS_SERIF
|
#
'micross.ttf'
|
string |
PALATINO_LINOTYPE
|
#
'pala.ttf'
|
string |
PALATINO_LINOTYPE_BOLD
|
#
'palab.ttf'
|
string |
PALATINO_LINOTYPE_ITALIC
|
#
'palai.ttf'
|
string |
PALATINO_LINOTYPE_BOLD_ITALIC
|
#
'palabi.ttf'
|
string |
SYMBOL
|
#
'symbol.ttf'
|
string |
TAHOMA
|
#
'tahoma.ttf'
|
string |
TAHOMA_BOLD
|
#
'tahomabd.ttf'
|
string |
TIMES_NEW_ROMAN
|
#
'times.ttf'
|
string |
TIMES_NEW_ROMAN_BOLD
|
#
'timesbd.ttf'
|
string |
TIMES_NEW_ROMAN_ITALIC
|
#
'timesi.ttf'
|
string |
TIMES_NEW_ROMAN_BOLD_ITALIC
|
#
'timesbi.ttf'
|
string |
TREBUCHET_MS
|
#
'trebuc.ttf'
|
string |
TREBUCHET_MS_BOLD
|
#
'trebucbd.ttf'
|
string |
TREBUCHET_MS_ITALIC
|
#
'trebucit.ttf'
|
string |
TREBUCHET_MS_BOLD_ITALIC
|
#
'trebucbi.ttf'
|
string |
VERDANA
|
#
'verdana.ttf'
|
string |
VERDANA_BOLD
|
#
'verdanab.ttf'
|
string |
VERDANA_ITALIC
|
#
'verdanai.ttf'
|
string |
VERDANA_BOLD_ITALIC
|
#
'verdanaz.ttf'
|
private static
array
|
$_autoSizeMethods
|
#
array(
self::AUTOSIZE_METHOD_APPROX,
self::AUTOSIZE_METHOD_EXACT,
)
|
private static
string
|
$autoSizeMethod
AutoSize method |
|
private static
string
|
$trueTypeFontPath
Path to folder containing TrueType font .ttf files |
#
null
|
public static
array
|
$defaultColumnWidths
How wide is a default column for a given default font and size? Empirical data found by inspecting real Excel files and reading off the pixel width in Microsoft Office Excel 2007. |
#
array(
'Arial' => array(
1 => array('px' => 24, 'width' => 12.00000000),
2 => array('px' => 24, 'width' => 12.00000000),
3 => array('px' => 32, 'width' => 10.66406250),
4 => array('px' => 32, 'width' => 10.66406250),
5 => array('px' => 40, 'width' => 10.00000000),
6 => array('px' => 48, 'width' => 9.59765625),
7 => array('px' => 48, 'width' => 9.59765625),
8 => array('px' => 56, 'width' => 9.33203125),
9 => array('px' => 64, 'width' => 9.14062500),
10 => array('px' => 64, 'width' => 9.14062500),
),
'Calibri' => array(
1 => array('px' => 24, 'width' => 12.00000000),
2 => array('px' => 24, 'width' => 12.00000000),
3 => array('px' => 32, 'width' => 10.66406250),
4 => array('px' => 32, 'width' => 10.66406250),
5 => array('px' => 40, 'width' => 10.00000000),
6 => array('px' => 48, 'width' => 9.59765625),
7 => array('px' => 48, 'width' => 9.59765625),
8 => array('px' => 56, 'width' => 9.33203125),
9 => array('px' => 56, 'width' => 9.33203125),
10 => array('px' => 64, 'width' => 9.14062500),
11 => array('px' => 64, 'width' => 9.14062500),
),
'Verdana' => array(
1 => array('px' => 24, 'width' => 12.00000000),
2 => array('px' => 24, 'width' => 12.00000000),
3 => array('px' => 32, 'width' => 10.66406250),
4 => array('px' => 32, 'width' => 10.66406250),
5 => array('px' => 40, 'width' => 10.00000000),
6 => array('px' => 48, 'width' => 9.59765625),
7 => array('px' => 48, 'width' => 9.59765625),
8 => array('px' => 64, 'width' => 9.14062500),
9 => array('px' => 72, 'width' => 9.00000000),
10 => array('px' => 72, 'width' => 9.00000000),
),
)
|