mirror of https://github.com/freetype/freetype
8f286c86ef
This commit adds support for kerning from 'GPOS' tables, while maintaining support for basic 'kern' tables. `FT_HAS_KERNING` will be true for a font with either available and `FT_Get_Kerning` will still use the basic 'kern' table data if avilable, otherwise check the GPOS 'kern' feature. This feature is disabled by default; it can be enabled with the `TT_CONFIG_OPTION_GPOS_KERNING` flag. Only basic kerning (pair positioning with just an x advance) is supported from the GPOS layout features; support for that was added to make the existing `FT_Get_Kerning` API more consistently functional. FreeType does not intend to extend itself to further GPOS functionality though; a higher-level library like HarfBuzz can be used instead for that. * include/freetype/config/ftoption.h, include/devel/ftoption.h (TT_CONFIG_OPTION_GPOS_KERNING): New configuration option. * include/freetype/internal/fttrace.h: Add `ttgpos` trace handler. * include/freetype/internal/sfnt.h (SFNT_Interface): Add `load_gpos` and `get_gpos_kerning` fields. (FT_DEFINE_SFNT_INTERFACE): Updated. * include/freetype/internal/tttypes.h: Include `fttypes.h`. (TT_FaceRec) [TT_CONFIG_OPTION_GPOS_KERNING]: Add `gpos_table` and `gpos_kerning_available` fields. * src/sfnt/ttgpos.c, src/sfnt/ttgpos.h: New files. * src/sfnt/sfdriver.c [TT_CONFIG_OPTION_GPOS_KERNING]: Include `ttgpos.h`. (sfnt_interface): Updated. * src/sfnt/sfnt.c: Include `ttgpos.c`. * src/sfnt/sfobjs.c [TT_CONFIG_OPTION_GPOS_KERNING]: Include `ttgpos.h`. (sfnt_load_face) [TT_CONFIG_OPTION_GPOS_KERNING]: Load and free GPOS kerning data; check GPOS kerning availability. * src/truetype/ttdriver.c (tt_get_kerning): Use GPOS kerning if there's no 'kern' table. |
||
---|---|---|
.. | ||
markdown | ||
oldlogs | ||
.gitignore | ||
CHANGES | ||
CMAKE | ||
CUSTOMIZE | ||
DEBUG | ||
DOCGUIDE | ||
FTL.TXT | ||
GPLv2.TXT | ||
INSTALL | ||
INSTALL.ANY | ||
INSTALL.CROSS | ||
INSTALL.GNU | ||
INSTALL.MAC | ||
INSTALL.UNIX | ||
INSTALL.VMS | ||
MAKEPP | ||
PROBLEMS | ||
README | ||
TODO | ||
VERSIONS.TXT | ||
formats.txt | ||
freetype-config.1 | ||
freetype-web.txt | ||
raster.txt | ||
release |
README
After saying `make refdoc' or `make refdoc-venv' the `reference/' directory contains the FreeType API reference. You need Python >= 3.5 and pip to make this target. There are two ways to generate the documentation: 1. Using `make refdoc': - Ensure `python' and `pip' are available. - Install pip package `docwriter' with `pip install --user docwriter'. - Make target with `make refdoc'. - This target can be run offline once required packages are installed. 2. Using `make refdoc-venv' (requires internet access): - Ensure `python', `pip' and Python package `virtualenv' are available. - Make target with `make refdoc-venv'. - This may or may not require internet access every time depending on pip and system caching. Some troubleshooting tips: * Regularly run `pip install --upgrade docwriter' to check for updates which may include bug fixes. * `Docwriter' does not support Python 2. Ensure that Python >= 3.5 is installed and available as `python3'/`python'. * Ensure that `docwriter' is installed in the same Python target that `make refdoc' uses (python3/python). * If none of this works, send a mail to `freetype-devel@nongnu.org' or file an issue at `https://github.com/freetype/docwriter/issues'.