musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.35k stars 2.67k forks source link

Some fonts are not displayed #19252

Open ecstrema opened 1 year ago

ecstrema commented 1 year ago

Issue type

Engraving bug

Bug description

I have a (kind of weird) font, which is used by [this plugin] (https://github.com/ecstrema/saxophone-fingerings). People have been asking me to make it work in MS4, however, the problem is not the plugin, it's the font which doesn't render correctly.

In MS3, it rendered perfectly, but in MS4, it does not show anything.

Steps to reproduce

  1. Install the font
  2. Use it in MS4 (use a large font size (>60pt), and type "s123") Nothing is displayed

Screenshots/Screen recordings

In MS3 vs MS4:

image image

MuseScore Version

4

Regression

Yes, this used to work in MuseScore 3.x and now is broken

Operating system

Windows 10

Additional context

No response

LupusCaeruleus commented 1 year ago

(Just trying to add some information that might be relevant)

It seems that any character with a glyph width of zero cannot be displayed. For example, a single elision slur (U+035C, Combining Double Breve Below). Once deselected, these invisible texts will be difficult to edit again.

Also notice that the elision slur is invisible in the "Special Characters" panel, maybe it is because of the same issue?

https://github.com/musescore/MuseScore/assets/70313425/00692200-1261-4cb0-b8ae-7194c3235330

This can even corrupt the score.

https://github.com/musescore/MuseScore/assets/70313425/d61dda43-a3fb-435a-99c7-a977fad80ee7

waterenjoyer2 commented 10 months ago

Hello! I believe I've (somewhat) discovered a temporary workaround to this bug? I'm not sure if this is something that's been patched since this bug was made, but seeing as how the bug is still displayed in the "to do" list on 4.x shortcut (and quite far down on the list i might add), I believe it hasn't been looked at. Also, I don't normally report on bugs or really use github much at all so sorry if this comment is not up to standards.

So, as mentioned previously in the thread, the issue mostly revolves around invisible characters not displaying properly. However, I've discovered that using the Saxy font (downloadable here) in MS4, if you add a frame to the textbox it miraculously fixes the issue and displays propely. I've done some more experimenting to find that if you add any visible character before the chart with no space inbetween, then the chart also displays, but then you're stuck with an additional character that you can't get rid of. It's much easier to simply create a staff text box, type in the chart you want (as referenced here) let's say for example "s123 " (also of note is that you MUST add a space after your chart or it will not work), then select the whole thing and in the properties panel under text -> show more add a square or circular frame, set the padding to whatever you like (i've found that the default 0.2 is usually fine), set the thickness to 0, then change the font to Saxy and the text size to however you like it, and voilà you've done it!

Some additional notes I have are that the chart that displays once you get it working isn't identical to how it should behave according to the aforementioned guide, mainly with some of the side keys, but through some trial and error it's not too hard to figure it out. Usually the inputs are just swapped around. Also of note, the text frame not only allows the chart to display properly, but it expands the hitbox of the textbox to roughly the size of the chart. This is opposed to simply adding a character before the chart, which keeps the hitbox very small. If you'd like to increase or decrease the hitbox of the chart (especially if you have multiple that are close to each other) then simply increase the frame thickness back to 0.1 so you can see what you're doing, and adjust the frame padding as needed. I recommend choosing the square frame just to make things easier. Oh and by the way, when manually typing in a chart you can refer to the display in the bottom left corner of the screen so you can actually see what you're typing, that way you don't have to switch back and forth between fonts or just blindly guess.

Hope this helps! If anyone is having any issues recreating my workaround then I can attach some screenshots and a sample .mscz file (but obviously it's going to display at all on musescore if you don't have the font installed). Cheers!

TL;DR add a text frame

Jojo-Schmitz commented 10 months ago

Same (or at least similar) issue in 3.7.

At least with the 64-bit version for Windows (and probably the macOS version), but not with the 32-bit Windows version and neither with the Linux version. Which seems to hint at Qt being the culprit, 5.9.9 vs. 5.15.2

Jojo-Schmitz commented 6 months ago

Came up again in https://musescore.org/en/node/364327