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

fix #296190: Campania not rendering correctly on some macOS systems #5426

Merged
merged 1 commit into from
Oct 29, 2019

Conversation

MarcSabatella
Copy link
Contributor

Resolves: https://musescore.org/en/node/296190

The version of Campania we just updated to (2.008) works fine on Windows
but apparently fails on macOS, at least on some systems in some cases.
The version of Campania incldued here is still built from the same 2.008 sources,
but it turns off the "Apple" option within FontForge.
This causes tables to be written in Adobe format,
which appears to fix the problem.

If this cannot be verified to work, and I don't figure anything else out quickly enough, I will submit a new PR reverting Campania to the same binary as used in RC2. The code changes in #5390 should still be good to keep.

@dmitrio95 dmitrio95 added this to the MuseScore 3.3 milestone Oct 28, 2019
@mirabilos
Copy link
Contributor

If Campania has sources (*.sfd?), I would really like to see them.

@Jojo-Schmitz
Copy link
Contributor

Jojo-Schmitz commented Oct 28, 2019

@MarcSabatella MarcSabatella added the work in progress not finished work or not addressed review label Oct 28, 2019
@MarcSabatella
Copy link
Contributor Author

I have verified this works on macOS, but based on testing and discussion on Telegram, the consensus it will be best to regenerate the font again with the "Old-style kern" option enabled. So I will do this and update the PR.

@MarcSabatella
Copy link
Contributor Author

And yes, https://github.com/MarcSabatella/Campania is the official source for the font. I want the font to be available outside of MuseScore, and I want people not associated with the MuseScore project (and who have thus not signed the CLA) to be able to contribute to it. I also prefer not to have the source duplicated if at all possible - that is just asking for trouble with things getting out of sync. I'm open to other arrangements but this was the consensus when I first embarked on this project several months ago.

The version of Campania we just updated to (2.008) works fine on Windows
but apparently fails on macOS, at least on some systems in some cases.
The version of Campania incldued here is still built from the same basic sources,
but it turns off the "Apple" option within FontForge and turns on "Old-style kern".
This appears to fix the problem.
@MarcSabatella MarcSabatella removed the work in progress not finished work or not addressed review label Oct 28, 2019
@MarcSabatella
Copy link
Contributor Author

Updated, font version 2.009, still same source (changed name of a glyph to eliminate a warning) but with Apple disabled, Old-style kern enabled. The consensus is, this is the right way to do it. Will still be good for someone to test an actual release build with this - ideally, we'd merge to master and check the nightlies on each OS before merging to 3.3

@anatoly-os anatoly-os merged commit eefe09d into musescore:master Oct 29, 2019
@mirabilos
Copy link
Contributor

mirabilos commented Oct 29, 2019 via email

@MarcSabatella
Copy link
Contributor Author

What does it mean to "do releases of Campania"? I guess you mean the release tagging facility on GitHub itself? I see a "Create new release" button, I suppose that would be my starting point?

As for the question of installing the font system-wide versus bundling it, from what I understand it's a damned-if-you-do-damned-if-you-don't situation. In the past people have managed to shoot themselves in the foot on Linux by getting their mscore fonts out of sync with their MuseScore releases, which is bad. Also when people have a version of FreeSerif that doesn't support whatever it is we've added to it, which I think has happened too. So it's no small amount of trouble if the application doesn't get some control over the version of a font it uses, at least for fonts where the application itself relies on particular font features. But it's also bad when you can't just install an updated version of a font to use it with MuseScore, and right now this seems to be the case on Windows.

Anyhow, I don't know the technical or legal tradeoffs, so if you're happy with the problems that result from not bundling the font, that's fine with me. I just need to know what "do releases" means.

Oh, and feel free to tell me what you meant elsewhere about copyright and italics..

@mirabilos
Copy link
Contributor

mirabilos commented Oct 29, 2019 via email

@MarcSabatella
Copy link
Contributor Author

Thanks for the info! Here's what I take from all that:

  • I get that you need to distribute the source for any binaries, and that ideally there would be an automated way to generate the binary form the source. Feel free to write a script to generate OTF from SFD, I imagine it's just like the TTF script except I'm not really clear on the magic numbers (even after perusing the docs I'm not clear on which settings in the GUI "0x800" corresponds to, just that supposedly it makes Microsoft & Apple both happy. I can tell you I am using defaults except that I make sure OpenType and Old-style kern are both on (meaning Apple is off). I considered turning on the Round option but elected not to this time around as I didn't want to introduce another change. But the non-integral coordinates are inherent in the glyphs I started with (mostly from Doulos).

  • Packaging-wise, it sounds like we should do this like FreeSerif etc - don't compile in but instead install system-wide, for Debian anyhow, macOS has its own system so does Windows, and while someday we could revisit those I see no reason for this to be that day or for me to be the revisitor. If you end up making a different choice for Debian, though, I can't say that I care.

  • I need to make a "release" on GitHub so you can reliably grab from there. I'm on that, will let you know when I think I have something.

  • You are right that MuseScore doesn't rely on any particular aspects of Campania - we just assume it's a good choice that will render things the way you want if you type them the way you want

  • To be honest, I'm not totally up on how the split between MsueJazz and MuseJazz Text is managed, but chord symbols in the "Jazz" style (as per Format / Style / Chord Symbols) do rely on the specifics of what used to be MuseJazz and is now MuseJazz Text in that it won't look at all reaosnable with any other font. Not so much because of actual "code" (although there may be some small dependencies) but because of chords_jazz.xml.

  • I see the error from FontForge about copyright strings if I open the OTF file. I blame FontForge itself, because I don't see those errors when I open the SFD. The copyright strings in the SFD look perfectly normal to me, no idea how FontForge screwed that up when writing or reading the OTF.

@mirabilos
Copy link
Contributor

mirabilos commented Oct 29, 2019 via email

anatoly-os added a commit that referenced this pull request Oct 30, 2019
fix #296190: Campania not rendering correctly on some macOS systems
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants