Thread: Small caps
View Single Post
Old 02-22-2013, 10:18 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: 7,550
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
If you don't want to modify the text and you want all letters (uppercase or lowercase) the same size, you could use text-transform, but that's not a supported property in the ePub spec, so it's very unlikely to work in real-world readers:

Code:
span.smallcap {
  text-transform: lowercase;
  font-variant: small-caps;
  font-weight: bold;
}
or

Code:
span.smallcap {
  text-transform: uppercase;
  font-size: 80%;
  font-weight: bold;
}
When real small caps are available and supported (very rare), the first option is preferred, as a smallcapped "a" is not the same as a smaller "A" (the stroke thickness should not be scaled down, for example). But most readers just ignore font-variant, so the second option, although, sub-optimal, is more likely to work.

In any case, as I said, text-transform is not required in the spec, so don't rely on it. If you really need uppercase or lowercase text, just modify the text. But I guess in this case it's only a secondary aesthetic choice, and not much is lost if a given reader ignores the text-transform.
Jellby is offline   Reply With Quote