Integrating Pango Font Loading Library into C++ project

Started by
2 comments, last by stimulate 6 years, 9 months ago

Hello community!

I am currently trying to implement text rendering into my C++ game engine, which is based on OpenGL with GLFW. I had text rendering working with the FreeType Library, but unfortunately it does not support GPOS Tables for Kerning, which seems to be used by most fonts nowadays. 

So this is why I want to switch to the Pango Library, which is said to support GPOS Tables. But unfortunately I could not find any guides on how to install or use this library and i do not have enough experience yet to figure it out by myself. On the Pango website they say Pango depends on a few font backends, either:

- FreeType, fontconfig and Harfbuzz 

- Uniscribe and Cairo (Windows only?)

- CoreText and Cairo (MacOSX only?)

 

But I do not know which to choose. All I really need is a library which can read .ttf files and render the contained glyphs into simple bitmaps along with providing metric information and kerning maps. I will then store all the glyphs in an atlas texture and handle the screen rendering and text layout myself.

Furthermore, I need help installing these backends together with Pango. Can anyone help me with this?

Advertisement
15 hours ago, stimulate said:

But unfortunately I could not find any guides on how to install

Here ? You'll have to download the matching binaries (32/64 bits), install it, and use the headers/libraries in your project.

15 hours ago, stimulate said:

or use this library

Here. But this is for old OpenGL.

I was using Pango for drawing text, but with old OpenGL too. I'll have to check how to make it work with modern OpenGL, but unfortunately I don't know when I'll have time to do that...

 

15 hours ago, stimulate said:

i do not have enough experience yet to figure it out by myself

Unfortunately all these Gtk libraries (Gtk, Gdk, Cairo, Pango, Atk...) are more made for people who are not afraid to make their hands dirty... Generally, there are few good documentation (except API reference but this is often useless), their API might change often, and support is left to their very tiny close 'fraternities'.

The binary downloads are broken on their website :/ I would need help building it from the source files.

I have now found exactly what i need here: https://github.com/quarnster/TTF

This topic is closed to new replies.

Advertisement