06-05-2012, 12:09 PM | #1 |
Right, Except When Wrong
Posts: 353
Karma: 3968525
Join Date: Aug 2007
Location: Indianapolis
Device: Kindle Oasis 3 (sometimes iPad Mini).
|
Fix "small caps" problem
So I have an ebook that has been formatted (not by me) so that each new chapter or section begins with a slightly oversized letter followed by several words, in all caps, but in a tiny font before the text returns to standard upper and lower case and a regular font size. It appears that the formatting is trying to emulate small caps but doing so really poorly. When I get to each new chapter I have to either squint or zoom just to read the first few words. It's getting a wee bit annoying. Is there a quick way in Sigil to fix this? Note that I really don't understand CSS yet...
|
06-05-2012, 12:12 PM | #2 | |
The Grand Mouse 高貴的老鼠
Posts: 71,506
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
|
|
06-05-2012, 12:14 PM | #3 |
Resident Curmudgeon
Posts: 73,968
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
In most cases, smallcaps are just a simple style in the CSS. If that's the case, check how it's done. It should be a font size of either 75% or .75 em to be correct for the default font size of 1em.
|
06-05-2012, 01:13 PM | #4 |
Right, Except When Wrong
Posts: 353
Karma: 3968525
Join Date: Aug 2007
Location: Indianapolis
Device: Kindle Oasis 3 (sometimes iPad Mini).
|
I opened the ebook in Sigil. Here is what the beginning of a chapter looks like (I've changed the text of the book itself...):
<body class="calibre"> <p class="calibre7" id="filepos13245"><span class="calibre11 bold">CHAPTER 1</span></p> <p class="calibre9 sgc-1"> </p> <p class="calibre10"><span class="calibre12 bold">CHICAGO, ILLINOIS</span></p> <p class="calibre9 sgc-1"> </p> <p class="calibre10"><span class="italic">I</span> <span class="calibre12 italic">SHOULDN’T HAVE</span> <span class="italic">come,</span> Bob Smith thought as he looked at the people around him. <span class="italic">I should have gone far away.</span></p> <p class="calibre15">But he had answered the phone call.</p> |
06-05-2012, 01:21 PM | #5 |
The Grand Mouse 高貴的老鼠
Posts: 71,506
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
It looks like you just need to change the CSS for style calibre12.
But that will only fix the font size, of course. Since the ALL CAPS is hard coded, there's no way to change that (without errors) without changing the text itself. |
06-06-2012, 12:24 AM | #6 |
Wizard
Posts: 2,986
Karma: 18343081
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
I created some EPUBs with small caps a while ago using sigil, and the code there looked like:
Code:
<small>I SEEM TO BE</small> Last edited by rkomar; 06-06-2012 at 12:28 AM. |
06-06-2012, 03:56 AM | #7 | |
Grand Sorcerer
Posts: 5,584
Karma: 22735033
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
For example, the following regular search and replace expressions would change all caps text to lower case text: Search: <span class="calibre12 italic">(.*?)</span> Replace: <span class="italic">\L\1</span> |
|
06-06-2012, 04:05 AM | #8 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
That cannot know when a letter must be uppercase anyway, as in a proper name.
|
06-06-2012, 04:46 AM | #9 |
The Grand Mouse 高貴的老鼠
Posts: 71,506
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
|
06-06-2012, 10:24 AM | #10 |
Guru
Posts: 696
Karma: 150000
Join Date: Feb 2010
Device: none
|
FWIW, I will add that my experience has been that this method of simulating small caps (i.e. font size 75%, or whatever, used with all caps in the text) does not work reliably in all epub readers (nor, IIRC, in kindle 3 and below).
One could (should?) embed an actual small-caps font, but some e-readers don't handle embedded fonts well either. |
06-06-2012, 10:45 AM | #11 |
The Grand Mouse 高貴的老鼠
Posts: 71,506
Karma: 306214458
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Well, actually small-caps should be done by specifying font-variant:small-caps in the CSS for the text you want in small-caps. Unfortunately, ADE doesn't support this part of the OPS 2.0.1 specification yet, and ADE is what most readers use when rendering ePubs.
|
06-06-2012, 10:59 AM | #12 |
Right, Except When Wrong
Posts: 353
Karma: 3968525
Join Date: Aug 2007
Location: Indianapolis
Device: Kindle Oasis 3 (sometimes iPad Mini).
|
I just changed the CSS definition (it was .43em or such) to 1.0em and everything looks fine now. I'd obviously prefer "real" small caps than just all caps, but at least the text is readable without zooming or squinting (I guess I'm getting old...). Thanks for the help.
|
06-06-2012, 11:06 AM | #13 | |
Resident Curmudgeon
Posts: 73,968
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
.calibre12 { font-size: 75% } |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem "installing" "Kindle library extractor" | dhdurgee | Kindle Developer's Corner | 7 | 11-24-2012 07:09 PM |
small caps problem in Sigil | goroke | Sigil | 16 | 08-05-2011 12:14 PM |
RTF "small caps" conversion? | sehlat | Calibre | 3 | 06-23-2011 07:24 PM |
"A Problem Occurred" on the "Shop" page. | swallman | Nook Color & Nook Tablet | 1 | 12-25-2010 12:34 PM |
Is there a "fix" or work-around for Kindle doubleing size of small graphics? | bfollowell | Amazon Kindle | 15 | 11-14-2010 07:27 PM |