View Full Version : To embed, or....well......


brewt
12-23-2009, 12:59 AM
Man, I hope I don't get in trouble for this.

Built me an epub out of Indesign with a dozen, not wait, 46 serifed fonts embedded in it. Poorly formatted, to boot

Embedding the fonts is the one thing Indesign does transparently (hyperlinks are troublesome, tho). Picked IDcs4 so it would encrypt the fonts - less trouble for me, you know.

The question was "Does it make a significant enough difference to warrant the trouble it takes?" The Bride didn't think so; keyword "trouble" bothered her.

I had thought I had seen ADE adding weight to the embedded fonts in other endeavors, and it looks like it still does. Garamond and Minion don't seem as lithe as I think they should: just fine, though, in Calibre and Epubreader/Firefox. A Reader doesn't have quite the weight added that ADE does, but it's still heavier (at least, to my eye). I still like Minion.

If it matters, the Dutch801 Rm BT is the default built-in font on Sony Readers.

-bjc

Revised 7/14/10 - latest embedded font test, mangled a bit harder than earlier editions, more fonts. I still have concerns that different reading systems handle the font embedding thing rather drastically differently. Does the embedment show up on a real nook, for example. And, has anyone started a css-implementation differences chart for the different devices?
-bjc

Jellby
12-23-2009, 07:02 AM
I would not embed fonts for the main text, which users may want to change (if the software allows it). I use embedded fonts only for titles, drop caps or decorative texts.

brewt
12-23-2009, 04:30 PM
I've been trying to bone up a bit on typography and book design of late.

One of the things "they" bring up is the idea that a book invokes a feeling, and that the design of the book can extend that feeling by design, font selection, layout, and so forth.

If the font selection, even the base body copy font choice, makes a positive (or negative) difference, then embedding would be worth the trouble.

Except, there are other tools used to realize a book that are limited or even absent in epubs, like kerning, h&j, precise placement control, it goes on.

So, if we can't have better h&j and kerning (etc), does the base font really make that big of a difference that's worth while? I can see the argument that the book is more than just words, that beauty in the expression of the words in an of itself makes a significant difference.

But until the rendering engines in the readers improve (lots), I agree with Jelby: font embedding only serves specialty needs (like weirdo characters), or to "slightly" alter the appearance of bits and pieces of the book.

The only other directional change I can think of is if we could call pre-built files for each different typesize change: on a reader, there would be 5 files for each chapter file (who knows how many for a Nook), one for each size, specifically built and called on; rather than having the system re-render, it just calls the next sized file.

Bleah. Sound like an inordinate amount of work. I'd have to get paid.

-bjc

frabjous
12-25-2009, 01:10 AM
[Nevermind.)

brewt
12-25-2009, 09:09 PM
[Nevermind.)

Right - that's why I had IdCS4 encrypt 'em. Makes for a good demo - sales pitch for the foundaries, if you like.

-bjc

JSWolf
12-26-2009, 05:15 PM
I would not embed fonts for the main text, which users may want to change (if the software allows it). I use embedded fonts only for titles, drop caps or decorative texts.
I've been seeing a lot more ePubs coming with embedded fonts. One thing that does is make for darker text and easier reader. Plus you get true italics and true bold as well.

Jellby
12-27-2009, 05:22 PM
I've been seeing a lot more ePubs coming with embedded fonts. One thing that does is make for darker text and easier reader. Plus you get true italics and true bold as well.

Embedded fonts can be better than the default ADE font, but they'll probably be worse than user-selected fonts (at least, the user won't like them better). I see embedded fonts for the main text as a workaround for an ADE shortcoming.

JSWolf
12-29-2009, 11:36 PM
Embedded fonts can be better than the default ADE font, but they'll probably be worse than user-selected fonts (at least, the user won't like them better). I see embedded fonts for the main text as a workaround for an ADE shortcoming.
Well, the embedded fonts used are Charis SIL. It's a serif font. It definitely looks better then the default ADE fonts. It's not my favorite choice, but it's easily readable and I'm OK with it for sure.

brewt
01-29-2010, 12:19 AM
Can't leave well enough alone, can I.

