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

Thai font broke after upgrade to v4.6.0 #25825

Closed
icez opened this issue Feb 4, 2023 · 77 comments
Closed

Thai font broke after upgrade to v4.6.0 #25825

icez opened this issue Feb 4, 2023 · 77 comments

Comments

@icez
Copy link

icez commented Feb 4, 2023

Steps to reproduce

With reference to issue #7845 . The situation is about the same. The previous stable version on Windows OS seems to use Tahoma for displaying Thai language but on v4.6.0 it seems to change to another font which cause Thai word to be too small compare to other.

v4.6.0
https://imgur.com/rvIdiAF

v4.5.3
https://imgur.com/o27t0T9

Expected behaviour

v4.5.3
https://imgur.com/o27t0T9

Actual behaviour

v4.6.0
https://imgur.com/rvIdiAF

Operating system

Windows 11

Version of Telegram Desktop

v4.6.0

Installation source

Static binary from official website

Logs

No response

@icez icez added the bug label Feb 4, 2023
@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 4, 2023

The v4.6.0 link is unavailable, it's better to load images on github. But there indeed was a change in retrieving default system font for better UX on High-DPI, the used API is upgraded from Windows XP one to the Windows 7 one. So I don't think it's really broken, just a more modern font is used.

@icez
Copy link
Author

icez commented Feb 4, 2023

Re-uploaded here:

v4.6.0
rvIdiAF

v4.5.3
o27t0T9

It looks like the default system font detected is not optimal to use on low DPI screen. Is it possible to force/change font setting in the app?

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 4, 2023

No, it's not possible to change font and adding such an option is non-trivial and is not planned (#90). The API change is backported from Qt 6, can you check any Qt application (e.g. qBittorrent has Qt 6 builds)? If its font is good then maybe the backport is incomplete, if it's the same, it's better to report to Qt and when Qt developers produce a fix, it could be backported.

@icez
Copy link
Author

icez commented Feb 4, 2023

Not sure if the user-generated content will be fine but UI looks fine to me. qTorrent 4.5.0 running on Windows 11 & change app language to Thai.

c-20230204-140142

@ilya-fedin
Copy link
Contributor

Does it use another font or just the text is bigger?

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 4, 2023

Also, are you sure you checked qBittorrent built with Qt 6 exactly? Qt 5 version would use the legacy API tdesktop used previously.

@icez
Copy link
Author

icez commented Feb 4, 2023

I just noticed that I downloaded the qt5 version. Here's from Qt 6. So this seems to be Qt6 problem.

image

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 4, 2023

btw, I just checked and I can't reproduce your problem, so it might be that some additionally installed fonts (that may happen even automatically when installing software) caused this. So prepare that Qt developers may not reproduce your problem when you will report this to them and you will have to find what installed the breaking font by installing Windows into VM and installing software you use or copying your host fonts into it.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 4, 2023

You can also try the Linux font rendering engine by typing freetype cheat code

@ilya-fedin
Copy link
Contributor

If the question is for me then the answer is no

@icez
Copy link
Author

icez commented Feb 4, 2023

Tried 'freetype' & back to GDI. No difference.

I've checked with many friends and they're all having this problem. I'll try changing the default Windows font and see if there's any change to this. I'll report back later

@ilya-fedin
Copy link
Contributor

Hmm, maybe it's a font that is present only in Thai version of Windows? Changing default font is unlikely to help, what you see is likely to be caused by Qt's fallback logic that just tries all the fonts in the system in alphabetical order and picks up the first one that claims to have a glyph for the character.

@likecyber
Copy link

Hmm, maybe it's a font that is present only in Thai version of Windows? Changing default font is unlikely to help, what you see is likely to be caused by Qt's fallback logic that just tries all the fonts in the system in alphabetical order and picks up the first one that claims to have a glyph for the character.

This is true, I used the software to copy and rename the font name of "Tahoma" to "_Tahoma" and install it on my Windows.
The Telegram Desktop app does take effect by the copied fonts, now it looks like the previous version!

