How to get a current font for GtkTextView?

丶灬走出姿态 提交于 2020-01-02 05:40:28

问题


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.)


回答1:


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



来源:https://stackoverflow.com/questions/1908645/how-to-get-a-current-font-for-gtktextview

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!