Attached is Take 2 of the embedded font test. More serif fonts included (39 now). Created in Word and Indesign CS4, fonts encrypted via Adobe encryption scheme. Reprocessed to add meta data in Calibre.

If you see one you like, please go out an BUY IT. Don't Swipe It.

Embedded fonts show up in ADE,Sony Desktop Reader, Sony Reader, Calibre.

Embedded fonts do not show up in Firefox, Barnes & Noble Desktop.

File would not open in Stanza PC, Opera.

Anybody got something else to try it on?

-bjc

sjkramer
01-30-2010, 11:44 AM
Brewt: Wondering if you've opened/saved this file in Sigil. I've been having problems retaining embedded fonts after opening and saving with that (otherwise excellent—for a free, not-even-beta program). I'm not sure what the problem is. Could it be the way Sigil renames the fonts? Either way, I'd love, at the last stage, to "restore" this embedding.

brewt
01-30-2010, 12:25 PM
When I open the file in Sigil, I'm not seeing the embeddedness of the fonts that I see in ADE. Attached are some pix.

Also: I've got some fonts indesign says I can't embed, so even if your method worked, there are instances that it couldn't. Obvious example attached.

Funny, these all show up ok in sigil but not ade/sony.

As much fun as indesign can be, I find that it causes (me, at least) more problems than it solves.

-bjc

sjkramer
01-30-2010, 03:09 PM
thanks for these. Just one question, once you've saved the file in Sigil, do you still see the embedded fonts in ADE? That's where I'm running into trouble.

Valloric
01-30-2010, 03:59 PM
Font embedding is still not supported in Sigil. It will be in a future release. Any current Sigil code that deals with retaining fonts should be considered experimental.

There are only so many hours in a day.

brewt
01-31-2010, 01:06 AM
'fraid not. What it looks to me like is that the original font calls are preserved in the css, but sigil is renaming the font files to font1.ttf, font2.ttf,, etc. Some of my original fonts are otfs, if that makes a difference, too.

xhtml:
<p class="style1"><span>Bembo Std: The quick brown fox jumps over the lazy dog. Jackdaws love my big sphinx of quartz. 0123456789 (.,:;-*!?’) ABCDEFG HIJKLMNOP QRS TUV WXYZ abcdefg hijklmnop qrs tuv wxyz “” ‘’ &lt;&gt;[]{}</span></p>

css:
color: rgb(0, 0, 0);
display: block;
font-family: "Bembo Std";
font-size: 1em;
font-style: normal;
font-weight: normal;
line-height: 1.2em;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
text-align: justify;
text-indent: 0
}

content.opf call:
<item id="font001.otf" href="fonts/font001.otf" media-type="application/x-font-opentype"/>

I can't see way to preserve the original connection - rebuilding it to match the original would be a bothersome chore at best, assuming the encryption scheme survived. I haven't tried it yet, but my off-the-cuff guess is no, it wouldn't.

What are you trying to do in sigil to make this work? I know their meta tags are extensive; what else are you after?

-bjc

Valloric: sleep is for the weak, my friend. :rofl:

JSWolf
01-31-2010, 05:57 AM
Can't leave well enough alone, can I.

Attached is Take 2 of the embedded font test. More serif fonts included (39 now). Created in Word and Indesign CS4, fonts encrypted via Adobe encryption scheme. Reprocessed to add meta data in Calibre.

If you see one you like, please go out an BUY IT. Don't Swipe It.

Embedded fonts show up in ADE,Sony Desktop Reader, Sony Reader, Calibre.

Embedded fonts do not show up in Firefox, Barnes & Noble Desktop.

File would not open in Stanza PC, Opera.

Anybody got something else to try it on?

-bjc

I can try it with the txtr app for the iPod Touch.

Valloric
01-31-2010, 06:49 AM
When I open the file in Sigil, I'm not seeing the embeddedness of the fonts that I see in ADE.

This is a know problem with Qt's embedded WebKit. Font variants are not displayed. Regular fonts should display fine, and even font variants on some occasions, but usually not. This is the major reason why font embedding is currently not supported in Sigil. I was hoping they'd fix it for the 4.6 release of Qt, but no such luck.

