View Single Post
Old 06-23-2025, 07:01 PM   #31
graycyn
Wizard
graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.graycyn ought to be getting tired of karma fortunes by now.
 
Posts: 1,591
Karma: 11722446
Join Date: Aug 2010
Location: NE Oregon
Device: Kobo Sage, Pocketbook Era, Kobo Forma, Kindle Oasis 2
Quote:
Originally Posted by JSWolf View Post
You have to be careful. If ADE 2.0.1 or 3.x thinks your code is a mistake, the entire CSS will be ignored.

What would happen if you had first-letter and a span for a program that supports both? This is a good reason to forgo drop caps if you need ePub2 compatibility.
Since I'm back working on Under the Lilacs (on to scanning images and processing, almost done with the illustrated titlepage), and since the 1910 hardcover has, you guessed it, drop caps, I was delighted to see that initial-letter is getting some support.

So, for the moment at least, I've added it:

Code:
p.chapter-lead::first-letter {
  initial-letter: 2;
  -webkit-initial-letter: 2;
}
Here's a few images so you can see what it looks like in Sigil (which is similar to what happens in supported apps) and what it looks like in Adobe Digital Editions, v2.0.1. Same file, same code, same computer.

Now, you do have to play about with it. For instance, if you add any padding, you have to consider that if a device honors first-letter but NOT initial-letter, you could get an odd look if you go crazy with too much. A tiny dab might be OK. I've been playing with adding a trace for the letter "I", because it tends to look a bit cramped otherwise.

It's possible it might not play well with every font too, I tried it with Open Dyslexic and placement of the drop cap was odd. So a risk, given one never knows what fonts people will decide to read with. I've seen folks post some doozies!

And, with a phone in landscape orientation, you run the risk that if only the first line of the chapter fits on the screen, your drop cap will show, but its bottom half on the second line will be truncated....

I tossed the epub into the Kobo iOS app and also BookFusion iOS, and not only is initial-letter honored, but also hanging-punctuation! YAY! I tossed in a picture of the hanging-punctuation property working in the Kobo app on my iPad!

Fun times if you make backward compatible epub3! You can't eat cake ALL the time, but sometimes is nice!
Attached Thumbnails
Click image for larger version

Name:	Sigil_showing_initial-letter_m.png
Views:	30
Size:	86.6 KB
ID:	216434   Click image for larger version

Name:	ADE_showing_inital-letter_m.png
Views:	27
Size:	135.2 KB
ID:	216435   Click image for larger version

Name:	Kobo_iOS_showing_hanging-punctuation_IMG_1374.png
Views:	28
Size:	83.3 KB
ID:	216436  
graycyn is online now   Reply With Quote