mate-desktop / pluma

A powerful text editor for MATE
http://www.mate-desktop.org
GNU General Public License v2.0
158 stars 66 forks source link

Add quotes before and after font-family's value #676

Closed kingysu closed 1 year ago

kingysu commented 1 year ago
  1. If the font-family'value is Chinese or any non ASCII characters, the GTK CSS parser will produce a warning message: "Theme parsing error: :1:24: Expected a string.". That is, the GTK CSS parser can not process Chinese or non ASCII characters correctly.
  2. So, we should add quotes before and after font-family's value.
  3. GTK4 has good support for non ASCII characters.
zhuyaliang commented 1 year ago

@kingysu It is best to use g_string_append_printf

kingysu commented 1 year ago

@kingysu It is best to use g_string_append_printf

Got it.

kingysu commented 1 year ago

Two warnings confirmed that one has been fixed, so we agree to merge

What are the two warnings?

zhuyaliang commented 1 year ago

Edit->Preferences

(pluma:911570): Gtk-WARNING **: 13:46:50.973: Theme parsing error: <data>:1:17: Expected a string.

kingysu commented 1 year ago

Edit->Preferences

(pluma:911570): Gtk-WARNING **: 13:46:50.973: Theme parsing error: <data>:1:17: Expected a string.

Yes, this is the warning that I methioned before.

kingysu commented 1 year ago

I have comitted two patches to GTK3 to fix the problem and the two patches have been merged. PR1: Make sure that the charcode is signless; PR2: Fix a typo