Font File Parser with GPos Kerning Table Support for rendering Glyphs
Asked Answered
L

1

7

I am looking for a way to extract glyph bitmaps, glyph metrics and kerning data from font files (.ttf, .otf) with a support for GPos Kerning Tables.

I have used the FreeType Library before, but it does not support GPos Tables.

Likely answered 5/7, 2017 at 17:40 Comment(0)
H
2

I solved this by using HarfBuzz. This 'hello harfbuzz' sample shows how to initialize the library setting it up with a FreeType font. To extract kerning data, I created and shaped a buffer for each combination of letters I supported ('AA', 'AB', etc) and used the positioning data from hb_buffer_get_glyph_positions to infer the kerning offsets by comparing it to the advance values from FreeType.

Hendecagon answered 17/9, 2018 at 17:22 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.