|
|
#16 | |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 554
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
|
Quote:
|
|
|
|
|
|
|
#17 |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,479
Karma: 21000001
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
I seem to recall one of the “downsides to spanning” conversations we’ve had in these threads about this topic was that it broke spellchecking, audio readback, searching, and possibly accessibility in some software because
<span>W</span>ord ≠ Word I imagine newer software may have fixed this to some degree, but if you are using newer software it likely supports the newer capabilities in ePub3 anyway. For these reasons, and my abhorrence of kludgy coding, I stay away from breaking up words with spans just to achieve a particular (drop-cap, small-cap, etc.) type effect. (I have no issues with spanning a whole word or phrase.) To fix the OP’s original issue (if I understand it correctly) of preventing punctuation/symbols/quotes from being included in the :first-letter pseudo selector, I use one of the following methods: 1) place the cursor to the right of the offending punctuation and tap the Backspace key, or 2) place the cursor to the left of the offending punctuation and tap the Delete key. Both methods work equally well! ![]() It is amazing how few people would actually notice a missing opening quotation at the beginning of a chapter, and even fewer still would care… Which do you think is the cleaner coding (assuming identical styling is achieved in the css)?? Code:
/*this css is just an example, style as you wish*/ p.first {margin-top:2em; text-indent:0} p.first:first-line {font-variant:small-caps} p.first:first-letter {font-size:6.7em; font-family:"Dion’s Big Font"} <p class="first">Hey Dion,” she said. “That was amazing! I’ve never seen such efficient and practical coding!”</p> ~OR~ p.first {color=red} span.firstlineinchapter {font-size:1.2em; text-transform:uppercase} span.smallpunct {display:inline-block; font-size:.5em} span.dropcap {font-size:6.7em} span.bigletter {font-size:2em} /*all the myriad span styling required to make this work*/ <p class="first"><span class="firstlineinchapter"><span class="smallpunct">” </span><span class="dropcap">H</span>ey <span class="bigletter">D</span> ion,” she said. “<span class="bigletter">T</span>hat was amazing!</span> … </p> Last edited by Turtle91; Yesterday at 08:04 AM. |
|
|
|
|
|
#18 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82,726
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
These are the sorts of things you have to think of. So don't do anything where you need the font you've chosen to embed. Make it work with any font if possible. |
|
|
|
|
|
|
#19 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82,726
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
|
|
|
|
#20 | |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,479
Karma: 21000001
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
This is similar to a coder that uses color in their coding… looks great on a modern/compliant reader, but still looks ok on a black and white eink… I think that is a much better alternative than potentially breaking accessibility laws that may be introduced by using the span technique. EDIT: To be clear: This technique with the pseudo-selectors is not an ePub3 thing. Pseudo-selectors are supported under ePub2. The “fallback” aspect would be using Rbnjrg’s example of setting the font range. That would work for any ePub3 compliant reader/app. If the app doesn’t support ePub3 then it would ignore that css and revert to whatever other css you had set. It wouldn’t be as pretty, but it would be acceptable. My example of the opening quote/dropcap issue works in both ePub2 or 3. Last edited by Turtle91; Yesterday at 09:15 AM. |
|
|
|
|
|
|
#21 | |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,479
Karma: 21000001
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
|
|
|
|
|
|
|
#22 | |
|
Fanatic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 554
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
|
Quote:
BORN: Dec. 15, 1948 |
|
|
|
|
|
|
#23 |
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,479
Karma: 21000001
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Oh! That’s much easier; that’s just a basic span.
Code:
.bigger {font-size=1.1em}
<p>BORN: Dec. <span class="bigger">15, 1948</span></p>
~OR~
.smaller {font-size=.9em}
<p><span class="smaller">BORN: Dec.</span> 15, 1948</p>
Last edited by Turtle91; Yesterday at 09:52 PM. |
|
|
|
|
|
#24 |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82,726
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
|
|
|
|
|
#25 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82,726
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
As for psuedo selectors, they aren't part of ePub2. And you have to take into account Kobo and it's older RMSDK. |
|
|
|
|
|
|
#26 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 350
Karma: 2581190
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on iphone and kindle cloud reader
|
!! as a snippet equals <span class="exclam2">!</span>
I have been using a right-leaning extra-large exclamation mark which descends below the line and also extends upwards beyond normal height. It just looks good to me and seems to work well with Amazon Kindle and also PDF for printing. To use it I just type in the exclamation mark twice, then hit ctrl-J to make it function as a snippet. I amusing verdana font which has right- and left-leaning quotation marks and when the exclamation mark precedes an end quote I think it looks nice. Since the concept of ending a sentence with extreme emphasis is the basis of this mark I think that being a bit larger is all to the good. Even though it is descending and ascending beyond normal size I wanted to make sure it did not change line height for the single line it is on. I certainly do like the idea of putting in a unicode-range and did not know this could be done<span class="exclam2">!</span>
|
|
|
|
|
|
#27 | ||
|
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,479
Karma: 21000001
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Ummm, not quite. Per the ePub2 spec, section 3.1 Selectors Quote:
The red emphasis is mine. OBTW, the ePub3 spec was released in 2011. I wonder how long it'll take for readers to adopt them... or do we get to ignore those readers after 15 years??? |
||
|
|
|
|
|
#28 | |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 350
Karma: 2581190
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on iphone and kindle cloud reader
|
Quote:
|
|
|
|
|
|
|
#29 | |
|
Bibliophagist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 50,981
Karma: 179232776
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
|
Quote:
And yes, I have used a few of them with a Kobo ereader's version of RMSDK and those few worked. |
|
|
|
|
|
|
#30 | |
|
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 82,726
Karma: 151278869
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
|
|
|
![]() |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Moon+ Reader your favorite font and font size? | loodio | Android Devices | 6 | 01-30-2016 06:50 PM |
| Problem changing font size using font size key | Waylander | Conversion | 0 | 10-02-2013 03:30 PM |
| Determine font and font size on incoming epub? | peaceridge | Calibre | 4 | 01-30-2012 03:35 PM |
| PRS-300 Med font size too big, but small font size too small | eli2k | Sony Reader | 4 | 05-28-2010 09:47 AM |