stil / gd-text

PHP class making it easy to type text on pictures. Supports multi-lined text, horizontal and vertical alignment.
400 stars 131 forks source link

Text rotation #24

Open ArtDepartmentMJ opened 7 years ago

ArtDepartmentMJ commented 7 years ago

Is it possible to set the text rotation?

stil commented 7 years ago

No, it would need some code changes. By default no rotation is set: https://github.com/stil/gd-text/blob/master/src/Box.php#L402

ArtDepartmentMJ commented 7 years ago

For my purposes it was pretty easy to just create a new transparent image for the text to sit on and then just rotate that on to the canvas.

stil commented 7 years ago

Was text quality affected after rotation of transparent layer? I might implement it in the library, because it's probably easiest way to do this. However I'm not sure how antialiasing interferes with rotations of already rasterized text.

daidi commented 6 years ago

look forward to it

daidi commented 6 years ago

it seems we can use $angle directly . http://php.net/manual/zh/function.imagefttext.php

AdamBissonnette commented 6 years ago

Any updates on this? @daidi

daidi commented 6 years ago

@MManifesto see this #41