![]() |
#1 |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272
Karma: 3000000
Join Date: Nov 2015
Device: none
|
Drop caps?
Amazons site mentions Drop caps as a feature in their Advanced Typesetting blurb. Does anyone know of any book example where they are used? Or what code is needed to implement them manually in the files?
Code:
* Drop caps: Drop caps automatically adapt their line height to the customer's screen size and font settings. https://kdp.amazon.com/en_US/help/topic/G202087570 |
![]() |
![]() |
![]() |
#2 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,930
Karma: 89256247
Join Date: Nov 2011
Location: Charlottesville, VA
Device: Kindles
|
Amazon's documentation for publishers is not great but they do have some information on coding drop caps in the Kindle Publishing Guidelines.
|
![]() |
![]() |
Advert | |
|
![]() |
#3 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272
Karma: 3000000
Join Date: Nov 2015
Device: none
|
Thanks. It's surprisingly easy. Code works on .epubs that are then converted to .kfx with KFX Output plugin.
All that's needed is "span.dropcaps" into styles.css, then <span class="dropcaps">T</span> around first capital letter in the chapter, replacing the T. Quote:
Also, it's not as pleasing visually in case of very short paragraphs, or when very small fonts settings are selected. But by the looks of it, typesetters in old paperbacks did it in a very similar way: https://archive.org/details/producer...p?view=theater (page 28, page 38, page 157...) I'm just wonder now if there's a way to tune it so that it looks the same in epub and in kindle's format without changing the code. Last edited by jackm8; 02-06-2024 at 06:39 PM. |
|
![]() |
![]() |
![]() |
#4 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 78,352
Karma: 142887248
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Yes you can have the same code for ePub and KF8/KFX. But one thing you need to do in the ePub is set the line-height the same as that of the Kindle. Also, you may need to use the same font. ON my Kobo, I can override your choice of font and that can spoil your drop cap. On a Reader, drop cap really should not be used as there are many cases where it's a fail. |
|
![]() |
![]() |
![]() |
#5 | |
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 272
Karma: 3000000
Join Date: Nov 2015
Device: none
|
Quote:
Last edited by jackm8; 02-06-2024 at 07:53 PM. |
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 507
Karma: 8008008
Join Date: Aug 2013
Location: Hamden, CT
Device: Kindle Paperwhite (11th gen), Scribe, Kindle 4 Touch
|
Quote:
Code:
.text-dropcap { float: left; line-height: 32%; margin-top: 0.24em; margin-right: 0.05em; margin-bottom: 0; margin-left: 0; font-size: 315%; /* ePub 2 lines */ font-weight: bold; } @media amzn-kf8 { .text-dropcap { /* font-size: 265%; /* 3 lines */ font-size: 150%; /* 2 lines */ } } KFX responds to the "amzn-kf8" media query, so that allows you to customize the font size. You have to use a much smaller font size than you would for EPUB. It appears that Amazon is using something like the draft CSS initial-letter, where all you supply is the size and and the renderer automatically figures out how to locate the drop cap where it belongs. Unfortunately, my code won't work with actual KF8, because KF8 uses the same sizing as EPUB, but the media query overrides that. |
|
![]() |
![]() |
![]() |
Thread Tools | Search this Thread |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Drop Caps Disappears | Robertovr | Calibre Companion | 3 | 05-11-2021 01:48 PM |
Best Way for Drop Caps | Wlan | ePub | 62 | 07-03-2018 07:11 PM |
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 | huebi | ePub | 8 | 03-04-2012 06:25 AM |