[ Index ]

PHP Cross Reference of Unnamed Project

title

Body

[close]

/lib/phpexcel/PHPExcel/Shared/ -> Font.php (summary)

PHPExcel Copyright (c) 2006 - 2015 PHPExcel

Copyright: Copyright (c) 2006 - 2015 PHPExcel (http://www.codeplex.com/PHPExcel)
License: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.txt LGPL
Version: ##VERSION##, ##DATE##
File Size: 741 lines (30 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

PHPExcel_Shared_Font:: (14 methods):
  setAutoSizeMethod()
  getAutoSizeMethod()
  setTrueTypeFontPath()
  getTrueTypeFontPath()
  calculateColumnWidth()
  getTextWidthPixelsExact()
  getTextWidthPixelsApprox()
  fontSizeToPixels()
  inchSizeToPixels()
  centimeterSizeToPixels()
  getTrueTypeFontFileFromFont()
  getCharsetFromFontName()
  getDefaultColumnWidthByFont()
  getDefaultRowHeightByFont()


Class: PHPExcel_Shared_Font  - X-Ref

PHPExcel_Shared_Font

setAutoSizeMethod($pValue = self::AUTOSIZE_METHOD_APPROX)   X-Ref
Set autoSize method

param: string $pValue
return: boolean                    Success or failure

getAutoSizeMethod()   X-Ref
Get autoSize method

return: string

setTrueTypeFontPath($pValue = '')   X-Ref
Set the path to the folder containing .ttf files. There should be a trailing slash.
Typical locations on variout some platforms:
<ul>
<li>C:/Windows/Fonts/</li>
<li>/usr/share/fonts/truetype/</li>
<li>~/.fonts/</li>
</ul>

param: string $pValue

getTrueTypeFontPath()   X-Ref
Get the path to the folder containing .ttf files.

return: string

calculateColumnWidth(PHPExcel_Style_Font $font, $cellText = '', $rotation = 0, PHPExcel_Style_Font $defaultFont = null)   X-Ref
Calculate an (approximate) OpenXML column width, based on font size and text contained

param: PHPExcel_Style_Font            $font            Font object
param: PHPExcel_RichText|string    $cellText        Text to calculate width
param: integer                        $rotation        Rotation angle
param: PHPExcel_Style_Font|NULL    $defaultFont    Font object
return: integer        Column width

getTextWidthPixelsExact($text, PHPExcel_Style_Font $font, $rotation = 0)   X-Ref
Get GD text width in pixels for a string of text in a certain font at a certain rotation angle

param: string $text
param: PHPExcel_Style_Font
param: int $rotation
return: int

getTextWidthPixelsApprox($columnText, PHPExcel_Style_Font $font = null, $rotation = 0)   X-Ref
Get approximate width in pixels for a string of text in a certain font at a certain rotation angle

param: string $columnText
param: PHPExcel_Style_Font $font
param: int $rotation
return: int Text width in pixels (no padding added)

fontSizeToPixels($fontSizeInPoints = 11)   X-Ref
Calculate an (approximate) pixel size, based on a font points size

param: int        $fontSizeInPoints    Font size (in points)
return: int        Font size (in pixels)

inchSizeToPixels($sizeInInch = 1)   X-Ref
Calculate an (approximate) pixel size, based on inch size

param: int        $sizeInInch    Font size (in inch)
return: int        Size (in pixels)

centimeterSizeToPixels($sizeInCm = 1)   X-Ref
Calculate an (approximate) pixel size, based on centimeter size

param: int        $sizeInCm    Font size (in centimeters)
return: int        Size (in pixels)

getTrueTypeFontFileFromFont($font)   X-Ref
Returns the font path given the font

param: PHPExcel_Style_Font
return: string Path to TrueType font file

getCharsetFromFontName($name)   X-Ref
Returns the associated charset for the font name.

param: string $name Font name
return: int Character set code

getDefaultColumnWidthByFont(PHPExcel_Style_Font $font, $pPixels = false)   X-Ref
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)

param: PHPExcel_Style_Font $font The workbooks default font
param: boolean $pPixels true = return column width in pixels, false = return in OOXML units
return: mixed Column width

getDefaultRowHeightByFont(PHPExcel_Style_Font $font)   X-Ref
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

param: PHPExcel_Style_Font $font The workbooks default font
return: float Row height in points



Generated: Thu Aug 11 10:00:09 2016 Cross-referenced by PHPXref 0.7.1