From mboxrd@z Thu Jan 1 00:00:00 1970 From: Erik Iverson Subject: Re: a bit offtopic, fonts in exported PDF documents Date: Thu, 26 Aug 2010 16:14:22 -0500 Message-ID: <4C76D92E.1060308@ccbr.umn.edu> References: <4C76A590.9050800@ccbr.umn.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=38610 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OojmJ-0008NF-CT for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 17:14:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OojmE-0004TW-07 for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 17:14:31 -0400 Received: from walleye.ccbr.umn.edu ([128.101.116.11]:1372) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OojmD-0004TR-No for emacs-orgmode@gnu.org; Thu, 26 Aug 2010 17:14:25 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: emacs-orgmode John, Thank you for your reply. For those that don't want to read all that follows, please note my conclusion, given here: Since orgmode is automatically telling latex to use T1 encoding, perhaps we should somewhere document to the user that Type 1 fonts should be available to get the best looking PDF possible. Otherwise, type 3 fonts will be substituted. I got suitable Type-1 fonts by installing the texlive-fonts-extra package under Ubuntu. (Of course, that could already be documented somewhere :) ) All of this explained very succinctly right here: http://www.latex-community.org/forum/viewtopic.php?f=5&t=571 > Here, for example, are the > various texlive packages I can pick > from: http://wiki.archlinux.org/index.php/TeX_Live#Group_texlive-most > > Not saying one of those would fix the problem, but I wonder if you could > verify you have the fontsextra package? Just an idea? It was a great idea. It was what was wrong. :) Under Ubuntu, I simply install texlive-fonts-extra, and it works. Of course, I was a bit more curious as to exactly *what* and *why* things were behaving as they were, so here is a summary for those who may see the same issue. Caveat: I don't know much about font issues, so the following is a bit imprecise and possibly even plain wrong :). By including [T1]{fontenc}, we are telling LaTeX to use so called T1 font encoding. Simple enough. However, the original Computer Modern fonts were not designed with this encoding in mind. There have been Type 1 replacements made and can be found in the Cm-super package. This is part of what texlive-fonts-extra installs, but was not available on either of the systems I tested on, one Ubuntu, one Fedora. Not having these font packages, I set out to determine which fonts were being used in the PDF depending on what encodings we use. The best way I have of checking what's going on is making a PDF, and then opening it up in Evince or acroread, and looking at 'fonts' tab under the document properties. As things were, i.e.: before installing texlive-fonts-extra, and while including T1 font encoding, things looked quite bad under Evince. Looking at the fonts included in the PDF showed why. Instead of the list of computer modern fonts I get when I don't include the T1 encoding, I got a list of "Type 3" fonts with "No Name" in evince and names like "F16, F20, ..." in acrobat. Why these looked "ok" under acrobat is not understood by me, but they certainly looked poor under evince. I could 'fix' this many ways, including removing the lines referencing T1 encoding from the .tex file, or changing fontenc to OT1 instead of T1, essentially the same fix. This allowed the good old computer modern fonts to be included in the PDF, and all was well. But I wanted to know why T1 encoding wasn't working. After installing texlive-fonts-extra, I now have the "cm-super" package. These fonts now are used when I specify the T1 encoding. (I think!) Now, my list of fonts under evince looks like "sfrm1200" for example. No more Type 3 fonts, they are all Type 1. This all seems to be explained in Chapter 7 of The LaTeX Companion, section 7.5. I would be interested in what the names of the fonts embedded in PDF documents from other users are? Are you all using these "cm-super" fonts? Alternatively, I was also able to get nice fonts by using the Modern Latin package, \usepackage{lmodern} with T1 encoding specified. The upshot is: If you're using an OS with a package manager, it might pay to do a "texlive-full" type install, instead of just doing the bits and pieces of latex packages as I've been doing! Unfortunately, I think with at least Ubuntu, that's not the default, so many users may be having the same issue as I am, without even realizing it. Hope this helps, --Erik > > On Thu, Aug 26, 2010 at 12:34 PM, Erik Iverson > wrote: > > Hello, > > I'm wondering if anyone can > > 1) reproduce what I'm seeing > 2) help in understanding what's going on. > > If I export an Org file to LaTeX, the resulting > .tex file contains the following in its header: > > \usepackage[T1]{fontenc} > \usepackage{t1enc} > > Long story short: > > The resulting .PDF file from pdflatex looks quite > bad in evince, and quite good in Acroread. By "quite bad", > I mean the fonts are practically illegible, very thin > and wiry. > > If I comment out *both* of those package requirements, > recompile the PDF, the resulting PDF looks great in all > viewers I can find. > > The Fonts specified in the Properties of the document > change when I use those packages versus not use them. > > However, the packages are the default for good reason I'm sure, > but C-c C-e d fires up Evince on my system, so the default > is not very pleasant. > > I realize this isn't org-mode question per se, but can > anyone else replicate this, and do you know what's happening? > It seems like a potential problem with Evince specifically, since > Acroread seems to handle the resulting PDF just fine. > > Finally, does anyone know why the t1enc package is required, the > only thing I read about it was the following: > > http://www.tex.ac.uk/cgi-bin/texfaq2html?label=t1enc > > Thanks! > Erik > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > >