Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 02-22-2013, 08:53 AM   #1
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
Small caps

A while ago I read an e-copy of Stalin's General, in which the first couple of lines beginning each paragraph were boldface caps but smaller than the usual. I assumed that the small-caps variant would produce that, so I wrote this:

span.smallcap {
font-variant:small-caps;
font-weight:bold;
}

I find however that this variant is for Large & Small caps, and that the small caps are too small.

Can I accomplish what the publisher of Stalin's General did by using a percentage figure? What would the style look like, say at 75 percent?

(I appreciate that this has nothing to do with Sigil, but I don't know where else to ask!)

Thanks - NJ
Notjohn is offline   Reply With Quote
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,516
Karma: 18512745
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
Advert
Old 02-22-2013, 10:27 AM   #3
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
Quote:
Originally Posted by Jellby View Post
Code:
span.smallcap {
  text-transform: uppercase;
  font-size: 80%;
  font-weight: bold;
}
Wolf-bait if I ever saw any.
DiapDealer is online now   Reply With Quote
Old 02-22-2013, 04:58 PM   #4
sjkramer
Connoisseur
sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.sjkramer ought to be getting tired of karma fortunes by now.
 
Posts: 68
Karma: 526028
Join Date: Nov 2009
Location: New York, NY
Device: iphone
Quote:
Originally Posted by Jellby View Post
... so the second option, although, sub-optimal, is more likely to work.
I'm really embarrassed to admit that I've been dealing with this by using <small> directly in the xhtml file. Break it to me, how awful is that?
sjkramer is offline   Reply With Quote
Old 02-22-2013, 05:02 PM   #5
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: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by sjkramer View Post
I'm really embarrassed to admit that I've been dealing with this by using <small> directly in the xhtml file. Break it to me, how awful is that?
Not as awful as you think. You can redefine small in CSS. I use Charis SIL and you can extract a small caps version from the full version. So using Charis SIL as the main font and the small caps version for the small caps, it does look pretty nice. Combine that with Calibre's font subsetting and you have a much smaller ePub with a nice font and true small caps.
JSWolf is online now   Reply With Quote
Advert
Old 02-22-2013, 05:09 PM   #6
DiapDealer
Grand Sorcerer
DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.DiapDealer ought to be getting tired of karma fortunes by now.
 
DiapDealer's Avatar
 
Posts: 27,549
Karma: 193191846
Join Date: Jan 2010
Device: Nexus 7, Kindle Fire HD
I agree. <small> isn't so bad. It's generally believed to be candidate for deprecation eventually, but it's still supported—and as JSWolf mentioned, you can style it with CSS. But personally, I'd probably just use a styled <span> since that's essentially what you'd be turning the <small> tag into for all practical purposes anyway.
DiapDealer is online now   Reply With Quote
Old 02-22-2013, 08:30 PM   #7
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: 73,966
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DiapDealer View Post
I agree. <small> isn't so bad. It's generally believed to be candidate for deprecation eventually, but it's still supported—and as JSWolf mentioned, you can style it with CSS. But personally, I'd probably just use a styled <span> since that's essentially what you'd be turning the <small> tag into for all practical purposes anyway.
The span can also use small as a font size.
JSWolf is online now   Reply With Quote
Old 02-23-2013, 08:38 AM   #8
Notjohn
mostly an observer
Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.Notjohn ought to be getting tired of karma fortunes by now.
 
Posts: 1,515
Karma: 987654
Join Date: Dec 2012
Device: Kindle
How large is <small>? Is it the same size as the small caps in the small-cap variant? (Because they're too small!)

80 percent wont' work?

I'm not trying to use large & small caps. All are the same size. Looks much better that way IMHO.
Notjohn is offline   Reply With Quote
Old 02-23-2013, 09:51 AM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,800
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by Notjohn View Post
How large is <small>? Is it the same size as the small caps in the small-cap variant? (Because they're too small!)

80 percent wont' work?

I'm not trying to use large & small caps. All are the same size. Looks much better that way IMHO.
My device does not do 'smallcaps', so I use all CAPS inside a Span with a 85% font-size. This size difference shows up as 'different' to my eye when displayed next to a full size Cap.
theducks is online now   Reply With Quote
Old 02-23-2013, 10:19 AM   #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: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Notjohn View Post
How large is <small>? Is it the same size as the small caps in the small-cap variant? (Because they're too small!)
That's up to the device/reading app.

When you say "the same size as the small caps" I guess you mean the size "font-variant: small-caps" is rendered in some particular reader/browser. That's, however, far from standard as well. Most readers readers just ignore "font-variant: small-caps" anyway, so I doubt they are "too small", the only problem is they are not caps at all

The easiest is to use <small> and to set

small { font-size: 85%; }

or whatever in the CSS.
Jellby is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Different ways of writing small-caps roger64 ePub 3 11-25-2012 04:51 AM
Small Caps djulian Kindle Formats 2 04-05-2012 08:48 AM
Small-Caps displays in headings but nowhere else... ElMiko Sigil 13 02-14-2012 02:40 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 09:29 AM.


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