If anyone wants to copy and rename the font name, you can use the software named "FontForge" or "Typograf".
Make sure to do it both on tahoma.ttf and tahomabd.ttf.
Otherwise, it may look weird on some parts of the Telegram app.

@iBug
Copy link

iBug commented Feb 4, 2023

I'd like to add that a popular workaround for Chinese font issue on English systems is also broken in v4.6.

In English installations of Windows 10, the default font fallback lists all put Microsoft JhengHei (MSJH, Japanese font) above Microsoft YaHei (MSYH, Simp./Trad. Chinese), causing streams of Chinese characters to be rendered in both fonts.

A common solution is editing the registry to manually prioritize MSYH over MSJH (link), which worked until TDesktop v4.6.

I have dug through the registry for hours and could not get the same solution to work anymore.

@iBug
Copy link

iBug commented Feb 4, 2023

This is true, I used the software to copy and rename the font name of "Tahoma" to "_Tahoma" and install it on my Windows.

@likecyber Can you elaborate a bit more on this? Did you install a copy of the Tahoma font as "_Tahoma"? Did you remove the original Tahoma font (i.e. the system no longer has a font named "Tahoma")?

@likecyber
Copy link

This is true, I used the software to copy and rename the font name of "Tahoma" to "_Tahoma" and install it on my Windows.

@likecyber Can you elaborate a bit more on this? Did you install a copy of the Tahoma font as "_Tahoma"? Did you remove the original Tahoma font (i.e. the system no longer has a font named "Tahoma")?

Yes, I did install a copy of the Tahoma font family as "_Tahoma". (tahoma.ttf + tahomabd.ttf)
I did not remove the original Tahoma font as it may break some display parts of Windows and apps.

The reason behind putting the underscore before the name is to make it the first font for alphabetical order fallback.

This way I will also have the original Tahoma and a copy of Tahoma on the same computer.
It will fix the Telegram Desktop app and also not break Windows and other apps.

@itorz7
Copy link

itorz7 commented Feb 4, 2023

  • same problem

@likecyber
Copy link

If anyone really needs a quick fix for this issue, you may install the fonts I renamed from this repository.
This is just a temporary quick fix. The explanation can be read inside the repository.

It should work for any language that uses Tahoma as the display font in the previous version.

https://github.com/likecyber/Tahoma-For-Telegram

@tiietee
Copy link

tiietee commented Feb 5, 2023

If anyone really needs a quick fix for this issue, you may install the fonts I renamed from this repository. This is just a temporary quick fix. The explanation can be read inside the repository.

It should work for any language that uses Tahoma as the display font in the previous version.

https://github.com/likecyber/Tahoma-For-Telegram

This works so well. You save my life! Thank you soooooo much. TT

@Mynameisone
Copy link

Mynameisone commented Feb 5, 2023

@likecyber Thank you soooooo much.you good bro

@totoguy
Copy link

totoguy commented Feb 5, 2023

@Aokromes You've merged the Hebrew issue with this one, but none of the suggested workarounds here resolve the Hebrew one. At least for me.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 6, 2023

It likely means Hebrew is a part of Segoe UI and so is not a bug. If you don't like the font size, well, you can change scale.

@charnsak
Copy link

charnsak commented Feb 6, 2023

Using Thai and also faced the same problem.
The quick fix with renamed Tahoma work. Thank you for the work around. The small font hurt my eye so much

@icez
Copy link
Author

icez commented Feb 6, 2023

This issue should now be closed. I'll try submit issue to Qt.

@icez icez closed this as completed Feb 6, 2023
@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 7, 2023

not if you have several languages on computer and russian is not main display language.

You want to say tdesktop doesn't use Open Sans for Russian on your computer? If it doesn't, can you provide log.txt from %APPDATA%\Telegram Desktop?

@tarkungZZ
Copy link

After update this issue happen to me as well.

@7Vlad
Copy link

7Vlad commented Feb 7, 2023

