如何在Win32下初始化Pango?

时间:2022-09-14 20:21:25

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?

从GTK + Project的Win32下载页面下载了Pango和GLib,并在Visual Studio 2005下创建并配置了Win32项目,因此它指向正确的lib和include目录,如何初始化Pango以呈现到Win32窗口?

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.

第一次调用应该是pango_win32_get_context()吗?调用该函数会导致应用程序挂起该调用,因为该函数永远不会返回。

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?

第一次打电话应该是什么?还有什么其他调用来初始化Pango for Win32并呈现一个简单的文本字符串?在Win32下使用Pango进行渲染是否有在线可用的示例?

1 个解决方案

#1


5  

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?

Pango是一个基于GObject的库。因此,您需要确保在使用其任何功能之前初始化glib动态类型系统。这可以通过调用g_type_init()(直接或间接通过类似gtk_init())来完成。这可能是你的问题吗?

#1


5  

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?

Pango是一个基于GObject的库。因此,您需要确保在使用其任何功能之前初始化glib动态类型系统。这可以通过调用g_type_init()(直接或间接通过类似gtk_init())来完成。这可能是你的问题吗?