Bug: Trouble with FOP embedding of Standard Windows fonts on MacOS
Background: This bug (re)occurred when I upgraded from XMLmind XML
editor version 8.2.0 to 8.2.1. (Thus it is the same issue as before,
I
assume - the only difference being - hopefully - better
documentation.)
Steps to reproduce the bug:
This happened when I upgraded from 8.2 to 8.2.1. I have tried to
replicate the bug - after the upgrade - by trying to perform a
"re-upgrade" from 8.2 to 8.2.1. However, I have not been able to
produce
the same result after it first occurred. Probably there is some
detail I
am missing ...
The best I can offer is a description of when it happened and what
happened and how I solved the problem:
1.
I started with XMLmind XML editor version 8.2.0 where everything
was
working nicely (caveat: I refer to previous message to this list
where I described the trouble I had actually getting it to work
nicely)
* By working nicely, I mean that, when in the FOP addon
settings,
the standard Windows fonts were set to be embedded, those
fonts
actually did get embedded so that there were no problems
generating PDFs containing the characters of the standard
Windows fonts.
2.
Then I upgraded to version 8.2.1, like so:
1. Renamed the old copy of from XMLmind.app to XMLmind820.app.
(This is something I almost always do when upgrading - I
rename
the old version.)
2. Installed the the new version as XMLmind.app the normal way
(by
dragging the XMLmind.app from the expanded .dmg file which I
had
fetched from http://www.xmlmind.com/store/download.php)
3. On first run of the new version, I was asked whether I wanted
to
upgrade all outdated addons. I replied "Yes" to let XMLmind
XML
editor take care of updating the addons for me.
4. Then I performed some localization work for the new version.
During that work, I used the feature to 'Build and test addon
to
test' the localizations.
3.
Then I opened a multilingual XHTML test document I already had
made
4.
I then ran the Convert document to PDF macro.
5.
Results:
1. Except the Windows 1251 characters, the non-English
characters
were displayed as "###" in the resulting PDF. However, this
seemed to happen specifically for text which used the
"default"
(read: unspecified) font (which would then default to Serif).
While for text inside the XHTML <code/> element, everything
seemingly worked fine.
* At this point I opened the FOP addon settings and
verified
that it was set to embed all standard Windows fonts.
2. Then I edited the test file by adding style attributes to
tell
where to use serif, vs sans-serif, vs monospace. (In the
original test, I relied on the default styling of elements.)
I
saved the edited file to a new location.
* Result: Now, instead of "###", I got the real characters
-
as it should be.
3. Then I opened the original document (where I did not use CSS)
once more.
* Result: Once again, I received erroneous PDF output.
4. Then I saved the original file to another location.
* Result: Voila! The erroneous PDF output was gone!
Everything
was fine.
5. Then I saved the file on its original location.
* Result: Once more, the PDF output was perfect. Everything
was fine.
Specific to my situation and my Mac is that I typically use two
different user accounts. The above happened to the account from which
I
send this message. I did suspect that I would see these errors also
in
my other user account. However, that actually did not occur - I do
not
know if the reason it did not occur is related to the fact htat I
made
it work from this user account first.
Why is this issue problematic? Well, because I had already set up the
FOP settings to include the Standard Windows fonts, I was not
expecting
the trouble that I saw on the first conversions I performed. Also,
there
is no clear workaround either - even if treating it as some kind of
caching issue seem to help. Based on my previous experience of this
bug,
it seems like the issue does not go away unless you do something
specific in order to affect the affected cache. E.g. to perform lots
of
PDF conversions does not, according to my previous experience, seem
to help.
Hope this info was useful.