Question

Having downloaded Pango and GLib from the GTK+ Project's Win32 downloads page and having created and configured a Win32 project under Visual Studio 2005 so it points to the proper lib and include directories, how do you initialize Pango for rendering to a Win32 window?

Should the first call be to pango_win32_get_context()? Calling that function causes the application to hang on that call, as the function never returns.

What should be the first call? What other calls are needed to initialize Pango for Win32 and render a simple text string? Are there any examples available online for rendering with Pango under Win32?

Was it helpful?

Solution

Pango is a GObject based library. As such, you need to make sure that the glib dynamic type system is initialized before using any of its functionality. This can be done by calling g_type_init() (either directly or indirectly via something like gtk_init()). Could this be your problem?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top