Is there an easy way to change the font size of text elements in GTK? Right now, the best thing I can do is to do set_markupon a shortcut with something stupid:
set_markup
lbl.set_markup("<span font_desc='Tahoma 5.4'>%s</span>" % text)
This 1) requires me to install the font, 2) it seems like a lot of overhead (it is necessary to parse the markup), and 3) it will make it annoying to change the font size of the buttons, etc. Is there a better way?
, gtkrc ( google, "gtkrc font" ubuntu, gtkrc):
style "font" { font_name = "Corbel 8" } widget_class "*" style "font" gtk-font-name = "Corbel 8"
( , )
, , , , . , , widget_class.
YMMV , AFAIK - , GTK , .
C :
gtk_widget_modify_font(lbl, pango_font_description_from_string("Tahoma 5.4"));
PyGTK , - :
pangoFont = pango.FontDescription("Tahoma 5.4") lbl.modify_font(pangoFont)
Source: https://habr.com/ru/post/1715032/More articles:The typedef template element is used in the raw parameter identifier in VS, but not in GCC - c ++What is the best method of processing settlements in US dollars in Perl? - perljQuery slideToggle not working with colspan in Firefox? - jqueryIn TextWrangler, can I set the number of spaces for each tab based on the extension for each file? - textwranglerBoost regex not working properly in my code - c ++JPA joins a table with multiple objects - javaКак избежать конфликтов SVN при слиянии ветки обратно в магистраль - branchУдаление файлов, не относящихся к проекту, из SVN в Visual Studio - svnIs it possible to programmatically debug one native .NET process - debuggingЯркость/экспозиция с помощью vb.net - vb.netAll Articles