09-17-2009, 12:33 PM | #1 |
Resident Curmudgeon
Posts: 76,357
Karma: 136006198
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
smallcaps how to?
How would I use a smallcap font in an ePub file? Thanks!
|
09-17-2009, 12:55 PM | #2 |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Use "font-variant: small-caps"
... and a reader other than Adobe's Other than that, you'd have to fake them by hardcoding the caps and using a smaller font-size: <span style="font-variant: small-caps">Real smallcaps</span> F<span style="font-size: 80%">AKED SMALLCAPS</span> |
Advert | |
|
09-17-2009, 01:00 PM | #3 |
Resident Curmudgeon
Posts: 76,357
Karma: 136006198
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The font is a smallcaps font already. I just want the ePub to use it.
|
09-17-2009, 01:26 PM | #4 |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Then I guess it's the same as with any other font, at most you'd have to specify the font-variant in the @font-face. You need to define the font in the CSS:
Code:
@font-face{ font-family: "My smallcaps font"; font-variant: small-caps; src: url("../relative/path/to/the/font.ttf") format("truetype"); } body { font-family: "My smallcaps font"; } |
10-01-2009, 09:16 AM | #5 |
Resident Curmudgeon
Posts: 76,357
Karma: 136006198
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Ok, I've got small caps sorted. But one thing you have to do is convert the uppercase of the small caps to lowercase or it just looks like all uppercase. When a book does smallcaps, it just uses some small font size of all caps. So just setting the font does not work. You also have to convert the words to lowercase or upper/lower.
|
Advert | |
|
10-01-2009, 12:06 PM | #6 |
frumious Bandersnatch
Posts: 7,536
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Yes, of course
You could use text-transform:lowercase, if it were supported, but that wouldn't work if there are real uppercase letters mixed with the smallcaps. |
05-24-2016, 01:48 AM | #7 |
Enthusiast
Posts: 29
Karma: 10
Join Date: Oct 2015
Device: kobo
|
text-transform:capitalize; ought to make the first letter of each word capital and every other letter lower case.
:facepalm: sorry, just realised that this thread was rather old... |
05-24-2016, 04:35 AM | #8 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
05-31-2016, 12:47 AM | #9 |
Connoisseur
Posts: 89
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
|
|
05-31-2016, 01:24 AM | #10 |
Unicycle Daredevil
Posts: 13,940
Karma: 185392166
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
All right, now this dead thread is up and walking, we may as well feed it some brainz:
I think I know about all the (im)possibilities of doing smallcaps in epub2; but I have never bothered to find out if they have made it any easier in epub3. Have they? |
05-31-2016, 02:41 AM | #11 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
There are more styling options for ePUB3, but if they are not supported by the manufacturers... |
|
05-31-2016, 07:50 AM | #12 | |
The Grand Mouse 高貴的老鼠
Posts: 72,491
Karma: 309060442
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
The lack of smallcaps support is entirely an implementation problem, rather than a standards one. |
|
05-31-2016, 08:02 AM | #13 | |
Unicycle Daredevil
Posts: 13,940
Karma: 185392166
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
Quote:
Am I getting this right? |
|
05-31-2016, 09:26 AM | #14 | |
The Grand Mouse 高貴的老鼠
Posts: 72,491
Karma: 309060442
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
|
Quote:
ADE is also really bad at supporting selectors. See Section 3.1 It ought to be really simple to specify that the first line of the first paragraph be in smallcaps, with the first letter bold and twice normal size. But ADE doesn't support first-line or first-letter. Last edited by pdurrant; 05-31-2016 at 09:33 AM. |
|
05-31-2016, 12:12 PM | #15 | |
Wizard
Posts: 1,613
Karma: 6718541
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Surface Go & Kindle 3 - Retired: DellV8p, Clie UX50, ...
|
Quote:
@JSWolf: I would think a simple font declaration in the CSS for a styled SPAN in combination with embedding the smallcaps font would work just fine. It should work much like the tags for bold and italic. It would work for any format/device that supported custom fonts and would gracefully fall back to C/LC when either the format lacked support for embedded fonts or the user disabled the use of embedded fonts in their reader. |
|