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

Class: ArGlyphs

Source Location: /sub/ArGlyphs.class.php

Class Overview


PHP class to render Arabic text by performs Arabic glyph joining on it, then output a UTF-8 hexadecimals stream gives readable results on PHP libraries supports UTF-8.


Author(s):

Copyright:

  • Khaled Al-Shamaa 2008

Methods



Class Details

[line 46]
PHP class to render Arabic text by performs Arabic glyph joining on it, then output a UTF-8 hexadecimals stream gives readable results on PHP libraries supports UTF-8.



Tags:

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


[ Top ]


Class Methods


constructor __construct [line 55]

ArGlyphs __construct( )



Tags:

access:  public


[ Top ]

method a4_lines [line 243]

Integer a4_lines( String $str, Integer $font)

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

[ Top ]

method a4_max_chars [line 229]

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 convert [line 292]

String convert( String $str, [Integer $max_chars = 50], [Boolean $hindo = true])

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

[ Top ]


Documentation generated on Thu, 21 Feb 2008 13:58:54 +0200 by phpDocumentor 1.4.0