Pango is a library for laying out and rendering of text, with an emphasis on internationalization. The name comes from the Greek Παν (“Pan”), meaning “all”, and the Japanese 語 (“Go”), meaning “language”.
This extension provides access to Pango functionality in PHP 8.2+ in the Pango and PangoCairo namespace.
- PHP 8.2+
- Pango 1.40+
- ext-cairo
Features are enabled at compile time based on the library version they are compiled against.
Documentation and information about the underlying library can be found at https://docs.gtk.org/Pango/.
There are plans to make this available via PIE (PHP Installer for Extensions)
Until then, please compile and install the pango extensions and enable it in your php.ini file.
extension=pango.so
This extension can be compiled and tested using phpize.
The pango extension also requires pango development files. You can build the package manually or use your system's package manager. For example on ubuntu use:
apt-get install libpango1.0-dev libcairo2-dev libfreetype6-dev fontconfig
Then you can use phpize to install the extension against your current PHP install:
phpize
./configure
make && make test && make install
If you want to use a non-standard location for your PHP use:
/path/to/phpize
./configure --with-php-config=/path/to/php-config
make && make test && make install
make install copies pango.so to the right location, but you still need to enable the module
in your php.ini file.
A coverage report is uploaded to gh-pages during every Build and Test workflow.
Requirements: lcov, gzip.
To obtain a code coverage report the extension must be compiled with additional flags:
phpize
PANGO_COVERAGE=yes ./configure
make && make install
coverage.sh
This will run all tests and create an html report.
You can send comments, patches, questions here on github.
Michael Maclean | Marcel Bolten
The PHP extension binding code is released under the PHP License, version 3.01 See LICENSE
Parts of the code are based on files from the cairo extension for PHP which is licensed under the MIT License
Pango is released under the LGPL-2.1-or-later
So far there is only limited documentation available. It is primarily in the code comments and the stub.php files.
There are plans to make the stub files available as an independent composer package.