-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add auto split for chinese traditional text / #9
- Loading branch information
1 parent
aa8d45b
commit 6ae4173
Showing
7 changed files
with
123 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<?php | ||
/** | ||
* Chinese separators example. | ||
* php version 7.1 | ||
* | ||
* @category PHP | ||
* @package PosterEditor | ||
* @author Anton Lukin <anton@lukin.me> | ||
* @license MIT License (http://www.opensource.org/licenses/mit-license.php) | ||
* @link https://github.com/antonlukin/poster-editor | ||
*/ | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; | ||
|
||
try { | ||
$image = new PosterEditor\PosterEditor(); | ||
$image->make('images/bridge.jpg')->crop( | ||
900, 600, | ||
array( | ||
'x' => '0', | ||
'y' => '100' | ||
) | ||
); | ||
|
||
$image->grayscale()->brightness(-40); | ||
|
||
$image->text( | ||
"大家小時候都有寫過紀念冊嗎?通過紀念冊上的文字和圖案,的回憶記錄下來。今年我們希望製作出所有星詠。透過成員互相分享與回憶,化為各地星詠者對星街的支持,以及星詠者之間的連繫與羈絆。", | ||
array( | ||
'x' => 20, | ||
'y' => 0, | ||
'width' => 860, | ||
'horizontal' => 'start', | ||
'vertical' => 'center', | ||
'fontpath' => 'fonts/notosans-tc-regular.otf', | ||
'lineheight' => 1.75, | ||
'fontsize' => 18, | ||
'color' => '#ffffff', | ||
'opacity' => 1, | ||
) | ||
); | ||
|
||
$image->show(); | ||
|
||
} catch(Exception $e) { | ||
echo $e->getMessage(); | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters