View Single Post
Old 02-07-2020, 05:16 PM   #5
increase
Connoisseur
increase began at the beginning.
 
increase's Avatar
 
Posts: 95
Karma: 10
Join Date: Jan 2020
Device: kindle
Using Drop Caps

Quote:
Originally Posted by AlanHK View Post
I have a book using drop caps I coded in epub.

used this css:

Code:
.Dropcap {
	float:left;
	font-size:5em;
	line-height:1;
	margin-bottom:-0.275em;
	margin-right:0.05em;
	margin-top:-0.06em;
}
which makes a 3-line high drop cap.

In chapters that begin with a quote, I put the quote and the first letter in the span:

Code:
 <p class="noindent"><span class="Dropcap">&lsquo;D</span>o you want to go see some paintings?&rsquo; I ask
And that works (though I would like to use a hanging quote, if anyone has a simple way to do that?)

So I run this through Calibre to make AZW3, and notice that the chapters beginning with a quote are only two line drop caps.
Looking at the code, it's created a new style for those.

Code:
.Dropcap {
  float: left;
  font-size: 5em;
  line-height: 1;
  margin-bottom: -0.275em;
  margin-right: 0.05em;
  margin-top: -0.06em;
}
.Dropcap1 {
  float: left;
  font-size: 2em;
  line-height: 1;
  margin-bottom: -0.275em;
  margin-right: 0.05em;
  margin-top: -0.06em;
}
The original Dropcap is exactly as I made it, but there is now a "Dropcap1" which is 2em high, not 5.

So I used Calibre editor to change those chapters to just "Dropcap", that worked.

Why did Calibre do this?
I tried this and it works on epub3 o n an android using 4.2.2 but the drop cap does not appear in android 7.

Is there any way around this?
increase is offline   Reply With Quote