09-17-2009, 11:33 AM | #1 |
Resident Curmudgeon
Posts: 75,981
Karma: 134368292
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, 11:55 AM | #2 |
frumious Bandersnatch
Posts: 7,534
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, 12:00 PM | #3 |
Resident Curmudgeon
Posts: 75,981
Karma: 134368292
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, 12:26 PM | #4 |
frumious Bandersnatch
Posts: 7,534
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, 08:16 AM | #5 |
Resident Curmudgeon
Posts: 75,981
Karma: 134368292
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, 11:06 AM | #6 |
frumious Bandersnatch
Posts: 7,534
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, 12: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, 03:35 AM | #8 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
|
05-30-2016, 11:47 PM | #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, 12:24 AM | #10 |
Unicycle Daredevil
Posts: 13,938
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, 01: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, 06:50 AM | #12 | |
The Grand Mouse 高貴的老鼠
Posts: 72,236
Karma: 309000000
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, 07:02 AM | #13 | |
Unicycle Daredevil
Posts: 13,938
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, 08:26 AM | #14 | |
The Grand Mouse 高貴的老鼠
Posts: 72,236
Karma: 309000000
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 08:33 AM. |
|
05-31-2016, 11:12 AM | #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. |
|
Thread Tools | Search this Thread |
|