本文介绍了如何获取GtkTextView的当前字体?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通过 gtk_widget_modify_font()设置GtkTextView的默认字体非常简单,但是如何获取哪一个是当前的? (我没有在窗口小部件中使用任何标签)。

您可以使用 gtk_widget_get_style() 获取当前的GtkStyle,然后使用 gtk_style_get_font()


It's pretty easy to set the default font for a GtkTextView via gtk_widget_modify_font(), but how to get which one is current? (I'm not using any tags in the widget.)

解决方案

You can use gtk_widget_get_style() to get the current GtkStyle, and then use gtk_style_get_font().

这篇关于如何获取GtkTextView的当前字体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-22 16:11
查看更多