06-07-2014, 03:01 AM | #1 |
Village idiot
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
|
Small caps
Hi all
Can you use small caps in your html, without there being an embedded font? If so, how to you refer to in in your css? Or are small caps not supported by the default fonts in the epub reading devices? greetings JLius |
06-07-2014, 03:11 AM | #2 | ||
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Quote:
You can add small caps, but it will most likely not work. Most fonts do not have real small caps, but the renderer in e.g. web browsers can fake the small caps, not perfect but usually good enough. The bad news is that Adobe-based renderers (i.e. most dedicated ebook readers) simply ignores font-variant, no real small caps, no fake small caps, nothing. |
||
Advert | |
|
06-07-2014, 06:30 AM | #3 |
Village idiot
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
|
Right, then I'll have to embed a font. Thanks for the info.
|
06-07-2014, 08:37 AM | #4 |
Wizard
Posts: 1,602
Karma: 7999999
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Not necessarily You can use something like:
1. In your css file: Code:
.smallcaps { text-transform: uppercase; font-size: 80%; /* here you can use any other size you like, maybe 70% */ } Code:
<p>T<span class="smallcaps">his is a text in small caps</span></p> Regards Rubén |
06-07-2014, 08:49 AM | #5 |
Village idiot
Posts: 157
Karma: 519566
Join Date: Mar 2014
Location: Belgium
Device: sony PRS T-1
|
Thanks Rubén. That looks kinda okay for letters, but the digits don't look so hot.
Does anybody else here use small caps without embedding a font, or are small caps not often used in epub novels? What I want is the nuance of using a real font, without the disadvantage of having to impose a font on the reader. But that just might be impossible :-) |
Advert | |
|
06-07-2014, 10:19 AM | #6 |
Resident Curmudgeon
Posts: 75,983
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
To do it such that you get the look and feel of a real small-cap font in ePub, you are going to have to use embedded fonts.
|
06-07-2014, 10:39 AM | #7 |
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
But which is not ePub2-compliant anymore (text-transform is not a required CSS property). And note that spaces, punctuation, and numbers (as JLius mentioned) are also scaled down, something you usually don't want in small caps.
|
06-07-2014, 10:44 AM | #8 | ||
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Quote:
|
||
06-07-2014, 01:14 PM | #9 |
Addict
Posts: 243
Karma: 359054
Join Date: Nov 2012
Device: default
|
The most portable way without using an embedded font is:
Code:
/*synthetic small caps*/ .ssc { font-size: 80%; /* here you can use any other size you like, maybe 70% */ } Code:
<p>T<span class="ssc">HIS IS A TEXT IN SMALL CAPS</span></p> It's carp but it works just about everywhere. One day there will be a standard for standards that requires a compliance test before support for any standard can be claimed |
06-07-2014, 01:35 PM | #10 | |
frumious Bandersnatch
Posts: 7,534
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Code:
<p>T<span class="ssc">HIS</span> <span class="ssc">IS</span> <span class="ssc">A</span> <span class="ssc">TEXT</span> <span class="ssc">IN</span> <span class="ssc">SMALL</span> <span class="ssc">CAPS</span></p> |
|
06-09-2014, 01:37 AM | #11 |
Obsessively Dedicated...
Posts: 3,200
Karma: 34978132
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
Another down-side to using embedded fonts for small-caps -- if you use the small-caps font for only small portions of text, it won't necessarily look well with the user's chosen font.
If you use embedded fonts for the entire body of text, the user is likely to call down maledictions on your head for pre-empting their choice. I do happen to frequently use semi-serif fonts (like Fontin or Marcellus) that "sort of" blend in with either serif or san-serif body text, but it is not the happiest solution. So I try to use them only for fairly isolated small text fragments, like letter salutations and signatures, signs, etc. PS -- I almost forgot another reason for not using multiple spans -- in some ADE-based readers (and others?), moving in and out of spans sometimes causes broken lines. Lots of discussion on this thread: https://www.mobileread.com/forums/sho...d.php?t=232395 Especially see Hitch's post # 26. Last edited by GrannyGrump; 06-09-2014 at 01:53 AM. Reason: add thread link |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kindle and small caps | ricroma | Kindle Formats | 14 | 05-02-2013 04:39 PM |
Small caps | Notjohn | Sigil | 9 | 02-23-2013 10:19 AM |
Small Caps | djulian | Kindle Formats | 2 | 04-05-2012 08:48 AM |
small caps problem in Sigil | goroke | Sigil | 16 | 08-05-2011 12:14 PM |
small caps | yuxi_kelly | ePub | 20 | 06-05-2011 12:04 AM |