https://bugs.kde.org/show_bug.cgi?id=412636
Bug ID: 412636 Summary: gtk-font-name with localized name saved in literal bytes. Product: kde-gtk-config Version: 5.12.8 Platform: Other OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: general Assignee: manutort...@chakra-project.org Reporter: iclement...@outlook.com CC: aleix...@kde.org Target Milestone: --- Created attachment 123036 --> https://bugs.kde.org/attachment.cgi?id=123036&action=edit The saved gtk3 config file SUMMARY Kde-gtk-config does not handle fonts with localized name or localized style. It saves the config it ~/.config/gtk-3.0/settings.ini. Though the file is a utf-8 encoded text file, it seems like the writer just treat the font name & style as bytes, and literally saves the representation of bytes as strings. For example, I used a font whose style in in Chinese, "常规"(Regular) is saved in the file as "\xe5\xb8\xb8\xe8\xa7\x84". Following python3 terminology, b"\xe5\xb8\xb8\xe8\xa7\x84" is a bytes when "常规" is encoded with UTF-8, but the config writer somehow directly casts the byte representation "\xe5\xb8\xb8\xe8\xa7\x84" as string in the config file. Which cause GTK3 programs not to recognize the font settings. By the way, on openSUSE 42.3 with KDE 5.8.7, it correctly saves the font style as "常规" in the config file. for example, Typora which uses GTK theme settings. (Typora:8195): Gtk-WARNING **: Error setting gtk-font-name in /home/username/.config/gtk-3.0/settings.ini: Key file contains key “gtk-font-name” which has a value that cannot be interpreted. STEPS TO REPRODUCE 1. OS being OpenSUSE 15.1 or other distro using KDE 5.12.8. 2. Set the GTK font with kde-gtk-config to a font with localized font name or font style. 3. Check the gtk3 config file in ~/.config/gtk-3.0/settings.ini. OBSERVED RESULT The localized font name or style is saved in literal representation of bytes. EXPECTED RESULT The font name and style are identical to what you see in the kde-gtk-config setting page. SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: 5.12.8 (available in About System) KDE Plasma Version: 5.12.8 KDE Frameworks Version: 5.55.0 Qt Version: 5.9.4 ADDITIONAL INFORMATION -- You are receiving this mail because: You are watching all bug changes.