I do not have a good understanding of what embedding fonts in my pdf document does.

I have written a 550+ page textbook using LaTeX. It is a computer science book so has lots of code listings, vector drawings, and math. I explored converting it to epub, but that just will not work. So I have produced a pdf version for ereaders -- 0.1" margins all around, syntax coloring for code listings, and hyperlinked cross references. I also have a version suitable for printing -- wider margins, black and white, binding gutter for double-sided printing. I set the margins such that the pagination is the same beween the two versions.

The vast majority of students get only the ereader version, so I want a font that favors screen reading. I'm thinking of using Lucida. My concern is whether this font will work on all ereading devices. Am I okay if I embed the fonts in my pdf file? I know it might sound odd that a computer scientist does not understand exactly what embedding fonts does, but despite my years of study, I still have lots to learn.

Edit: I just learned that Lucida is not free, so I will use another font. But my question still holds.

Font embedding is an essential feature of PDF, any PDF reader that doesn't support embedded fonts is seriously broken. So yes, you can assume that all ebook readers will display the embedded fonts. Even all ligatures and kerning created by LaTeX will be displayed, as they are "hard-coded" in the PDF (the case is different with ePub, where it is the reading software that must apply these typographic features, and often does not).

Perhaps you want to create a black-and-white ereader version, given that most ebook readers have black-and-white screens (not every ebook reader is an iPad, you know).

As for the font, Lucida is not free, but if you bought a license you can embed it in PDFs, that shouldn't be a concern. If you don't have a license, maybe the kpfonts package suits your needs.

Embedding a font means that the font is included in the document. If it helps, think of "embedded" as "in the same bed".

Word documents are a good example. If you type something in, say, Reminder Pro (or some other obscure font), and send it to someone who (most likely) doesn't have that font, Word will have to substitute it with something else. But some e-readers may not be that smart - especially the cheap ones - and the text may show up as blank; selectable and searchable text, but blank.

If you have Adobe Reader installed, open the PDF and go to File - Properties - Fonts. Fonts are usually embedded as subsets, meaning that they only contain the characters that were used in the document instead of the whole font. This can shave off a few dozen KB or so, depending on the document's content and the number of glyphs in the actual font.

...Even all ligatures and kerning created by LaTeX will be displayed, as they are "hard-coded" in the PDF (the case is different with ePub, where it is the reading software that must apply these typographic features, and often does not).

This reminds me of a student finding several dozen misspellings in my book. Most of them were two words that had been run together. When I looked at the pdf file, in each instance there was clearly a space between the words. Turns out that he had copy and pasted the text into a Word document, and the spaces put there by LaTeX were too small for Word to recognize as spaces.

Quote:

Perhaps you want to create a black-and-white ereader version, given that most ebook readers have black-and-white screens (not every ebook reader is an iPad, you know).

Excellent point. One of my goals is to make the book as widely accessible as possible.

Quote:

As for the font, Lucida is not free, but if you bought a license you can embed it in PDFs, that shouldn't be a concern. If you don't have a license, maybe the kpfonts package suits your needs.

Yes, after posting I discovered that lucida is not free. Another goal is to keep the cost of the book down, plus this will be low volume. I will check out kpfonts.

I actually did search, but I did not do a very good job of it. In fact your admontion here helped me to learn something new about searching -- the "+" is a logical AND between the words. I feel really stupid for not realizing this years ago. I have a whole chapter in my book about Boolean algebra, logic operations, etc., and I somehow did not connect this to searching.

File size and file editing by recipient are two things you need to consider. No font embedding means Smallest file size recipient needs to have same fonts installed, Subset font embedding mean Smaller file size and recipient doesn't need the same font to view but does need the same font installed in order to edit the file. Full font embedding means Larger file size the recipient doesn't need the same font to view or edit the file.esl3-bk

Unlike a format like ePub a PDF document attempts not only to display the text but to preserve the look and exact placement of the information on the page. If the exact same font is not used then the display will not be exact. There is wide variation in the size and shape of letters in various fonts which will effect the look of the document and could, in fact, cause words to overlap. Thus it is important that the user have the same fonts as the original. The only way to guarantee this is to embed the fonts. Anything else leaves it to chance although certain fonts are so common that it is not a problem that appears often.