![]() |
#1 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2011
Device: none
|
small caps problem in Sigil
I've been fighting with this for a couple of weeks, now... I had given up for a while and done the usual work-around, but tonight I got annoyed and started trouble-shooting -- and I found what is tripping the problem.
I have this huge CSS that I use for almost everything, and I keep adding things in as I run into new styles I want to use. When I added the code for small caps, most of the page went small caps; it didn't stop with the </span> tag. And it was random, changing as I zoomed in and out. And it wasn't just the display on Sigil -- when I opened the saved file in Calibre's e-book reader, the same problem carried over. The code for this is standard: span.smcap { font-variant: small-caps; } So I built a new style sheet, definition by definition, and with a bare minimum everything looked fine with the small caps. When I added in my basic paragraph definition, the problem was there again. It's not a complex definition. Here's the code: p { margin: 0em; margin-top: 0em; margin-bottom: 0em; text-indent: 1.5em; text-align: justify; } First I removed the margin and indent lines all at once, but the problem was still there. So I put them back and took out the justification line -- and the problem disappeared. So now that I know the what of the problem, can anyone explain the how? And is there any way to fix this? |
![]() |
![]() |
![]() |
#2 |
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 718
Karma: 1085610
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-T1, 1825PT, Galaxy Tab, One X, TF700T, Aura HD, Nexus 7
|
I also get this if I use small caps.
They display fine when I read the book in my readers, I believe this is just a display issue in Sigil due to (I think) it's use of Qt. It's nothing to worry about as your book will be fine. Just wish it could be fixed though as it makes checking the book quickly a bit difficult. |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Change the smallcaps to, say, red colour. If everything looks fine, there's nothing wrong with the coding and it's just a display issue in Sigil/Calibre.
|
![]() |
![]() |
![]() |
#4 |
Sigil & calibre developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
|
![]() |
![]() |
![]() |
#5 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2011
Device: none
|
Ah, okay... is there any chance this will be corrected in future versions?
And let me say right here how much I love working with Sigil! |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,082
Karma: 144284144
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Code:
span.smcap { font-variant: small-caps } |
![]() |
![]() |
![]() |
#7 |
Sigil & calibre developer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 2,487
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
If I remember correctly small caps is not part of the EPUB spec. So support for it I'd hit or miss depending on the viewing application.
|
![]() |
![]() |
![]() |
#8 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,082
Karma: 144284144
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#9 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,897
Karma: 60358908
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
I joust looked at OPS 2.0.1 spec and it says Font-Variant small-caps support is required
|
![]() |
![]() |
![]() |
#10 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2011
Device: none
|
Well, I did some poking around, and the one reader that handles all the formatting correctly is the EPUB plugin for Firefox. Several others simply ignore the small caps, which is okay... it's the weird display in both Sigil and the Calibre reader that had me freaked out.
Since I am mostly self-teaching on epub coding, the project I am working on (two volumes of H. G. Wells) are for my own on-screen reading enjoyment -- though after scanning and copy-editing two versions of The Time Machine, I may never actually want to read the thing again. |
![]() |
![]() |
![]() |
#11 | ||
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,543
Karma: 19001583
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Unless the small-caps are critical, I prefer leaving the font-variant and hoping it will be supported at some point in the future. ADE supports hyphenation and ligatures now, so maybe it's not a lost cause. Quote:
|
||
![]() |
![]() |
![]() |
#12 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,082
Karma: 144284144
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
I'll have to give small-caps a go in ADE 1.8 preview an see if it actually works.
|
![]() |
![]() |
![]() |
#13 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
|
|
![]() |
![]() |
![]() |
#14 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
I am not surprised it still doesn't work. It isn't flashy enough to fix...
|
![]() |
![]() |
![]() |
#15 |
Member
![]() Posts: 10
Karma: 10
Join Date: Jul 2011
Device: none
|
Well, after reading all the suggestions, and thinking about it, I came up with a kludge that may be inelegant, but is the best solution I can think of...
I rewrote my CSS code to: .smcap { text-transform: uppercase; font-size: 75%; } .smcap-for_real { font-variant: small-caps; } Then I went back into the pages and changed all my <span class="smcap"> tags so they only wrapped around the letters to be affected. Right now, it appears as though more reading programs support the "text-transform" code than the correct "font-variant:small-caps" code. Then, if the readers should, in the future, not freak out over small-caps, then I can just change one line of code in the CSS and it will do things the proper way. Of course, those devices that don't support the "text-transform" code will see things in normal mixed case (with some font-size reduction on the "small caps"), but I guess you can't have everything... Last edited by goroke; 08-05-2011 at 03:21 AM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
RTF "small caps" conversion? | sehlat | Calibre | 3 | 06-23-2011 07:24 PM |
small caps | yuxi_kelly | ePub | 20 | 06-05-2011 12:04 AM |
Small problem with Newegg | GA Russell | Ectaco jetBook | 10 | 10-30-2010 12:03 AM |
iLiad Welcome back - small(?) Problem | FGFuzax | iRex | 14 | 10-01-2010 12:29 PM |
DR1000 FW2.0 - RC2 - font-variant: small-caps | ThR | iRex | 0 | 06-29-2010 05:31 AM |