bitfocus / companion

Bitfocus Companion enables the reasonably priced Elgato Streamdeck and other controllers to be a professional shotbox surface for an increasing amount of different presentation switchers, video playback software and broadcast equipment.
http://bitfocus.io/companion
Other
1.53k stars 499 forks source link

[BUG]Unicode characters in button text #2731

Open isaacclausen opened 7 months ago

isaacclausen commented 7 months ago

Is this a bug in companion itself or a module?

Is there an existing issue for this?

Describe the bug

In 3.2.0 on a Ventura iMac, unicode characters seem to mess up button text. When a unicode character is in the string, the line spacing is almost doubled.

Buttons with unicode characters in 3.1.2:

Screenshot 2024-02-02 at 9 53 09 AM

Buttons with unicode characters in 3.2.0:

Screenshot 2024-02-02 at 9 50 36 AM Screenshot 2024-02-02 at 9 51 35 AM

Steps To Reproduce

  1. Add unicode character to button text

Expected Behavior

Unicode characters display properly without added line spacing

Environment (please complete the following information)

- OS:Ventura
- Browser:Safari 16.4
- Companion Version:3.2.0

Additional context

No response

jswalden commented 7 months ago

FWIW on Sonoma with 3.2.0 and...some version of Safari, not sure which one (the computer is not immediately on hand for me to check), at least some emojis display for me:

unicode

(It's possible I should be quibbling about the baseline on that bomb emoji [tho it's equally possible the glyph baseline is buggy] -- or about the overflow behavior on the button display, versus the buttons displaying smaller -- but those would be separate issues.)

isaacclausen commented 6 months ago

Here a video showing the problem better, when I add a unicode character, it adds extra unnecessary line spacing: https://github.com/bitfocus/companion/assets/83613660/0854905f-ff2f-4b46-9c89-cb6a27834a84

dnmeid commented 6 months ago

Hi @isaacclausen I'm aware of this problem. Actually it is not a problem of unicode, but of the linespacing in the fonts we are using. The font we are using for the latin characters has a different spacing from the font we are using for the symbols. I have a solution with adjusted fonts here but didn't have the time to upload and test it.

Julusian commented 4 months ago

@dnmeid this appears to behave better in #2785 image