Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Calibre > Editor

Notices

Reply
 
Thread Tools Search this Thread
Old 05-27-2014, 07:08 PM   #1
grumbles
Addict
grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.
 
grumbles's Avatar
 
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
Problem with font subsetting

The subsetting feature is very useful. It will frequently reduce the space used for fonts by almost 90%. But on occasion it would appear to lose characters from the font. The examples below are with the small cap characters from LinBiolinum_RB. The first image is how the text appears in ADE without subsetting.

If I subset the font the heading looks like this:


With Calibre the result is similar except that the fallback font makes the error more obvious:


Is this a problem with Calibre? Is it an user error? Or what?
grumbles is offline   Reply With Quote
Old 05-27-2014, 07:11 PM   #2
grumbles
Addict
grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.
 
grumbles's Avatar
 
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
Hmm. It would appear that the images in my post have gone AWOL. Is there a way to post images that are located on my machine, the insert image insists on a URL (which then disappeared).
grumbles is offline   Reply With Quote
Advert
Old 05-27-2014, 07:21 PM   #3
BetterRed
null operator (he/him)
BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.BetterRed ought to be getting tired of karma fortunes by now.
 
Posts: 20,567
Karma: 26954694
Join Date: Mar 2012
Location: Sydney Australia
Device: none
Quote:
Originally Posted by grumbles View Post
Hmm. It would appear that the images in my post have gone AWOL. Is there a way to post images that are located on my machine, the insert image insists on a URL (which then disappeared).
@grumbles - Easiest way is to load them as attachments - click the paper clip in Advanced Mode

See also ==>> https://www.mobileread.com/forums/faq...b3_attachments

BR
BetterRed is offline   Reply With Quote
Old 05-27-2014, 11:18 PM   #4
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Font subsetting currently does not support font-variant: small-caps or text-transform: capitalize

Adding support for both of those is certainly possible, but it's a lot of work for relatively rare use case.
kovidgoyal is offline   Reply With Quote
Old 05-27-2014, 11:22 PM   #5
grumbles
Addict
grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.
 
grumbles's Avatar
 
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
Thank you Red!

So here is the first, ADE with no subsetting:

and then with subsetting:

and the with Calibre and subsetted:
grumbles is offline   Reply With Quote
Advert
Old 05-27-2014, 11:24 PM   #6
grumbles
Addict
grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.
 
grumbles's Avatar
 
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
and again, I'll eventually get it right.
Attached Thumbnails
Click image for larger version

Name:	ADE-no subsetting.jpg
Views:	321
Size:	32.7 KB
ID:	123442   Click image for larger version

Name:	ADE-with subsetting.jpg
Views:	316
Size:	32.9 KB
ID:	123443   Click image for larger version

Name:	Calibre-with subsetting.jpg
Views:	313
Size:	47.0 KB
ID:	123444  
grumbles is offline   Reply With Quote
Old 05-28-2014, 12:04 AM   #7
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
Actually, I take it back, I had a look at the font subsetting code and it does automatically preserve small caps substitution rules and the target glyphs, open the subset font in fontforge and check the smcp tables under Element->Font Info->Lookups
kovidgoyal is offline   Reply With Quote
Old 05-28-2014, 12:15 AM   #8
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
And here is what the subset font looks like on my system in the calibre viewer:
Attached Thumbnails
Click image for larger version

Name:	subset.png
Views:	302
Size:	5.7 KB
ID:	123445  
kovidgoyal is offline   Reply With Quote
Old 05-31-2014, 07:06 PM   #9
grumbles
Addict
grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.grumbles ought to be getting tired of karma fortunes by now.
 
grumbles's Avatar
 
Posts: 238
Karma: 1500000
Join Date: Nov 2009
Location: Toronto
Device: Pandigital Novel (Black), T-2 and 3, Nexus 7
Well I've spent a fair bit of time looking at the fonts in FontForge and the their decomilation with ttx and I must admit that I'm in way over my head and I'm far outside my area of competence.

The font in question is LinBiolinum_RB. My first attempt was to copy the small cap glyphs from 0xE091 to replace the lowercase glyphs at 0x0061. This worked in that when I embedded the font, it would appear correctly, or at least it did after I removed the lower case ligatures that looked really funny with the surrounding small caps. When I subsetted the fonts, characters (and glyphs) went missing.

I then exported all the glyphs as svg images and created a new font by importing just the basic alphanumeric characters and punctuation. Again they display correctly and again when I subset them, characters are lost.

To check, I used a set of fonts that included small caps (Charis in this case) and everything was fine when I subsetted them. So there is something wrong with what or how I doing this. This is an area that I know nothing about. Any pointers to more information (other that the FontForge documentation, it is good but doesn't tell me the things I need to know) would be appreciated.
grumbles is offline   Reply With Quote
Old 06-05-2014, 01:11 AM   #10
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,856
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
As I said, your example with Linolium RB works for me, see screenshot I posted. If you can provide a complete epub example file with embedded font that breaks on subsetting, that would help.
kovidgoyal is offline   Reply With Quote
Old 06-17-2014, 02:33 PM   #11
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
What is the code used to get ADE to display small caps from a font that also includes small caps?
JSWolf is offline   Reply With Quote
Old 06-17-2014, 05:36 PM   #12
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by JSWolf View Post
What is the code used to get ADE to display small caps from a font that also includes small caps?
I don't think any current Adobe reader software supports small-caps, does it? In theory, I think the @font-face is supposed to support the font-variant attribute just like it supports font-family, font-weight and font-style.

The only way I know to get true small-caps to work in epubs is to use a separate set of @font-faces for the small-caps-only font files. But you're probably doing that already.

If anyone knows different I'd also be interested to hear about it.
jackie_w is offline   Reply With Quote
Old 06-17-2014, 05:57 PM   #13
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 jackie_w View Post
I don't think any current Adobe reader software supports small-caps, does it? In theory, I think the @font-face is supposed to support the font-variant attribute just like it supports font-family, font-weight and font-style.

The only way I know to get true small-caps to work in epubs is to use a separate set of @font-faces for the small-caps-only font files. But you're probably doing that already.

If anyone knows different I'd also be interested to hear about it.
Yes, I am using a specific version of Charis SIL for smallcaps. On the SIL site is a font tuner that allows you to make a separate font for use as a smallcap font. It works very well. But, if it wasn't for Calibre's subsetting, embedding it along with the full other versions would make for a very large eBook.
JSWolf is offline   Reply With Quote
Old 06-17-2014, 06:10 PM   #14
jackie_w
Grand Sorcerer
jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.jackie_w ought to be getting tired of karma fortunes by now.
 
Posts: 6,212
Karma: 16534894
Join Date: Sep 2009
Location: UK
Device: Kobo: KA1, ClaraHD, Forma, Libra2, Clara2E. PocketBook: TouchHD3
Quote:
Originally Posted by JSWolf View Post
Yes, I am using a specific version of Charis SIL for smallcaps. On the SIL site is a font tuner that allows you to make a separate font for use as a smallcap font. It works very well. But, if it wasn't for Calibre's subsetting, embedding it along with the full other versions would make for a very large eBook.
I'm also using your Charis small-caps font files, but I've never bothered embedding them. I just use @font-faces to reference them as font files sideloaded once per device (Sony, Kobo, Pocketbook, android).
jackie_w is offline   Reply With Quote
Old 06-17-2014, 07:01 PM   #15
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 jackie_w View Post
I'm also using your Charis small-caps font files, but I've never bothered embedding them. I just use @font-faces to reference them as font files sideloaded once per device (Sony, Kobo, Pocketbook, android).
Give my new version a try. I've found a very good program that was able to add kerning and they look even better on eInk now. I would be very interested in your opinion. Thanks.

https://www.mobileread.com/forums/sho...d.php?t=184056

Last edited by JSWolf; 07-19-2016 at 12:38 PM.
JSWolf is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem changing font size using font size key Waylander Conversion 0 10-02-2013 03:30 PM
Font subsetting problem yktan Calibre 5 09-19-2013 11:00 PM
Bug in font subsetting JSWolf Calibre 9 01-17-2013 09:46 AM
Font Problem GeckoFriend Feedback 7 07-18-2012 08:04 AM
ePub Font Subsetting Cygfrydd ePub 2 08-17-2010 08:53 AM


All times are GMT -4. The time now is 11:48 AM.


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