LaTeX forum ⇒ XeTeXXeLaTeX, Sorts Mill Goudy and Adobe PDF Software=sadness

Information and discussion about XeTeX, an alternative for pdfTeX based on e-Tex
User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

XeLaTeX, Sorts Mill Goudy and Adobe PDF Software=sadness

Postby frabjous » Sat Dec 05, 2009 7:47 pm

I'm having the following problem, but I don't know whether the problem is with XeLaTeX, with the font I'm using, or with Adobe PDF software.

The font in question is Sorts Mill Goudy (2.1; .odt version), which is an open source project font, freely available with an MIT license. You can download it here: http://sortsmill.googlecode.com. It's a lovely font, a near-clone of Goudy OldStyle.

Here's a minimal file for testing (test.tex):
  1. \documentclass[12pt]{article}
  2. \usepackage{lipsum}
  3. \usepackage{fontspec}
  4. \defaultfontfeatures{Mapping=tex-text}
  5. \usepackage{xunicode}
  6. \usepackage{xltxtra}
  7.  
  8. \setmainfont{Sorts Mill Goudy}
  9. \begin{document}
  10. \lipsum[1]
  11. \end{document}


Unfortunately, however, when I use it with XeLaTeX, I have problems with the resulting PDF. The result seems perfectly fine when viewed inside TeXworks, or any other poppler-based PDF viewer (e.g., evince for Linux), and also seems fine using PDF X-Change Viewer for Windows, it does not display properly using Adobe PDF software. (I've checked both Acrobat Reader for linux, and Adobe Digital Editions for Windows.)

Here's a comparison of the difference. Under Evince:

test-evince.png
test-evince.png (41.7 KiB) Viewed 4617 times


But in Acrobat Reader, it looks like this:

test-adobe.png
test-adobe.png (146.93 KiB) Viewed 4617 times


Another funny thing is that if I use evince to "Print to File" (using cairo 1.8.8), the PDF that results for that works fine in both evince and Acrobat Reader -- I would just settle for that, but it means I can't make use of internal hyperlinks or metadata from the hyperref package.

Obviously, the font is unuseable in XeLaTeX if it can't be used with Adobe viewers, since they are by far the most common.

Again, I don't know if the problem is with the font, with XeLaTeX, or with Adobe's PDF viewing algorithms. Since it works fine in other viewers, it seems like the problem must be Adobe's, but then again, I don't have this problem with other fonts. If anyone had any insights, that would be great.

I'm attaching the resulting PDF.

(Most of the above applies to XeTeX 3.1415926-2.2-0.9995.2 (TeX Live 2009) running Ubuntu 9.10 Karmic --though I've also been doing some testing on Windows 7.)
Attachments
test.pdf
(9.21 KiB) Downloaded 246 times

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Postby frabjous » Sat Dec 05, 2009 7:50 pm

Here's the working PDF generated inside evince using Print-to-file and cairo 1.8.8 for comparison.
Attachments
print-to-file-output.pdf
(11.37 KiB) Downloaded 266 times

User avatar
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Postby meho_r » Sun Dec 06, 2009 2:08 am

First, thank you for mentioning the font, I like it very much.

You may check out "Issues" section on that page, that behaviour with Adobe Reader and XeLaTeX is reported and there was a response. Hope it will get fixed soon.

User avatar
frabjous
Posts: 2064
Joined: Fri Mar 06, 2009 12:20 am

Postby frabjous » Sun Dec 06, 2009 3:01 am

meho_r wrote:First, thank you for mentioning the font, I like it very much.


It's beautiful isn't it? It's just a shame it's missing a true bold, at the moment.

meho_r wrote:You may check out "Issues" section on that page, that behaviour with Adobe Reader and XeLaTeX is reported and there was a response. Hope it will get fixed soon.


Yes, that's me, reporting the same issue!

Just in case others are curious, he's the author's response:

Yeah, luatex would do the same thing, though maybe it has been fixed. They thought it was due to a bug in acroread, but my opinion was that they may have misinterpreted the PDF spec and embedded the font incorrectly. With my own stuff (http://kompostilo.googlecode.com) the fonts work fine.

It's because I used as a basic unit of measurement 1/2048 of an em, which is allowed and which I found convenient. The usual unit for "PostScript-flavored" fonts is 1/1000 of an em, although 1/2048 may also occur if the font was designed primarily for TrueType. Meanwhile, in the PDF spec, in some places you are supposed to use 1/1000 units no matter what, and where you are supposed to leave it in the actual units, they don't say so, and thus programmers assume the 1/1000 units there also, I believe incorrectly. So some numbers are off by a factor of 2.048.

The good news is that I decided to convert the fonts to 1/1000, and I'm about halfway through, but have been working mostly on other things (related to kompostilo, mentioned above). The main reason for the re-scaling is that I noticed even acroread 9 has minor troubles with 1/2048 and the select tool, even though both
PDF and PostScript-flavored fonts are their own designs. I was thinking of finishing the new fonts soon.



He's already finished updating the roman font--you can find it at the site meho linked to. He just needs to rework the italic. (Though it sounds like XeTeX could also be reworked to avoid the problem as well.)

Readers of this forum may also be interested in that kompostilo typesetting project he mentions, since it's a fork of TeX designed for artsy-type projects.

User avatar
meho_r
Posts: 823
Joined: Tue Aug 07, 2007 5:28 pm

Postby meho_r » Sun Dec 06, 2009 6:05 am

frabjous wrote:
It's beautiful isn't it? It's just a shame it's missing a true bold, at the moment.

Yes, it is very beautiful. I hope it gets a true bold soon since without it the use of the font is rather limited.


Return to “XeTeX”

Who is online

Users browsing this forum: No registered users and 2 guests