Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-07-2014, 03:01 AM   #1
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 124
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
JLius is offline   Reply With Quote
Old 06-07-2014, 03:11 AM   #2
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,082
Karma: 4571547
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by JLius View Post
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?
Yes, just add "font-variant: small-caps;"

Quote:
Or are small caps not supported by the default fonts in the epub reading devices?
It's not "or" but "and"

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.
Jellby is offline   Reply With Quote
 
Enthusiast
Old 06-07-2014, 06:30 AM   #3
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 124
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.
JLius is offline   Reply With Quote
Old 06-07-2014, 08:37 AM   #4
RbnJrg
Evangelist
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 450
Karma: 318994
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by JLius View Post
Right, then I'll have to embed a font. Thanks for the info.
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% */
}
2. In your .xhtml file:

Code:
<p>T<span class="smallcaps">his is a text in small caps</span></p>
Of that way, you are faking small cpas in a form that also works in ADE.

Regards
Rubén
RbnJrg is offline   Reply With Quote
Old 06-07-2014, 08:49 AM   #5
JLius
Village idiot
JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.JLius ought to be getting tired of karma fortunes by now.
 
JLius's Avatar
 
Posts: 124
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 :-)
JLius is offline   Reply With Quote
Old 06-07-2014, 10:19 AM   #6
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 36,668
Karma: 17734032
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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.
JSWolf is online now   Reply With Quote
Old 06-07-2014, 10:39 AM   #7
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,082
Karma: 4571547
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by RbnJrg View Post
Of that way, you are faking small cpas in a form that also works in ADE.
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.
Jellby is offline   Reply With Quote
Old 06-07-2014, 10:44 AM   #8
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,082
Karma: 4571547
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by JLius View Post
Does anybody else here use small caps without embedding a font, or are small caps not often used in epub novels?
I use them sometimes, but most often just set font-variant. I prefer nice code over reader-specific hacks, especially when small caps are not that important.

Quote:
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 :-)
Just use a different reader
Jellby is offline   Reply With Quote
Old 06-07-2014, 01:14 PM   #9
DomesticExtremis
Groupie
DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.DomesticExtremis ought to be getting tired of karma fortunes by now.
 
DomesticExtremis's Avatar
 
Posts: 151
Karma: 319628
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% */
}
and

Code:
<p>T<span class="ssc">HIS IS A TEXT IN SMALL CAPS</span></p>
Basically resize the font across a span.
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
DomesticExtremis is offline   Reply With Quote
Old 06-07-2014, 01:35 PM   #10
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 6,082
Karma: 4571547
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by DomesticExtremis View Post
Code:
<p>T<span class="ssc">HIS IS A TEXT IN SMALL CAPS</span></p>
or, if you have plenty of free time:

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>
to make small only what has to be small.
Jellby is offline   Reply With Quote
Old 06-09-2014, 01:37 AM   #11
GrannyGrump
Persnickity Nitpicker
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 554
Karma: 2593116
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: http://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
GrannyGrump is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

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


All times are GMT -4. The time now is 08:29 PM.


MobileRead.com is a privately owned, operated and funded community.