It works fine, however, when i compile it, the compiler warns me that āgtk_widget_get_style_contextā and āgtk_style_context_add_providerā have been deprecated. I donāt know why gtk delete the function so fast even it appears in official gtk4 document.
I know maybe it can been achieved by using css file, but is it possible to achieve it without css?
Only setting a provider on the style context of a widget has been deprecated, because it does not work like people expect it toāthe style rules do not cascade into the children of a widget.
They are not ādeletedā: theyāll continue to be available until GTK4 is EOL, which will happen when GTK6 is releasedāand we havenāt even started working on GTK5 at the moment.
The deprecation warnings are there to help during the port across major versions of GTK; if you know youāre using deprecated functions, you can easily disable the warnings until you want to port your code away from them.
You can create a text tag with its own font description, and apply it to the whole content of the text buffer.