Page 1 of 1

TCPDF cyrrilic

Posted: Tue Feb 15, 2022 3:02 pm
by kknm
TCPDF in nubuilder incorrectly calculates the field width for Cyrillic fonts, increasing the required field width by 2 times, because of this, it was necessary to make very large fields for correct display.
The settings of TCPDF itself do not affect the report in nubuilder.
The solution is in nurunpdf.php:

Change line 718

'if($O->width - 2 > $this->PDF->GetStringWidth((utf8_encode($text))))'
on the

if($O->width - 2 > $this->PDF->GetStringWidth((utf8_encode($text)))/2)
before:
tcpdf.png
after:
tcpdf1.png
I hope that this will help someone and will be included in the fixes.

Re: TCPDF cyrrilic

Posted: Thu Feb 17, 2022 11:41 am
by kev1n
Thanks for that! If that patch is applied, will the roman alphabet still be rendered correctly?

Re: TCPDF cyrrilic

Posted: Thu Feb 17, 2022 12:14 pm
by kknm
This only applies to UTF-8 with free fonts.
When testing other languages ​​and font combinations, there are no deviations ... although I'm not sure about the completeness of my tests. :-))