08-01-2022, 02:56 PM | #16 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
Kobo also has different renderers if you're reading:
You can read a little bit about that in my post:
Gremlins!!! It happens to all of us. |
|
08-01-2022, 03:04 PM | #17 |
Guru
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
Once I fixed the typo I noted above, ::first-letter also works fine on my Kobo Forma as a KEPUB (source is epub3 in Calibre). That's everything I use here.
Now, I just have to figure out where else I included that typo. It's fine in the file I use as a template for CSS styles. But, was wrong in that particular book's stylesheet. |
Advert | |
|
08-05-2022, 08:45 AM | #18 |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
I have yet to get ::first-letter selector working well on web-pages for drop caps. As epub readers are way behind the web probably be 50 years before we can make use of this.
|
08-05-2022, 08:52 AM | #19 |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Even spans are inconsistent between browsers for drop caps. Get it perfect in Vivaldi and you're overjoyed, then try it in Firefox and it's misaligned. Imagine the situation with epub readers you've never even heard of. Best to leave drop caps in Indesign and print.
|
08-05-2022, 10:17 AM | #20 | |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
Code:
p { text-align: justify; margin: 0; text-indent: 1.2em; line-height: 1.2em; /* This is important */ } .dropCap { float: left; font-size: 4em; font-weight: bold; line-height: 1.2em; /* This is important */ margin: -0.1em 5px -0.3em 0; } |
|
Advert | |
|
08-05-2022, 10:51 AM | #21 |
Addict
Posts: 368
Karma: 1000000
Join Date: Mar 2016
Device: none
|
Matching the line-height is interesting, I don't think I did that. It was only slight differences between browsers before, but enough to niggle. I'll give the line-height idea a try. Thanks.
|
08-05-2022, 11:14 AM | #22 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
However, setting the line-height for the normal text will annoy some users (as will forcing justify on them).
|
08-05-2022, 04:27 PM | #23 |
the rook, bossing Never.
Posts: 11,161
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
I always remove line-height on conversions because it often prevents a user changing line spacing to taste.
I often remove drop caps or other first word in first paragraph features. A affectation even on paper which makes it harder to read. Also work badly on many apps and eink ereaders. I'd use <span class="first-thing"> etc rather than ::firstletter if I was doing it, which I don't. |
08-05-2022, 07:36 PM | #24 |
Wizard
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
There are several apps with bad support for .css but, why to employ a bad app if there are many others with great support for .css and .css3? The problem are the users not well informed. And regarding eink ereaders (the old Kindle models are other thing), even those based on ADE 2.x, should support well drop caps, if the code for those ones are well written.
|
08-05-2022, 07:50 PM | #25 | |
Resident Curmudgeon
Posts: 73,998
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
08-05-2022, 09:59 PM | #26 |
Guru
Posts: 734
Karma: 1077122
Join Date: Sep 2013
Device: Kobo Forma
|
The specific thing that got me started in editing the css of my purchased books was dropcaps not displaying properly on my Kobo Forma. I'd end up with part of a glyph or something on one page at the start of a chapter and then the rest of it (along with actual text) on the next page. So, into the css I went to remove all dropcap classes.
I'm guessing the reason I don't have a problem using ::first-letter is that all I have for its formatting is font-weight: bold. No multi-line or big line-heights. No floats. Just bold. 99% of the time, it probably gets that first letter right. And the times it doesn't, a single bold letter isn't drastic enough to cause me too much grief. EDIT: Now, if I were doing this professionally, that wouldn't be acceptable. But, for my personal use, it's ok. |
08-06-2022, 08:38 AM | #27 |
A Hairy Wizard
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Just to throw my .02 in there:
I use dropcaps almost all the time. The app I use does an admirable job following the css. I hate the idea of coding for the lowest common denominator and using hacks to make sure some ancient device can still function. Devices are not that expensive... and... I don't need to worry about selling the books I clean up. I have css for the entire first paragraph, not just the first letter. That solves most of these issues regarding line height/float/spacing, etc. Code:
CSS: p.first { text-indent: 0; font-size: 1em; clear: both; } p.first::first-letter { font-family: serif; font-size: 2em; font-weight: bold; float: left; margin: -.1em .1em; } p.first::first-line { font-variant: small-caps; font-size: 1.15em; } HTML: <h3>Chapter 42 <span>This is the subtitle</span></h3> <p class="first">This is the first paragraph in the chapter.</p> <p>This is a normal paragraph that is much longer so I can make the point of the indent and other stuff being different.</p> <p>This is a normal paragraph.</p> <p>This is a normal paragraph.</p> |
08-06-2022, 08:49 AM | #28 |
the rook, bossing Never.
Posts: 11,161
Karma: 85874891
Join Date: Jun 2017
Location: Ireland
Device: All 4 Kinds: epub eink, Kindle, android eink, NxtPaper11
|
I'll usually see such as "His is the first paragraph in the chapter."
I know lots of people that hate that styling on paper. Also you can't tell the public what app or ereader to use. Personally I prefer an App that properly does the CSS and gives rendering similar to azw3 publisher settings or ADE with Publisher settings. |
08-06-2022, 09:11 AM | #29 | |
A Hairy Wizard
Posts: 3,095
Karma: 18727053
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
I'm not arguing that there aren't people who dislike that styling - don't care - and that you prefer something different wasn't the point... the point was that you can style the entire paragraph to overcome some of the issues people were having with dropcaps. I wasn't trying to tell them what app/device to use - I just don't like limiting my creativity because someone out there uses an outdated device with broken functionality... If they get to the point where they are tired of their books looking like crap then they can get a standards compliant device (or put enough pressure on their device/app manufacturers to put out an update). |
|
08-06-2022, 12:01 PM | #30 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Now, before I say anything, a) you know that I love ya, right? and b) that I have mad respect for your eBook-fu, yes? Okay, having said that: That's not necessarily true, Dion. I can break almost anybody's coding--even my own!--using nothing more lethal than a Paperwhite, Voyage or Oasis. Why? Because the Paperwhite family of devices will override font calls, to the Dropcap span. Utterly and totally. So, if you code (let's say) for an Adobe Garamond Drop, with AG body font, and Jane buys the book and reads it on, say, Bookerly or worse, Helvetica (please, Helvetica fans, don't leap in here, eh?), the drop cap is NOT going to work. Why? Because all the relative sizes will have now changed. We've invested, at my place, a fair amount of time in developing One Drop To Rule Them All markup. And it wasn't quick or easy. I'm not arguing with you, D. I love a good drop myself, just like I adore a good or elegant fleuron or graphic that I haven't seen before, (5,000x....) and all that. But, his Dropcap coding doesn't have to be broken, nor his device, for the dreaded: T his is the story of Jacob.... to occur. Hitch |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Letter-spacing | kamanza | ePub | 17 | 02-04-2022 02:11 AM |
Question about converting first letter of word into a Capital Letter | TheBossz | Calibre | 2 | 07-24-2021 06:19 PM |
Grouping by first letter of first name rather than last name | Dopedangel | Calibre Companion | 7 | 05-18-2015 12:49 PM |
Letter to McMillan | gshoe | News | 34 | 02-08-2010 08:44 PM |
Would it be possible to do three-letter searches? | Andanzas | Feedback | 8 | 07-10-2007 09:50 PM |