![]() |
#16 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
The problem with using text as dropcaps is that the exact metrics depend on the font, which you can't control unless you use embedded fonts (for both the drop cap and the surrounding text). You may get something more predictable adding "line-height:1" to the drop cap, at that would make its size line-height-independent.
|
![]() |
![]() |
![]() |
#17 | ||
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,634
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
![]() Quote:
Code:
p { text-indent: 0; text-align: justify; } /* Style to set the grey square */ .DropSpace { float: left; font-size: 3em; width: 1em; height: 1em; background: grey; padding: 5px; margin: -0.0em 5px -0.2em 0; } /* Style to fit the DropCap inside the grey square */ .DropCap { display: block; position: relative; top: -0.15em; left: -0.06em; font-size: 1.4em; font-weight: bold; font-family: sans-serif; width: 0.8em; height: 0.8em; text-align: center; } Code:
<p><span class="DropSpace"><span class="DropCap">B</span></span>ehind the walls of Augustine,<br /> he notes the seven traits of plants<br /> and how their combinations<br /> tell us that what was shall surely be<br /> again. He writes of <i>dominance</i><br /> and <i>recession</i>, of the patterns</p> Below I attach the respective epub. Regards Rubén Last edited by RbnJrg; 12-31-2015 at 06:48 AM. |
||
![]() |
![]() |
![]() |
#18 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
But no, this is 'modern poetry', and the publisher and editor very much want to see the author's formatting preserved. I've focused on this particular poem because the dropcap is driving me frantic, but there are other poems with equally bizarre effects - including subscripts as an integral part of the poetry. |
|
![]() |
![]() |
![]() |
#19 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
|
|
![]() |
![]() |
![]() |
#20 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
|
|
![]() |
![]() |
![]() |
#21 |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Alex, dear boy (male, right? You're not Alexandra, are you?),
Don't we have this discussion every few months? You take on some daft project for someone who won't "give in" on the formatting, even though it literally CANNOT be done the way that they want? I love Rube, but that formatting is going to go straight to hell the moment someone with Coolreader opens it. And it won't survive the Kindle process, either, for KF7, I don't think. Or KF8, given the line-height requirement. I am fairly sure I've said this here before: we tend to decline poetry if we feel that the client isn't familiar with eReaders, and doesn't understand the limitations (compared to print) or the superior capabilities (ditto). Trying to create that poetry, without doing FXL...why, oh, why, are you torturing yourself this way? I hope you are at LEAST charging the earth. This is utterly daft if you're doing it on the cheap. I admire your determination--I truly do--but...what will you do when they come back complaining because it's pooched on an Android Tablet? Or on a Kobo? Not even yet DISCUSSING Amazon? Hitch |
![]() |
![]() |
![]() |
#22 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
Yes, I'm male - Alexander Frank John. And yes, we have had this discussion before. I guess I'm too softhearted for my own good. But I have told the publisher and editor that two of the poems can't be made to work, and suggested that they withdraw those two or consider seeing if a professional could do them. I don't suppose you'd be interested? |
|
![]() |
![]() |
![]() |
#23 | |
The Grand Mouse 高貴的老鼠
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 73,620
Karma: 315126578
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Oasis
|
Quote:
The root of the problem is that there's no way to specify the size of the drop cap in terms of the leading applied to the body text. Amazon apparently fiddle this in their new KFX format, but they probably do it in a device-specific way. Until Amazon/ePub specs allow an explicit way to define drop caps, and sufficient devices have adopted the new system, there's no satisfactory way to do drop caps. |
|
![]() |
![]() |
![]() |
#24 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,634
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Drop Cap for Kindle (all models)
Quote:
Happy New Year ![]() Code:
/* Style to set the grey square */ .KDropSpace { float: left; font-size: 4.6em; width: 1em; height: 1em; background: grey; padding: 5px; margin: 0 5px -0.1em 0; } /* Style to fit the DropCap inside the grey square */ .KSVGDropCap { display: block; position: relative; top: 0em; left: 0.05em; font-size: 1.2em; font-weight: bold; font-family: sans-serif; width: 0.8em; height: 0.8em; text-align: center; } /* Styles for old Kindle models */ @media not amzn-mobi { .NotKF8 { display: none; } } Code:
<h1>SVG Drop Cap for Kindle</h1> <p><span class="KDropSpace"><img alt="B" class="KSVGDropCap" src="../Images/B.svg" /></span><span class="NotKF8"><b>B</b></span>ehind the walls of Augustine,<br /> he notes the seven traits of plants<br /> and how their combinations<br /> tell us that what was shall surely be<br /> again. He writes of <i>dominance</i><br /> and <i>recession</i>, of the patterns</p> Below you can check the respective epub, with the SVG image for the letter "B". Regarding KF7, you know, we can't get there drop caps, so I displayed the first letter as bold. Regards Rubén Last edited by RbnJrg; 01-01-2016 at 05:25 AM. |
|
![]() |
![]() |
![]() |
#25 |
mostly an observer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,518
Karma: 987654
Join Date: Dec 2012
Device: Kindle
|
I admire the devotion that created the style, but I prefer the DX version myself.
|
![]() |
![]() |
![]() |
#26 | |
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
As I said, I respect you and I'm enormously fond of you. I too admire the devotion and time you put into this. Something is rubbing up against the back of my head on this--I can't remember now what it is. Dammit. But there's something about using an imaged-drop-cap that doesn't work just so. I'll keep thinking. (Maybe in a few days--allegedly, I'm off work today!) ![]() Nonetheless: awesome coding. Hitch |
|
![]() |
![]() |
![]() |
#27 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Just to let people know: after checking the results on a Kindle the editor decided she didn't want drop caps after all. Now for the next problems.
The very much appreciated help people gave me hasn't been wasted; one of these days I'll do drop caps in one of my ePubs for the MR library. |
![]() |
![]() |
![]() |
#28 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,634
Karma: 8566337
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
https://www.mobileread.com/forums/sho...3&postcount=24 Because that is code you must use for Kindle models (my previous code was for ADE). The drop caps for Kindle must be based on SVG images in order to get a consistent display, regardless of device used. Regards |
|
![]() |
![]() |
![]() |
#29 | ||
Bookmaker & Cat Slave
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 11,503
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Quote:
Hitch |
||
![]() |
![]() |
![]() |
#30 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Drop Caps question | holdit | Sigil | 11 | 08-24-2014 08:01 AM |
Drop caps | RandyK | Conversion | 2 | 05-18-2014 09:13 PM |
Drop caps and poetry... in ADE | Jellby | Workshop | 27 | 01-02-2014 02:20 PM |
Is there a way to strip drop caps? | ficbot | Calibre | 2 | 08-30-2013 11:06 AM |
Drop caps | huebi | ePub | 8 | 03-04-2012 06:25 AM |