[MacOS X] Export Pdf with Muse Jazz Text all garbled and unreadable if no printers are setup on a machine
Reported version
3.0
Priority
P0 - Critical
Type
Functional
Frequency
Many
Severity
S2 - Critical
Reproducibility
Always
Status
closed
Regression
No
Workaround
Yes
Project
When exporting a .pdf file using Muse Jazz Text Font the .pdf is garbage.
Attachment | Size |
---|---|
Dragonbird_Hummingfly_Waltz.pdf | 40.73 KB |
Looking_Out_a_Window.pdf | 44.35 KB |
Fix version
3.3.3
Comments
sample score please
Hi,
I cannot reproduce this issue on OS: Windows 10 (10.0), Arch.: x86_64, MuseScore version (64-bit): 3.0.0.4253, revision: 082e635
Exporting to pdf with MuseJazz font looks fine (see attachment).
It is not working for me. I have an iMac. High Sierra. I even tried to re-download and recreate everything a second time, and was met with the same problem.
Which version? Latest beta?
Works for me. You don't by chance have an incompatible font with the same name installed on your system? Like maybe you at some piint downloaded and installed the MuseJazz font used in 2.x, which didn't support notation? This font should not be installed at all; MuseScore needs to be able to access its own version.
I could also believe there being an issue with Qt 5.12 which would explain why this seems macOS-specific. Could some other mac user verify the results of PDF export using "Looking"?
In reply to Works for me. You don't by… by Marc Sabatella
MacBook Pro 10.14.1, latest MuseScore 3 Beta (Dec 7), Jazz Text, pdf and mscz attached. Export to pdf results in strange music notes and symbols. On Windows and Linux pdf exports fine, not so on Mac.
Same question - do you by chance have a font called MuseJazz installed on your computer? remove it if so and try again.
In reply to Same question - do you by… by Marc Sabatella
There is no font called MuseJazz or MuseJazz Text installed anywhere on this MacBook. Similarly, the Bravura, Emmentaler and Gonville fonts are also not installed. I'm guessing the MuseJazz fonts, as well as the other music fonts, are within the MuseScore Beta dmg
Latest MuseScore 3 beta (Dec. 14), MacBook Pro, macOS Mojave 10.14.1. Style: musical symbols font is MuseJazz, musical text font is MuseJazz Extended. No fonts with these names are installed anywhere on this MacBook (looked everywhere using FontBook and searched using Finder).
Pdf exported from Musescore creates the strange musical symbols. Using the Print>SaveAsPdf function on the Mac the musical symbols had the desired MuseJazz look, as expected. Score, exported pdf and printed pdf files attached.
Correction: musical text font is "MuseJazz Text".
I can't reproduce in d7232a8449 self built on Mac 10.13.4 with Qt 5.9.7.
FWIW, I tried to reproduce with Qt 5.12, just in case, and the PDF are not readable by Preview (using MuseJazz or not...)
I can reproduce in Beta (OS: macOS 10.14, Arch.: x86_64, MuseScore version (64-bit): 3.0.0.19874, revision: 59a11cd). The pdfPrinter replaces note symbols with some text symbols somehow. I'll take a look.
Also, this is reproducible with MuseJazz font only.
Also, I cannot reproduce the case when creating new score from scratch using MuseJazz font. Copy-pasting elements from the attached (LookingOutWindow-3.mscz) score to the new score also doesn't produce incorrect results.
Fixed in branch master, commit 40a27b9cd7
fix #279563: Export Pdf with Muse Jazz Text all garbled and unreadable
Replace QPdfWriter with QPrinter, the last is more configurable and aligned with Print functionality.
The pearl of the fix is setting output format to QPrinter::NativeFormat. I'm not sure, but I believe this is a bug in output format processing introduced in Qt 5.12.
New interface requires creating temp file when processing JSON generation. So, I extracted a method which deals with the exporting pdf as a json routine.
In reply to Git webhook message by Git Message
Cool!! I checked out your fix on GitHub. Nice. This wasn't an 'easy' one. Good job!
Automatically closed -- issue fixed for 2 weeks with no activity.
In reply to Git webhook message by Git Message
What patch/release version of MuseScore will this fix appear in? I just installed MuseScore 3.0.2.20666 and the problem still exists.
OS: macOS High Sierra (10.13), Arch.: x86_64, MuseScore version (64-bit): 3.0.2.20666, revision: 8ca4d2c
Thanks!
Check #283560: [MacOS Mojave 10.14.2] Export Pdf with Muse Jazz Text all garbled and unreadable
I swear I fixed it. What is going on? O_O
UPD: and it works for me in MuseScore 3.0.2.
In reply to I swear I fixed it. What is… by Anatoly-os
I'm having the same problem with MuseScore 3.0.5.21343, revision 58dd23d. What's weird for me is that it doesn't do it on a PDF export of the score, and it doesn't do it on the PDF export of individual parts, but it does do it on the combined Score_and_Parts file.
The Musejazz output to pdf is not garbled on Windows system. However, the note beams are merged into a solid beam (https://musescore.org/en/node/288877).
I just got a new MacBook and installed Musescore 3.2. I created a new score, and the PDF parts it generates are all garbled (see attached). On my previous MacBook, the individual parts would be fine, but the "Score of the "Score and Parts" would always be garbled too.
OS: macOS Mojave (10.14), Arch.: x86_64, MuseScore version (64-bit): 3.2.0.22758, revision: 8594c8c
So you stumbled across #283560: [MacOS Mojave 10.14.2] Export Pdf with Muse Jazz Text all garbled and unreadable
In reply to So you stumbled acros … by Jojo-Schmitz
Looks like unfortunately yes. This is still an issue with the newly released version too:
OS: macOS Mojave (10.14), Arch.: x86_64, MuseScore version (64-bit): 3.2.2.22888, revision: c893c61
In reply to Look like unfortunately yes… by bpclub
Could you please check whether the issue exists on your machine with the package compatible with macosx 10.10/10.11 (available on downloading page)?
@Anatoly-os I exported the parts with the version of Musescore compatible with macosx 10.10/10.11 and saw the same garbled text as I do with the "normal" Musescore.
Yeah! I finally reproduced the case on my machine. Only the *Score_and_parts.pdf is exported incorrectly, all parts and score are exported correctly on my machine.
Fixed in branch master, commit 9bdd6ca580
_fix #279563: Score_And_Parts pdfs are garbled when using MuzeJazz font
Replace pdfWriter with QPrinter
Refactoring of the savePdf methods is needed to avoid code duplication_
In reply to Yeah! I finally reproduced… by Anatoly-os
@Anatoly-os Oh, great news that you were able to reproduce the issue, and also that you already pushed a fix!
On my old MacBook, I saw the same behavior you described: The Score_and_Parts was garbled, but the individual parts were fine. On my new MacBook everything is garbled. I'm not sure why the behavior is different there... Hopefully your patch fixes all of it! Thanks again!
Hi,
I read this post but I can't understand what to do to solve my problem. Do I have to change program routines? If yes, where? Where can I find the file to edit? How to open it?
When I convert to PDF the file is corrupted: this happens only with the use of the MuseJazz font.
My installed version is 3.2.3 (the latest).
My system is MacBook Mojave 10.14.5
In addition, the Print ... function is also disabled!!! :(((
Thank you all for your help!
I have installed version 3.2.3, but the problem remains! Can you give me some help or some advice?
Thanks for all
I tested out the new version of Musescore (version info below) and my PDFs are still garbled when using MuseJazz.
Elaborating, when exporting PDFs both the individual parts and the score-and-parts PDFs are all garbled. If I use a different font then all the issues are resolved. I wonder what's different about my system where I still see this issue... @Anatoly-os, if you have any thoughts or would like me to test anything out, please let me know.
Thanks!
OS: macOS 10.14, Arch.: x86_64, MuseScore version (64-bit): 3.2.3.22971, revision: d2d863f
In reply to I tested out the new version… by bpclub
Hey! Do you have any printers installed on your macOS?
In reply to I tested out the new version… by bpclub
Are you able to print the score via the real printer to see the result on paper?
In reply to Are you able to print the… by Anatoly-os
Unfortunately I don't have a real printer (I export to PDFs then take those to a store to get printed). And also no printers are installed on my MacBook.
I can print the garbled PDFs and see what happens though. Would that be helpful, or is it just the print-straight-to-a-real-printer case that is helpful?
In reply to Unfortunately I don't have a… by bpclub
No, there is no need to print garbled PDF file :) I think the absence of a real printer is a key to the complete solution of the issue. I'll experiment within a week and come back to you once I have more information.
UPD: I mean, the absence of a real printer in the printer settings on macOS, not a real device :)
Automatically closed -- issue fixed for 2 weeks with no activity.
I'm having this same exact problem. I get all this gibberish on my charts. I'm attaching a sample.
I was right, lol. The bug is reproduced if there are no printers set up in the system. Digging into the code base...
Temporary workaround is to remove all MuseJazz Text entries from the score. I'm close to the solution :)
In reply to I was right, lol. The bug is… by Anatoly-os
Wow, strange! Thank you for taking the time to investigate this!
Came up again in #292208: PDF export bug
I have the same problem exporting PDF files. I have OS Mojave 10.14.6 on a MacPro 15''
is there any solution?
None yet, that's why it is still in an active state
One possible workaround certainly is to upload the score to musescore.com (preferably via File > Save online) and then download the PDF from there.
In reply to Same question - do you by… by Marc Sabatella
Hi , i checked out the book don't, no font named around muse or jazz found
pardon?
In reply to Hi , i checked out the book… by cantocoach
@cantocoach the musejazz font is not installed (and so not visible in the fontbook), it is implemented directly in musescore.
When there are no printers in the printer preferences, if a MuseJazzText character is drawn before a MuseJazz character, then the latter is corrupted, and viceversa. In the previous examples, a MuseJazzText is used for the measure numbers and thus drawn before the MuseJazz elements of the scores.
I managed to isolate the problem in a simple Qt example program, in attachment. To view it, simply open the .pro file in QtCreator and build and run it from within QtCreator.
In the example file, when there are no printers in the printer preferences, if the MuseJazz string contains characters from unicode 0000 to unicode 9FCF, then the following MuseJazzText string is not corrupted. If it contains even one character with unicode code larger or equal to 9FD0 (such as all the musical symbols and notes used in a score), then the MuseJazzText string is corrupted.
Similarly, if the painting order of the strings is reversed (i.e. MuseJazzText first and MuseJazz second), if the MuseJazz string contains characters from unicode 0000 to unicode 9FCF, then it is not corrupted. If it contains characters with unicode code larger or equal to 9FD0 (such as all the musical symbols and notes used in the score), then such characters get corrupted (and the MuseJazzText is not corrupted in both cases, if drawn first).
I don't know if it is a Qt bug, or a MuseJazz/MuseJazzText bug (or most probably a combination of both).
In reply to When there are no printers… by ABL
Thanks for the thorough research! I thought the culprit is the MuseJazz font format. I opened all our fonts in the font reader software. MuseJazz font had different type of encoding (or something like that, I didn't get the difference).
This is pretty amazing info! I wonder if somehow the fonts are overlapping? Like, even though their main names differ, some sort of metadata causes them to be mistaken for each other? There are a whole bunch of different names that can be set in FontForgeand MuseJazz Text used to be just called MuseJazz. Maybe we missed some metadata when we renamed it. Just browsing through the dialog, I see a field under "TTF Names" called "Compatible Full" that is set to MuseJazz. Maybe that is somehow fooling some systems into thinking it can substitute one for the other, which of course is not true?
See also https://musescore.org/en/node/277756#comment-868485, the comments about the "Reserved name" conflcit.
See https://github.com/musescore/MuseScore/pull/5497
See:
https://github.com/musescore/MuseScore/pull/5497
After some modification attempts with FontForge, I found that the font I managed to create was no more displaying the bug. So I used ttx to isolate the changes and verified one by one which was the one solving the bug.
Apparently, the simple modification of the UniqueID field in the TTF names tab was able to solve this bug, from this:
to this:
I then re-exported the font with these options:
In my system this solves the problem, but I think additional tests on other Macs displaying the problem are needed.
Edit: Jojo-Schmitz is always the fastest :-)
So better something to get into 3.4 rather than 3.3.3 I guess?
Well, I modified only that single line, so the font should be 100% equal to the old one.
Every other (possible) modification would come from FontForge export routines. In principle, the substitution should be harmless.
I was only not 100% sure the bug is really solved for everyone.
P.S: By the way, FontForge highlights problems in the font, such as a wrong negative number in a positive-only field for one of the glyphs (the umlaut, I think).
should be harmless sounds like "famous last words " ;-)
This is great! Makes me want to get the kerning info back too (see #277756: No kerning for MuseJazzText font due to lost SFD file). Although I don't understand all the legalities surrounding what constitutes "source" for a font if I end up actually generating an SFD from the OTF.
Fixed in branch master, commit 48c2ef9a9a
fix #279563 : MacOS X - Export pdf with MuseJazz Text all garbled and unreadable if no printers are setup on a machine
Fixed in branch master, commit ad9e973066
_Merge pull request #5497 from AntonioBL/musejazzfont
fix #279563 : MacOS X - Export pdf with MuseJazz Text all garbled and…_
Automatically closed -- issue fixed for 2 weeks with no activity.