You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Include Texter.php and Unicode2Bijoy.php in your code and you are ready to go.
24
+
- Include **Texter.php** and **Unicode2Bijoy.php** in your code and you are ready to go.
25
25
26
26
## Documentation
27
-
Each method is fairly well documented in the source code. A few important methods:
28
-
** startFrom(x, y): ** Set up the co-ordinates from which Texter will start writing.
29
-
** width($w): ** Width of the boundary inside which Texter will write text.
30
-
** align($position): ** Set the horizontal alignment to left, right or center/centre. Default is left.
31
-
** on($image) ** / ** image($image): ** Set the image on which Texter will write. Image is passed by reference.
32
-
** fontSize($size): ** Set the font size. $size can be point or pixel, like ```$texter->fontSize('15pt')``` or ```$texter->fontSize('15px'). If 'pt' or 'px' is absent, the gd default is used.
27
+
Each method is fairly well documented in the source code. A few important methods:
28
+
** startFrom(x, y): ** Set up the co-ordinates from which Texter will start writing.
29
+
** width($w): ** Width of the boundary inside which Texter will write text.
30
+
** align($position): ** Set the horizontal alignment to left, right or center/centre. Default is left.
31
+
** on($image) ** / ** image($image): ** Set the image on which Texter will write. Image is passed by reference.
32
+
** fontSize($size): ** Set the font size. $size can be point or pixel, like ```$texter->fontSize('15pt')``` or ```$texter->fontSize('15px'). If 'pt' or 'px' is absent, the gd default is used.
33
33
** color($hex): ** / ** color($red, $green, $blue): ** Both hex and RGB are accepted as text color.
34
-
** text($text): ** Add text to be written.
35
-
** lineHeight($height): ** The line height. $height can be in pixel or as a percentage of the text height.
36
-
** write(): ** Call this guy to do the job or if you want to start a new line.
37
-
All public functions can be chained up. So you can always do things like:
**Note: ** Before you write a piece of text, you must at least set the starting points(**startFrom**), **width**, and **image**.
40
40
41
41
## About Texter
42
42
I developed this out of pure frustration that PHP, one of the most widely used coding language doesn't support Bangla because GD can't handle complex fonts. There are room for a lot of improvements which I will try to accomplish gradually. Please contribute if you can.
43
43
44
+
## To-Do
45
+
- Add vertical alignment feature.
46
+
- Support for Text shadow.
47
+
- Add some debugging functions
48
+
etc.
44
49
## License
45
50
This project is lincensed under [DBAD](http://www.dbad-license.org) license.
0 commit comments