[Windows] Exported PDF displays small symbols on Qt 5.4.0

• Dec 3, 2014 - 17:20
Type
Functional
Severity
S3 - Major
Status
closed
Project
Tags

Several of us tried Qt 5.4RC in the hope to see the fix for this issue #25759: pdf export gives strange results under Windows for font different from Emmentaler and discovered that the musical symbols are now all exported very small (4.33 times smaller on my windows 8.1)

I filed a bug to Qt : https://bugreports.qt-project.org/browse/QTBUG-43082


Comments

Title On Windows, with Qt 5.4RC, exporting PDF displays small symbols On Windows, with Qt 5.4.0, exporting PDF displays small symbols

True with Qt 5.4.0 too

@lasconic: mind to explain where/how to "multiplying the font size in ScoreFont::draw"?
I tried it like below, and the PDF looks OK with that, but on screen it became way too large then.

{syntaxhighlighter }
@@ -5190,6 +5192,9 @@ QPixmap ScoreFont::sym2pixmap(SymId id, qreal mag)

void ScoreFont::draw(const QString& s, QPainter* painter, qreal mag, const QPointF& pos) const
{
+#if defined(Q_OS_WIN) && (QT_VERSION >= QT_VERSION_CHECK(5,4,0))
+ mag *= 4.333;
+#endif
qreal imag = 1.0 / mag;
painter->scale(mag, mag);
painter->setFont(font());
{/syntaxhighlighter}

Title On Windows, with Qt 5.4.0, exporting PDF displays small symbols [Windows] Exported PDF displays small symbols on Qt 5.4.0

I don't really understand how all this works, but I do see that we use QFont::setPixelSize() a lot, where the Qt documentation suggests we'd be better off using setPointSize() for "device independence". No idea if that has anything to do with this.

Status (old) patch (ready to commit) fixed

Marking it fixed, as the PR got merged, even if there are a few remaining issues with wiggly lines.
But the issue with the too small symbols is fixed and the rest will probably be fixed when Qt-5.4.1 shows up.

Status (old) active fixed

Let's mark this one fixed, as it is fixed in Qt-5.4.0, and the builds for Windows have switch to using that.
Also we can't do anything else about it anyway ;-)

Status (old) fixed active

sorry, wrong, it'll be fixed in Qt-5.4.1, the workaround for 5.4.0 doesn't seem to work always and everywhere (some yet unexplored difference between self build vs. nightly build).

Another workaround is to 'print' to a PDF printer like PDFCreator (Adobe Acrobat Pro does not work).

Because it is not really a nightly build, but built by schepers, isn't it? If I build it myself, it works too.
This is another indication that there is something wrong with the setup of the server doing the nightlies...

Or am I wrong and the nightly build server has been fixed? If so we can mark this issue as fixed...

No, it is not the a custom nightly build by schepers (which I had downloaded previously). I downloaded there is few minutes on the usual page of musescore.org. as you can see.

download.jpg
The versions are different (well, I think and hope), for example, by the presence of the "special" file. None "special" file (or I do not see it?) in the version of schepers.

Version by schepers:
schepers version.jpg
Version on musescore.org:
musescore org version.jpg
Another example (with the version on musescore.org, I verified...!)

another example.jpg

Attachment Size
another example.jpg 37.79 KB
download.jpg 16.21 KB
schepers version.jpg 17.08 KB
musescore org version.jpg 16.71 KB
Status (old) needs info fixed

There is a fix in the code, specialy for Qt 5.4.0 and that only. For some reason it didn't work in the nightlies, but does now, so the problem apparently is gone and can no longer be reproduced. So unless it crops up again, this issue is fixed...

Well, if you say so. But I think you really get rid of this case quickly. This leaves me cirsconspect when you say, "For some reason it did not work in the nightlies, but does now" .

Personally, I would be really curious to find out what happened? History to have the extra peace of mind ...

EDIT: it works also under Windows8 and whether with Emmentaler or Bravura.
Christmas before the time...?!

OK, mystery solved: due to a config problem this was the first version that really used Qt-5.4.0 on the nightly build server, so the first to really execute tie workaround code.