Arabic
[ class tree: Arabic ] [ index: Arabic ] [ all elements ]

Class: ArGlyphs

Source Location: /sub/ArGlyphs.class.php

Class Overview


This PHP class render Arabic text by performs Arabic glyph joining on it


Author(s):

Copyright:

  • 2009 Khaled Al-Shamaa

Methods



Class Details

[line 84]
This PHP class render Arabic text by performs Arabic glyph joining on it



Tags:

author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
copyright:  2009 Khaled Al-Shamaa
link:  http://www.ar-php.org
license:  LGPL


[ Top ]


Class Methods


constructor __construct [line 94]

ArGlyphs __construct( )

Loads initialize values



Tags:

access:  public


[ Top ]

method a4_lines [line 276]

integer a4_lines( string $str, integer $font, [string $inputCharset = null], [object $main = null])

Calculate the lines number of given Arabic text and font size that will fit in A4 page size



Tags:

return:  Number of lines for a given Arabic string in A4 page size
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Arabic string you would like to split it into lines
integer   $font   Font size
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]

method a4_max_chars [line 257]

integer a4_max_chars( integer $font)

Regression analysis calculate roughly the max number of character fit in one A4 page line for a given font size.



Tags:

return:  Maximum number of characters per line
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

integer   $font   Font size

[ Top ]

method utf8Glyphs [line 334]

string utf8Glyphs( string $str, [integer $max_chars = 50], [boolean $hindo = true], [string $inputCharset = null], [object $main = null])

Convert Arabic Windows-1256 charset string into glyph joining in UTF-8 hexadecimals stream (take care of whole the document including English sections as well as numbers and arcs etc...)



Tags:

return:  Arabic glyph joining in UTF-8 hexadecimals stream (take care of whole document including English sections as well as numbers and arcs etc...)
author:  Khaled Al-Shamaa <khaled.alshamaa@gmail.com>
access:  public


Parameters:

string   $str   Arabic string in Windows-1256 charset
integer   $max_chars   Max number of chars you can fit in one line
boolean   $hindo   If true use Hindo digits else use Arabic digits
string   $inputCharset   (optional) Input charset [utf-8|windows-1256|iso-8859-6] default value is NULL (use set input charset)
object   $main   Main Ar-PHP object to access charset converter options

[ Top ]


Documentation generated on Tue, 18 Aug 2009 00:12:49 +0300 by phpDocumentor 1.4.0