Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Line height problem with diacritic symbols #24

Open
antonlukin opened this issue Nov 23, 2018 · 3 comments
Open

Line height problem with diacritic symbols #24

antonlukin opened this issue Nov 23, 2018 · 3 comments

Comments

@antonlukin
Copy link

antonlukin commented Nov 23, 2018

Found bug with diacritic symbols and cyrillic font using textBox method.
Lines containing the letters with extension element (diacritic) differ in height with the others.

Generating code:

$poster = new PHPImage();
$poster->setDimensionsFromImage($image)->draw($image);
$poster->resize(1200, 630, true);

$poster->setFont(get_template_directory() . '/assets/fonts/formular/formular-black.ttf');
$poster->setTextColor([255, 255, 255]);
$poster->textBox($caption, [
     'x' => 48,
     'y' => 275,
     'width' => 1000,
     'fontSize' => 64
]);

54361-1542963265

@kus
How we can fix it? I will be glad of any help.

@kus
Copy link
Owner

kus commented Nov 25, 2018

Hi @antonlukin, can you please provide a full PHP file like the ones in test/ that demonstrates the problem?

@antonlukin
Copy link
Author

antonlukin commented Nov 25, 2018

Thank you for your prompt reply!
I've added the example to forked repo.

2018-11-25 13 50 40

@antonlukin
Copy link
Author

Hello @kus, can you show me the right way to fix this problem? I will try to do it myself

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants