Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certain special characters are not shown on Windows #4939

Closed
davidebeatrici opened this issue Apr 21, 2021 · 18 comments
Closed

Certain special characters are not shown on Windows #4939

davidebeatrici opened this issue Apr 21, 2021 · 18 comments
Labels
external-bug Bugs caused by things outside of our control - by dependencies, "upstream" in technical jargon qt windows

Comments

@davidebeatrici
Copy link
Member

Reported by @Natenom.

Example string: ᎭᎪᎢᎬᎭᎾᎷ

All characters are shown as empty space.

@davidebeatrici davidebeatrici added windows external-bug Bugs caused by things outside of our control - by dependencies, "upstream" in technical jargon qt labels Apr 21, 2021
@Krzmbrzl
Copy link
Member

Krzmbrzl commented Apr 22, 2021

It seems that it can happen that the used font does not contain the used characters. See https://forum.qt.io/topic/82243/some-unicode-characters-not-displayed-on-ui/3

There it is suggested that this can be checked with the following snippet:

QFont f("DejaVu sans");
QFontMetrics fm(f);
qDebug() << fm.inFont(QChar(2399)) << fm.inFont(QChar(2386));

I guess we'd instead want to use the font from our main application instead of providing the font name explicitly... (And obviously we'll have to use different character codes)

@davidebeatrici you said you can reproduce - could you try to verify that these characters are contained in the used font?

@davidebeatrici
Copy link
Member Author

QFontMetrics fm(qApp->font());
qDebug() << fm.inFont(QChar(0x13AD)) << fm.inFont(QChar(0x13AA)) << fm.inFont(QChar(0x13A2))
		 << fm.inFont(QChar(0x13AC)) << fm.inFont(QChar(0x13AD)) << fm.inFont(QChar(0x13BE))
		 << fm.inFont(QChar(0x13B7));
true true true true true true true

@Krzmbrzl
Copy link
Member

Hm okay.

Btw.: Why did you label this issue as upstream-bug? Do you already have evidence that this is not our fault? And if so: Why is this ticket still open? 🤔

@davidebeatrici
Copy link
Member Author

I'm pretty sure it's an upstream bug because Windows has no issues showing those characters.

The ticket is still open because we have to either find a workaround or fix the issue in Qt.

@Krzmbrzl
Copy link
Member

I guess in order to verify that this is an upstream Bug, we'd have to create a minimal example that also fails to display this String.
I think a simple label with this text should be sufficient. Plus it should probably include the check for whether these characters are contained in the used font. And if we have verified this in this way, we can file a report against Qt and close this issue here as an upstream issue.

Should that minimal example be capable of displaying this String, then the issue is probably on our side somewhere 🤔

@davidebeatrici
Copy link
Member Author

Done: https://github.com/mumble-voip/qt_unicode_test

String: "ᎭᎪᎢᎬᎭᎾᎷ"
Character '\u13ad' in font: true
Character '\u13aa' in font: true
Character '\u13a2' in font: true
Character '\u13ac' in font: true
Character '\u13ad' in font: true
Character '\u13be' in font: true
Character '\u13b7' in font: true

@Krzmbrzl
Copy link
Member

Upstream report: https://bugreports.qt.io/browse/QTBUG-93183

Until proven otherwise I'll close this as an upstream bug

@Kissaki
Copy link
Member

Kissaki commented May 2, 2021

@Krzmbrzl Shouldn’t this be listed as a known issue in our release notes then? Or is this specific to master rather than our stable too?

@Krzmbrzl
Copy link
Member

Krzmbrzl commented May 3, 2021

It seems to only be an issue with 1.4.0 snapshots.
But I guess for them we should probably add it...

@davidebeatrici
Copy link
Member Author

No, it's an issue in 1.3.x too.

I didn't try to reproduce in 1.2.x.

@Krzmbrzl
Copy link
Member

Krzmbrzl commented May 3, 2021

No, it's an issue in 1.3.x too.

@davidebeatrici Did you verify that? 'cause if I remember correctly @Natenom mentioned that this was only observed since 1.4.0 snapshots 🤔

@davidebeatrici
Copy link
Member Author

A user reports he cannot see some special characters with 1.3.4. Neither in the public server nor when connecting to the server.

@Krzmbrzl
Copy link
Member

Krzmbrzl commented May 3, 2021

Ah I missed that one... I'll add it to the list of known issues

@Kissaki
Copy link
Member

Kissaki commented May 8, 2021

Looks like it was added to the release notes (on GitHub) 👍

@Snowknight26
Copy link
Contributor

The example string provided in the first post, ᎭᎪᎢᎬᎭᎾᎷ, is rendered correctly on Windows 10 using 1.4.287. Noting this since this issue is listed as a known issue for 1.4.287.

image

@Krzmbrzl
Copy link
Member

I removed the note, thanks

@davidebeatrici
Copy link
Member Author

@Snowknight26 Was the string rendered correctly in 1.4.274 as well?

@Snowknight26
Copy link
Contributor

Snowknight26 commented Sep 15, 2022

@Snowknight26 Was the string rendered correctly in 1.4.274 as well?

It was, yes.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external-bug Bugs caused by things outside of our control - by dependencies, "upstream" in technical jargon qt windows
Projects
None yet
Development

No branches or pull requests

4 participants