You want to say tdesktop doesn't use Open Sans for Russian on your computer? If it doesn't, can you provide log.txt from %APPDATA%\Telegram Desktop?

[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAOpenSansRegular.ttf' loaded 'DAOpenSansRegular'
[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAVazirRegular.ttf' loaded 'DAVazirRegular'
[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAOpenSansRegularItalic.ttf' loaded 'DAOpenSansRegularItalic'
[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAVazirRegular.ttf' loaded 'DAVazirRegular'
[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAOpenSansSemiboldAsBold.ttf' loaded 'DAOpenSansSemibold'
[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAOpenSansSemiboldItalicAsBold.ttf' loaded 'DAOpenSansSemiboldItalic'
[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAOpenSansSemiboldAsBold.ttf' loaded 'DAOpenSansSemibold'
[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'
[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAOpenSansSemiboldItalicAsBold.ttf' loaded 'DAOpenSansSemiboldItalic'
[2023.02.07 11:34:22] Font: from ':/gui/fonts/DAVazirMediumAsBold.ttf' loaded 'DAVazirMedium'

@ilya-fedin
Copy link
Contributor

Can you provide the full log?

@7Vlad
Copy link

7Vlad commented Feb 7, 2023

Can you provide the full log?

I don't want to filter my "private" parts, but if you tell exactly what are you need, I can provide it

@Ai-Himmel
Copy link

Ai-Himmel commented Feb 7, 2023

The same issue for text in Chinese on the Simplified Chinese system.
Font for Chinese became SimSun.
A workaround provided by community is here
Save as something.reg file and run.
Users in other language can changed the alias font as you like.
IT WOULD WRITE SOMETHING TO YOUR REGITRY, USE AT YOUR OWN RISK

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"DAOpenSans"="Microsoft YaHei UI"
"DAOpenSansBold"="Microsoft YaHei UI Bold"
"DAOpenSansBoldItalic"="Microsoft YaHei"
"DAOpenSansRegular"="Microsoft YaHei"
"DAOpenSansRegularItalic"="Microsoft YaHei"
"DAOpenSansSemibold"="Microsoft YaHei"
"DAOpenSansSemiboldItalic"="Microsoft YaHei"
"DAVazir"="Microsoft YaHei"
"DAVazirBold"="Microsoft YaHei Bold"
"DAVazirMedium"="Microsoft YaHei Light"
"DAVazirRegular"="Microsoft YaHei"
;; Priority font resolving: "Cascadia Mono", "Consolas", "Liberation Mono", "Menlo", "Courier"
;; Override monospace font:
"Cascadia Mono"="Consolas"

@ilya-fedin
Copy link
Contributor

@7Vlad the log.txt has no private parts

@biaocy
Copy link

biaocy commented Feb 8, 2023

The same issue for text in Chinese on the Simplified Chinese system. Font for Chinese became SimSun. A workaround provided by community is here Save as something.reg file and run. Users in other language can changed the alias font as you like. IT WOULD WRITE SOMETHING TO YOUR REGITRY, USE AT YOUR OWN RISK

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes]
"DAOpenSans"="Microsoft YaHei UI"
"DAOpenSansBold"="Microsoft YaHei UI Bold"
"DAOpenSansBoldItalic"="Microsoft YaHei"
"DAOpenSansRegular"="Microsoft YaHei"
"DAOpenSansRegularItalic"="Microsoft YaHei"
"DAOpenSansSemibold"="Microsoft YaHei"
"DAOpenSansSemiboldItalic"="Microsoft YaHei"
"DAVazir"="Microsoft YaHei"
"DAVazirBold"="Microsoft YaHei Bold"
"DAVazirMedium"="Microsoft YaHei Light"
"DAVazirRegular"="Microsoft YaHei"
;; Priority font resolving: "Cascadia Mono", "Consolas", "Liberation Mono", "Menlo", "Courier"
;; Override monospace font:
"Cascadia Mono"="Consolas"

Fix Chinese font issue

@CurtisWong458
Copy link

Has the latest version 4.6.2 fixed this BUG?

@boypt
Copy link

boypt commented Feb 8, 2023

DAOpenSans

People ask if this reg file affects the system fonts. yes and no.

Yes, because the patch is applied to the Windows font replacement mechanism. But this patch is meant to replace those fonts that start with "DA", e.g. "DAOpenSans".

So the patch only affects Telegram for those fonts starting with "DA" are ALL of Telegram custom font, no other programs will be affected.

@7Vlad
Copy link

7Vlad commented Feb 8, 2023

@7Vlad the log.txt has no private parts

Of course, it has. Like full path to Telegram directory, full path to taskbar and ALL list of your applications pinned to taskbar, etc.
So, what exactly you need from my log?

@ilya-fedin
Copy link
Contributor

I believe it should contain more lines about fonts starting with "Fonts Info:" and "Font Error:" if the font failed to load

@7Vlad
Copy link

7Vlad commented Feb 8, 2023

I believe it should contain more lines about fonts starting with "Fonts Info:" and "Font Error:" if the font failed to load

This is what I assumed and therefore all the lines with the word "font"/fonts, I copied above

@itayganor
Copy link

Version 4.6.2 seems to fix the issue for Hebrew.

@likecyber
Copy link

Version 4.6.2 seems to fix the issue of Thai language for me as well.

Anyone who installs my quick fix can remove the fonts and update the Telegram Desktop app to 4.6.2 now.

@Artur2048
Copy link

Artur2048 commented Feb 9, 2023 via email

@BlackMercy
Copy link

I have been waiting for the fix so I stayed at 4.5.3 without updating to 4.6.0 when it was released. Now many people are confirming that 4.6.2 fixed the issue so I updated Telegram Desktop on my PC. I can also confirm that Thai font looks exactly the same as in 4.5.3.

Thanks dev team for fixing this quickly!

@iBug
Copy link

iBug commented Feb 9, 2023

I can confirm that the "workaround for Chinese fonts on English systems" is also working again, the same way as it used to in v4.5.3.

@nolykhemin
Copy link

nolykhemin commented Feb 9, 2023

Yes guys v4.6.2 seems to fix Thai font fallback problem for me (win 11)
This issue can be closed now

@7Vlad
Copy link

7Vlad commented Feb 9, 2023

I am still have a problem with fonts in 4.6.2. Also in "Settings", Interface Scale now have maximum only 100% and in 4.5.3 it was 300%. So maybe problem with fonts is "fixed", but what's going on with scale?
Screenshot_46
Screenshot_47

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 9, 2023

Can you provide the screenshot of broken font? For scaling issue provide logs in #25856

@7Vlad
Copy link

7Vlad commented Feb 9, 2023

Can you provide the screenshot of broken font?

As you can see on my screenshots (and this is not actual size, because github enlarge the image), first image(4.6.2) fonts is smaller than second(4.5.3). The size was the same on 4.6-4.6.1, but scale was "300%", now, in 4.6.2, it was "fixed", so its show 100% instead of 300%. The key for shortcut "-scale 125" didn't work at all.

@ilya-fedin
Copy link
Contributor

This doesn't seem to be related to fonts and this issue, it's interface scale

@7Vlad
Copy link

7Vlad commented Feb 9, 2023

This doesn't seem to be related to fonts and this issue, it's interface scale

So fonts issue was "fixed" with replacing maximum interface scale from 300% to 100%?
But, for me, as for user, nothing was changed, because interface/font still smaller than it was on 4.5.3., as you can see on my actual screenshots. It doesn't matter for me, how you called this issue, I am only want my font size/interface scale back.

@ilya-fedin
Copy link
Contributor

ilya-fedin commented Feb 9, 2023

@7Vlad no, you have a completely another issue, please discuss it in the respective ticket

@7Vlad
Copy link

7Vlad commented Feb 9, 2023

@7Vlad no, you have a completely another issue, please discuss it in the respective ticket

here #25856 ?

@ilya-fedin
Copy link
Contributor

yes

@icez icez closed this as completed Feb 9, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests