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 09-17-2009, 11:33 AM   #1
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: 44,277
Karma: 30129784
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
smallcaps how to?

How would I use a smallcap font in an ePub file? Thanks!
JSWolf is offline   Reply With Quote
Old 09-17-2009, 11:55 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,976
Karma: 8443021
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>
Jellby is offline   Reply With Quote
Old 09-17-2009, 12:00 PM   #3
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: 44,277
Karma: 30129784
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
The font is a smallcaps font already. I just want the ePub to use it.
JSWolf is offline   Reply With Quote
Old 09-17-2009, 12:26 PM   #4
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,976
Karma: 8443021
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";
}
Then you have to include the font.ttf file in the epub and add the corresponding line to the <manifest>.
Jellby is offline   Reply With Quote
Old 10-01-2009, 08:16 AM   #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: 44,277
Karma: 30129784
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
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.
JSWolf is offline   Reply With Quote
Old 10-01-2009, 11:06 AM   #6
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,976
Karma: 8443021
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.
Jellby is offline   Reply With Quote
Old 05-24-2016, 12:48 AM   #7
bentleymaniac
Enthusiast
bentleymaniac began at the beginning.
 
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...
bentleymaniac is offline   Reply With Quote
Old 05-24-2016, 03:35 AM   #8
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,131
Karma: 101563375
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Quote:
Originally Posted by bentleymaniac View Post
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...
Not only that, it will not work on ePUB2.
Toxaris is offline   Reply With Quote
Old 05-30-2016, 11:47 PM   #9
mattmc
Connoisseur
mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.mattmc can program the VCR without an owner's manual.
 
Posts: 81
Karma: 185923
Join Date: May 2015
Device: iPad 1/2/Air, K3/PW2/Fire1, Kobo Touch, Samsung Tab, Nook Color/Touch
Quote:
Originally Posted by Toxaris View Post
Not only that, it will not work on ePUB2.
Nor will it be "true" smallcaps. The only way to accomplish true smallcaps are by using a smallcaps font.
mattmc is offline   Reply With Quote
Old 05-31-2016, 12:24 AM   #10
doubleshuffle
Sy. Freudhold Riesenharf
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 8,063
Karma: 64612413
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD
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?
doubleshuffle is offline   Reply With Quote
Old 05-31-2016, 01:41 AM   #11
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,131
Karma: 101563375
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
Quote:
Originally Posted by doubleshuffle View Post
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?
It is format irrelevant I am afraid. All the right tools and possibilities are there for ePUB2. After all, the font-variant small-caps is part of CSS2. However, almost all readers have decided not to add a small-caps variant for their included fonts. So, it is not the format, but the support that is failing.
There are more styling options for ePUB3, but if they are not supported by the manufacturers...
Toxaris is offline   Reply With Quote
Old 05-31-2016, 06:50 AM   #12
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 45,115
Karma: 148194742
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by mattmc View Post
Nor will it be "true" smallcaps. The only way to accomplish true smallcaps are by using a smallcaps font.
It will be true smallcaps if the software displaying the ePub uses true smallcaps from the font, as it should if it is available.

The lack of smallcaps support is entirely an implementation problem, rather than a standards one.
pdurrant is offline   Reply With Quote
Old 05-31-2016, 07:02 AM   #13
doubleshuffle
Sy. Freudhold Riesenharf
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 8,063
Karma: 64612413
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD
Quote:
Originally Posted by pdurrant View Post
It will be true smallcaps if the software displaying the ePub uses true smallcaps from the font, as it should if it is available.

The lack of smallcaps support is entirely an implementation problem, rather than a standards one.
It should work like this, I think: I install a font with a smallcaps variant on my reader (so that I don't just have regular, bold and italic, but also smallcaps as a fourth font file) and then, when I put "font-variant: smallcaps" in the stylesheet for a class of text, that text should be displayed in smallcaps. And that is what doesn't work.

Am I getting this right?
doubleshuffle is offline   Reply With Quote
Old 05-31-2016, 08:26 AM   #14
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 45,115
Karma: 148194742
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Quote:
Originally Posted by doubleshuffle View Post
It should work like this, I think: I install a font with a smallcaps variant on my reader (so that I don't just have regular, bold and italic, but also smallcaps as a fourth font file) and then, when I put "font-variant: smallcaps" in the stylesheet for a class of text, that text should be displayed in smallcaps. And that is what doesn't work.

Am I getting this right?
Yes. The problem is that ADE ignores the font-variant attribute, although it's required to support it according the ePub standard. (See section 3.4 of the 2.0.1 specs.)

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.
pdurrant is offline   Reply With Quote
Old 05-31-2016, 11:12 AM   #15
dwig
Wizard
dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.dwig ought to be getting tired of karma fortunes by now.
 
dwig's Avatar
 
Posts: 1,176
Karma: 2123348
Join Date: Dec 2004
Location: Paradise (Key West, FL)
Device: Current:Dell Venue 8 Pro - Retired:Kindle 3, Clie UX50, T415, ...
Quote:
Originally Posted by mattmc View Post
Nor will it be "true" smallcaps. The only way to accomplish true smallcaps are by using a smallcaps font.
Which the OP said he was using.

@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.
dwig is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump


All times are GMT -4. The time now is 07:18 PM.


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