Pango: Alternative to deprecated pango_fc_font_lock_face api?


I’m working on an application that subclasses PangoRenderer to produced cached text to render in OpenGL. (Source: )

As a part of this rendering process I use pango_fc_font_lock_face so I can rasterize glyphs to an atlas. This api is now deprecated, and the suggested replacement of accessing the underlying Harfbuzz face doesn’t seem to provide a way to rasterize the glyphs.

Is there a better option for this?

You can use PangoCairo to draw in a Cairo surface and then upload the image data to the texture.

GTK4 uses this approach in its OpenGL and Vulkan GSK renderers:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.