Skip to content

Commit 07a3fd5

Browse files
committed
fix readme
1 parent f95cb28 commit 07a3fd5

File tree

3 files changed

+48
-18
lines changed

3 files changed

+48
-18
lines changed

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# DON'T BE A DICK PUBLIC LICENSE
2+
3+
> Version 1.1, December 2016
4+
5+
> DON'T BE A DICK PUBLIC LICENSE
6+
> TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7+
8+
1. Do whatever you like with the original work, just don't be a dick.
9+
10+
Being a dick includes - but is not limited to - the following instances:
11+
12+
1a. Outright copyright infringement - Don't just copy this and change the name.
13+
1b. Selling the unmodified original with no work done what-so-ever, that's REALLY being a dick.
14+
1c. Modifying the original work to contain hidden harmful content. That would make you a PROPER dick.
15+
16+
2. If you become rich through modifications, related works/services, or supporting the original work,
17+
share the love. Only a dick would make loads off this work and not buy the original work's
18+
creator(s) a pint.
19+
20+
3. Code is provided with no warranty. Using somebody else's code and bitching when it goes wrong makes
21+
you a DONKEY dick. Fix the problem yourself. A non-dick would submit the fix back.

composer.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,20 @@
22
"name": "nazmulpcc/texter",
33
"description": "A PHP class which makes it easier to write Bangla text on images. Supports multi-line, align etc.",
44
"type": "library",
5-
"license": "MIT",
5+
"license": "DBAD",
6+
"authors": [
7+
{
8+
"name": "Nazmul Alam",
9+
"email": "nazmulpcc@gmail.com"
10+
}
11+
],
612
"require": {
7-
"php": "^5.3.3 || ^7.0",
813
"mirazmac/unicode2bijoy": "1.*"
914
},
10-
1115
"autoload": {
1216
"psr-4": { "nazmulpcc\\": "src/" }
1317
},
14-
18+
"minimum-stability": "dev",
1519
"suggest": {
1620
"ext-gd": "to use GD library based image processing."
1721
}

readme.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Texter helps to write Bangla/English text on image with PHP GD. It also has feat
88
$texter->startFrom(50, 90)->width(400)->on($image)->align('center')->fontSize(30)->color('333333');
99
$texter->text('আমার সোনার বাংলা, আমি তোমায় ভালবাসি Lorem ipsum dolor sit amet.....')->write();
1010
```
11-
It will give you something like this:
11+
It will give you something like this:
1212
![Result](http://i.imgur.com/phfgEqy.jpg "Result")
1313

1414
## Installation
@@ -21,25 +21,30 @@ You can easily install **Texter** via composer or you can manually download the
2121
### Manual
2222
- Download/Clone this repo.
2323
- Download/Clone [mirazmac/Unicode2Bijoy](https://github.com/mirazmac/Unicode2Bijoy) .
24-
- 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.
2525

2626
## 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.
3333
** 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:
38-
``` $texter->startFrom(10, 10)->color(0, 0, 0)->align('center')->width(500)->text('Hellow World')->write() ```
39-
**Note: ** Before you write a piece of text, you must at least set the starting points(**startFrom**), **width**, and **image**.
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:
38+
``` $texter->startFrom(10, 10)->color(0, 0, 0)->align('center')->width(500)->text('Hellow World')->write() ```
39+
**Note: ** Before you write a piece of text, you must at least set the starting points(**startFrom**), **width**, and **image**.
4040

4141
## About Texter
4242
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.
4343

44+
## To-Do
45+
- Add vertical alignment feature.
46+
- Support for Text shadow.
47+
- Add some debugging functions
48+
etc.
4449
## License
4550
This project is lincensed under [DBAD](http://www.dbad-license.org) license.

0 commit comments

Comments
 (0)