Closed cloudfish closed 1 year ago
I renamed a video file with a filename so long the title stretched across the window, opened it in firefox (which can play local video) and marco rendered the title. NO title on the named website, though I do not have any fonts relevent to that alphabet installed. Don't know if that issue is font specific.
I assume if fonts in the system do not support CJK characters, then only the CJK characters will be affected, not the entire title.
You can try opening https://www.debian.org/index.zh-cn.html with firefox. CJK characters will be in the middle of the title, not at the beginning. The title will be rendered correctly.
This is what I got in firefox w marco as WM on that site, same as in compiz (which by the way uses part of marco to render decorations in most builds of the 0.8 branch)
This is what I got in firefox w marco as WM on that site, same as in compiz (which by the way uses part of marco to render decorations in most builds of the 0.8 branch))
This result is expected. Font issue should not make the entire title disappear. So if you open zh.wikipedia.org the title bar should still end with "Mozilla Firefox".
The issue does not affect 1.26.1, so maybe commit 319ee4f caused the issue.
@cloudfish thanks for the detailed report, and even locating the problematic commit :) #758 should fix it.
Issue confirmed here, and it affects only marco and not compiz's use of marco for the gtk-window-decorator
What's wrong with the tile of the window (it's not a bar)? With fedora 38:
@raveit65 with which Marco version? I confirm the OP, that with #749 and without this PR I get an empty title if the first character uses more than 2 bytes in UTF-8 (like the one you display) -- and it makes sense, as it counts characters only in the first 2 bytes, so anything longer will not be counted (depending on how GLib counts, but it's how it works here)
Ahh, my version is from master but without https://github.com/mate-desktop/marco/issues/749 and the meson commits. Will rebuild marco to reproduce the issue.
Indeed, window decoration title is gone of https://zh.wikipedia.org/ when building from latest master.
Expected behaviour
Marco displays a window title starting with a character >= 3 bytes long.
Actual behaviour
Marco does not display a window title starting with a character >= 3 bytes long.
Steps to reproduce the behaviour
Open https://zh.wikipedia.org with firefox. The titlebar of firefox window does not contain a title.
MATE general version
1.26.1
Package version
marco 1.26.2
Linux Distribution
Debian
Link to bugreport of your Distribution (requirement)
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1041196
It seems that the fix for #749 caused this. Most Chinese characters are 3 bytes long under UTF-8, and UTF-8 characters can be as long as 4 bytes. So "g_utf8_strlen (title, 2) < 1" will be true if the first character is Chinese.