Search code examples
cssimage-processingphp-gd

How can I manage css and php gd2 font size?


Font size of php gd2 and css is different.

How can I manage it?
Any formula to manage it?

Because when I send a string with font size in css it prints much larger in php gd2 than css font.

Please tell me some ideas to manage it.


Solution

  • in different versions of php_GD there different types of fonts. if you are using php-gd2 font type is used pt (point) not px. and in first php-gd i think px is font unit.