Sometime after Sigil 0.2.0, I'll be forking Qt and working on this directly.

Just FYI, If you're working with InDesign too, bear in mind it doesn't report the fonts it embeds in epubs in the manifest section of the OPF. And then Sigil doesn't load those fonts during import, since they're not declared.

I just took a look at your "obvious.epub" and yeah, the font files are not reported in the OPF manifest. Sigil then displays the font in Book View but only because it can find the font on the system. The font is not in the book. You then export to epub and open it in ADE, and ADE can't load the font because it isn't there, and ADE doesn't check the system for missing fonts.

From what I hear, InDesign's current epub export functionality is pretty terrible.

JSWolf
01-31-2010, 10:12 AM
Yes, the embedded fonts look fine with the txtr app.

brewt
01-31-2010, 03:03 PM
In the manifest portion of the obvious epub, I agree, I don't see fonts showing up there. Indesign reported that "not all fonts could be embedded", which apparently botched several things in the output file.

In the manifest of the embedded test 2 epub, I am seeing fonts declared:
<item href="OEBPS/Fonts/BemboStd.otf" id="added1" media-type="application/x-font-opentype"/>

And yeah, it dawned on me later that the reason I could see the fonts in sigil was that they were installed on my machine.

So the obvious example turned out to be not-so-obvious.

The Indesign-built epubs can be functional, but it's much harder than I want it to be. Hyperlinks are a bitch in indesign, and the obvious things you'd think would just work (like picture placements, text wraps, drop caps, multiple multi-layer tocs) either just plain don't, or don't work as expected. And there doesn't seem to be an indicator/guide that says what works and what doesn't.

I think that's all because of the approach adobe took into indesign: print first, epub should work like print, print forever, amen. Still causes me more problems than it solves.

And an epub is something between print and the web: it's a new thing!

-bjc

Valloric
01-31-2010, 07:39 PM
And an epub is something between print and the web: it's a new thing!

Actually epub is more like 99% web and 1% print. OPS documents are pure XHTML + CSS, with mostly trivial modifications.

What makes epub good is the stuff around the OPS documents: the OPF metadata, the NCX TOC etc. All this put together makes one very good standard.

brewt
02-01-2010, 11:05 AM
zuluexpress: nope.
freda: nope.
fbreader: nope.
mobipocket-translated: nope.
Coolreader: nope.

I don't have much luck getting any of my css to work in those, either (darn it).

Anyone have android?

-bjc

ondabeach
02-11-2010, 09:35 AM
zuluexpress: nope.
freda: nope.
fbreader: nope.
mobipocket-translated: nope.
Coolreader: nope.

I don't have much luck getting any of my css to work in those, either (darn it).

Hi brewt, it's ondabeach, the developer of ZuluReader. ZR does use CSS, however I haven't added support for all possible html tags.

I don't use any off the shelf components or dll's for deciphering any part of an ePUB. My code literally examines one character at a time and works out what it all means. Then actually 'paints' it all onto the screen, one character or image at a time. So I have blocks of code for extracting and parsing all the bits of an ePUB like the Meta Data, TOC, Mainfest CSS etc. That means that I have unparalleled control over how an eBook displays based on it's content.

If you email me a sample ePub with CSS that ZuluReader is unresponsive to, and a description of the discrepancy between what is expected and what you get, I will, as Jean Luc Picard would say..... "Make it so!"

Cheers.

Jim Chapman
02-13-2010, 04:19 AM
[QUOTE=brewt;767296]... freda: nope.

I don't have much luck getting any of my css to work in those, either (darn it).
/QUOTE]

By design. Freda ignores the author's view on font setup, and lets the reader decide what will work best for them (I assume that the author didn't design the book's appearance with the limitations of a WinMo phone screen in mind).

As for style sheets, they should generally work in Freda, though there are some limitations (the imminent v1.1 has fewer limitations). If there's a particular sheet that you're trying to get working, please email me details (home@jim-chapman.net) and I will investigate.

Thanks,

