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

[BUG] Updating to v3.4.0 broke support for unicode fonts in Button text strings #3031

Closed
2 tasks done
themanjotsingh opened this issue Sep 12, 2024 · 8 comments
Closed
2 tasks done
Labels
BUG Something isn't working
Milestone

Comments

@themanjotsingh
Copy link

Is this a bug in companion itself or a module?

  • I believe this to be a bug in companion

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

On v3.3.1 and prior, unicode fonts rendered fine for button text as shown in image1.

image1

After updating to v3.4.0, they do not render properly as shown in image2.

image2

I have checked by exporting and importing to an older install to confirm that I am able to still see the text when viewing from older install. Same pc/browser, nothing else has changed.

Steps To Reproduce

No response

Expected Behavior

No response

Environment (please complete the following information)

- OS: Windows 11
- Browser: Firefox 130.0
- Companion Version: v3.3.1 -> v3.4.0

Additional context

No response

@themanjotsingh themanjotsingh added the BUG Something isn't working label Sep 12, 2024
@Julusian Julusian added this to the v3.4 milestone Sep 12, 2024
@Julusian
Copy link
Member

This is annoying to hear. But at least it's not doing what 3.3 did when encountering some unicode fonts which was to crash.
I'll take a look into this soon. Could you provide an example bit of text that doesn't work in a comment of this issue? That should make it easy to reproduce your exact issue and confirm when it is fixed (as other characters do work)

@themanjotsingh
Copy link
Author

Yes, true. Better than crashing. We'll write in English for now.

Here's a few examples of strings: ਤਖ਼ਤ, ਕੀਰਤਨ

Language is Panjabi/Punjabi, written in the Gurmukhi Script.

Thanks for your help!

@RabbitJun
Copy link

I also noticed that this doesn't work in Chinese v3.3.1 -> v3.4.0。'节目' has become □□

@jwetzell
Copy link

This break was introduced with this #2785.

@Julusian
Copy link
Member

What has happened is that the old canvas library would fallback to using system fonts for any characters not included in the font used by companion. But the new canvas library does not do that.

I don't remember if this was semi-intentional, because what it finds on the system varies depending on OS, which makes portability of configs inconsistent.

I've added the Gurmukhi and Simplified Chinese portions of the font we use, so the examples provided here now draw as expected.

If anyone has examples of another character set that is missing, open an issue and it can be added.

This is in the betas now, and will be in 3.4.1 soon

@github-project-automation github-project-automation bot moved this from Todo to Done in Companion Plan Sep 16, 2024
@scientastic
Copy link

I can't get Korean characters (한글) to show:

image

@Julusian
Copy link
Member

Julusian commented Oct 4, 2024

I have added the korean character set, which will be in the betas shortly and next release

@scientastic
Copy link

Thanks! Confirmed in 3.4.2 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
Status: Done
Development

No branches or pull requests

5 participants