Jim

brewt
02-13-2010, 10:56 AM
As this seems to be devolving from an embeddment thread to a css thread, let me first of all apologize to the developers who took my off-hand remark on my own problems with css to heart, as no offense was intended at all. All the developers' efforts are way more than I could do myself, and my appreciation of their efforts and generosity truly runs deep. Really really.

My css problems are largely my own. Neophyte: here.

A lot of my troubles, I understand, are stemmed from the outrageously complex process I adopted, per se:

1) Start in Word 2007. I've built a Quickstyle set that has all the (current) permutations I'm interested in. I'm mapping to the basic fonts on the Sony Reader 700. Proves handy, as their metrics are close to things like times new roman and arial (and so fairly universal). Also, that's what's in the house. Edit until happy.
2) Save as HTM-Filtered, utf-8 encoding.
3) Open in DreamWeaver CS4.
4) Use Dreamweaver's "Clean up Word" function, then strip out word-implanted css <style>--</style> at top of file.
5) Attach styles.css, which happen to match the Quickstyle set in both style-call-names, and attributes. Well, close enough.
6) Convert to XHTML1.1 out of dreamweaver. Save.
7) import into calibre, add metadata, cover graphics, etc, render epub.

The gauntlet I run through here is replicable, and with enough supporting visual basic scripts in word, fairly fast. So I can go back and fix in word, redo everything in the steps above and have it come out: fixed.

I've got certain attribute calls in the css joined up at the top - makes it easier to change font sets (just once or twice, as opposed to several dozen places), and to factor out the left-quote variants. Mobipocket does not have the horizontal resolution that epub does, which is part of my process - to also make kindle-ready stuff. By changing a couple lines in the css, and re-importing the file into calibre, I can render the file both ways with an acceptable amount of fuss.

All this horsing around is the warmups for embedding/encrypting fonts outside of indesign. My recent failure on encryption have been commented to the encryption-script developer. And yes, I'm doing something wrong there, too.

Attached is the word 2007 quickstyleset, post-dreamweaver source html+css, calibre-generated source zip, and resultant epub. No font embedding. Still working on drop caps - hard to universalize without scripting in epub (ignore them, please).

Oh, on left-quote variants. The typography sites, books and blogs I've been perusing all say the same thing: put the left quote marks in the margin, so the 1st actual letters of the paragraphs line up vertically. And they are right - it is nicer to look at. And any little tweak we can get out of epub, we should take advantage of.

How it appears in ADE is what I keep hoping I can reproduce into a Windows Mobile Epub reader. Current softwares are continuing to improve, and I pray they do so until we are all happy.

-bjc

brewt
02-13-2010, 01:31 PM
Gawd, somebody stop me. Guess I'm going to carrry on a little while more, 'cause that's just what I do.

Attached here is a mobipocket version of my base model file, created with mobipocketcreator.

I know, how dare I bring up mobi here in the epub board. There is a method to my madness.

Looking at this with Real MobiPocket, many of the things in my epub version work. Many do not:
1) Drop caps. Duh.
2) Text wrapping around pictures. Not demoed here, but at least I haven't gotten it to work.
3) Horizontal Resolution to compensate for quotes. Mobi is walled up at 1em, 2em, 3em horizontally. Better gradation vertically, but not as good as epub on the left-right.
4) And sure, my font calls are probably not on your machine, so there is font substitution on anybody elses device.
5) Embedding fonts doesn't either, not demoed here.

However: Multiple font calls, lots of type sizes, text decoration, the aforementioned vertical resolution, it goes on, do work. Not to mention dynamic dictionaries, exportable annotations, the usual mobi selling points.

What I keep hoping for is a something-better than Mobi in Windows mobile. And yes, I am reading on a WinMo screen about the size of 2 postage stamps. I'd really like to abandon Mobi, but until the something-better happens, for my modern lifestyle, I just can't bring myself to.

Darn it.

-bjc

sjkramer
02-19-2010, 12:42 PM
brewt: I know that you're anti-export from InDesign, but this does sound like an awful lot of steps to go through. Maybe you should give it one more try—just for fun. On the other hand, I know that what sounds complicated (to wit: my own seemingly crazy process) can become second nature.

charleski
02-19-2010, 02:09 PM
I had thought I had seen ADE adding weight to the embedded fonts in other endeavors, and it looks like it still does. Garamond and Minion don't seem as lithe as I think they should: just fine, though, in Calibre and Epubreader/Firefox. A Reader doesn't have quite the weight added that ADE does, but it's still heavier (at least, to my eye). I still like Minion.

eInk tends to add a small amount of weight to the font (not sure if this is by design - to aid legibility - or a result of the anti-aliasing used), and I think ADE is trying to simulate that. The result is that 'book' fonts, which are slightly heavier, end up being a bit too heavy on a Sony Reader. Regular-weight Garamond looks fine though.

brewt
02-21-2010, 11:05 AM
brewt: I know that you're anti-export from InDesign, but this does sound like an awful lot of steps to go through. Maybe you should give it one more tryjust for fun. On the other hand, I know that what sounds complicated (to wit: my own seemingly crazy process) can become second nature.

The biggest trouble I have with InDesign is that when I want to make some minor changes, I often end up starting ALL the way over, from scratch.

For instance, one of the biggest issues I have with InDesign is with hyperlinking. Multi-document hyperlinking via Word is fairly transparent, and the hyperlinks survive the process, end to end.

Let's take for the example, a multi-file, heavily hyperlinked book of books (mostly what I do). The Complete Works of, you know, So and So.

If I want to change style sets, which I do often, it's a matter of creating the quickstyle set that does what I want (say, changing Times to Minion), adapting the css, and run the gauntlet.

Doing the same thing in Indesign, if I start with Word, my hyperlinks all die on the transition back into ID and all need to be rebuilt, one at a time, by hand.

If I restyle in Indesign, I have to hand redo every file (on a multi-file), and, because I'm no good at Indesign, every paragraph, too.

THAT, to me, is the hard way. And God Save Me if I come up with a new component, say, a different way to handle poetry in the book.

So maybe the problem is, as always, me, in that I consider my catalog a continual work in process and a learning experience, because as I continue to develop ideas, I tend to want to retro-fit them to previous efforts. And, I want multiple output formats. Epub & Kindle are both necessary outputs for me.

Indesign is Ok for one file = 1 output book; if you can afford it and are willing to live with the limitations Adobe thought of 3 years ago, by all means, do it. However, The Complete Works of Jane Austen, with footnotes, is more effort via Indesign than I am willing to expend. Especially since I can't make up my mind between Minion, Garamond, Caslon, or Kepler, or just leaving it at defaults. My process will make those 5 example outputs less of a chore.

And no, I'm not done with that; lots of fiddling around still to do.

-bjc

brewt
02-21-2010, 11:20 AM
eInk tends to add a small amount of weight to the font (not sure if this is by design - to aid legibility - or a result of the anti-aliasing used), and I think ADE is trying to simulate that. The result is that 'book' fonts, which are slightly heavier, end up being a bit too heavy on a Sony Reader. Regular-weight Garamond looks fine though.

You know what the difference might be? ClearType. Things like Word & Indesign, I'm reasonably sure, use Cleartype for their screen-font-rendering engines. I'll betcha ADE doesn't.

-bjc

Valloric
02-24-2010, 03:59 PM
You know what the difference might be? ClearType. Things like Word & Indesign, I'm reasonably sure, use Cleartype for their screen-font-rendering engines. I'll betcha ADE doesn't.

-bjc

ClearType only works for text that's rendered on the screen using Windows API's (or API's that in turn use Windows API's). ADE is a flash/flex application, and that AFAIK doesn't use the Windows API's for text rendering.

bobcdy
03-01-2010, 12:08 AM
Brewt,
On post #5 you mentioned you encrypted the fonts in your test epub. Perhaps I misunderstood this - I unzipped the epub file and looked at a couple of the fonts with 'FontCreator' and found that there did not seem to be any encryption that the font program was aware of. At least I could change the font characters' features (stretched the B in Ellington) without any trouble and saved it with new name.