Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 04-07-2010, 11:20 PM   #16
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
I made a modified version of TeX Gyre Schola (LPPL) in fontforge, and embedded both the regular version and the modified version in an ePub. Editing the font was easy, since you can set the LBearing/RBearing of an entire span of glyphs in the font with a single command in fontforge. So it only took a couple minutes.

Here's the result. Looks pretty good. There's a minor problem with words at the end of the beginning of the line--see the k e i n e at the end of line 2 and U r s a c h e at the beginning of line 3 and how they're not flush with the edges, but I'm fairly sure I'd have the same problem with spans around each character and adding to the margin. I think I can live with that.



The real problem is with ePub renderers that don't support embedded fonts. I gather this includes the damned iPad! I suppose I could define this font as the italic version of a new font family, so if it has to fall back, it'll fall back on italics, but I seem to remember ADE having a problem whereby it would oblique-ify already italic fonts if they're set as font-style: italic;, resulting in an ugly mess--is my memory off on that?

Thanks again to Charleski for the idea...
Attached Thumbnails
Click image for larger version

Name:	adespacing.png
Views:	445
Size:	84.0 KB
ID:	49442  

Last edited by frabjous; 04-07-2010 at 11:23 PM.
frabjous is offline   Reply With Quote
Old 04-08-2010, 05:59 AM   #17
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 frabjous View Post
but I seem to remember ADE having a problem whereby it would oblique-ify already italic fonts if they're set as font-style: italic;, resulting in an ugly mess--is my memory off on that?
It did the equivalent thing with bold fonts last time I tried, so I bet you are right.
Jellby is offline   Reply With Quote
Advert
Old 04-08-2010, 08:35 AM   #18
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by frabjous View Post
I seem to remember ADE having a problem whereby it would oblique-ify already italic fonts if they're set as font-style: italic;, resulting in an ugly mess--is my memory off on that?
You certainly frightened me there, but it seems this is not the case, thankfully. Here's a line from a book which has Bodoni Twelve OS Book Italic embedded and defined as font-style: italic.



It doesn't look as if ADE is adding any extra angle to the axis, at least in the desktop version. I think you should be safe using standard italic as a fall-back for readers that take the short bus to school, like iBooks (hopefully this was a result of rushing the hardware out before having the OS properly in place and version 4 will fix it).

I hadn't anticipated the problem with line endings. I don't think it looks too bad in the context. You could probably fix it by manipulating the font using the kerning table instead of the sidebearings, so that extra space would be inserted between letters but not between a letter and a space and the size of the letter would remain unchanged. This would be a lot of work though, and you'd have to trust that the reader software will use the kerning table properly.
Attached Thumbnails
Click image for larger version

Name:	italics-in-ADE.jpg
Views:	475
Size:	63.9 KB
ID:	49456  
charleski is offline   Reply With Quote
Old 04-14-2010, 07:49 AM   #19
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by frabjous View Post
but I seem to remember ADE having a problem whereby it would oblique-ify already italic fonts if they're set as font-style: italic;, resulting in an ugly mess--is my memory off on that?
I think you may be confusing it with PrinceXML, which does have this problem (or something similar). Jellby and I talked about it in his epud2pdf thread.
Valloric is offline   Reply With Quote
Old 04-14-2010, 09:18 AM   #20
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Yeah, that could be it. Anyway, everything seems to working just fine for me with the spaced out font (apart from the slight edges issue mentioned earlier which I can live with).

The only problem I'm having now is that embedding this font forces me to embed the corresponding font for the main text, along with bold/italics/bolditalics versions for it, which generally is fine, except that calibre's viewer won't support multiple font variants from the same family (bug with qt webkit apparently). But I'm not sure too many people use calibre's viewer.
frabjous is offline   Reply With Quote
Advert
Old 05-15-2011, 04:08 AM   #21
GMcG
Writer
GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.GMcG ought to be getting tired of karma fortunes by now.
 
GMcG's Avatar
 
Posts: 101
Karma: 590630
Join Date: Mar 2011
Location: Munich, Germany
Device: none
gesperrt

My understanding is, that spacing means a space, following a letter.
So the last letter of the g e s p e r r t word will get a space too, creating the spacing to the following comma.
You should exclude the last letter of the word. It is spaced to the preceeding letter, because that letter has a following spacing, but there is no spacing between last letter and comma.

Instead of
<span style="letter-spacing:3pt">example</span>, xxxxxx
use
<span style="letter-spacing:3pt">exampl</span>e, xxxxxx

George

Last edited by GMcG; 05-15-2011 at 04:16 AM. Reason: update
GMcG is offline   Reply With Quote
Old 05-16-2011, 04:52 PM   #22
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Read the first post: ADE doesn't even support the letter-spacing CSS property.
frabjous is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Small html/css bug twaits Calibre 5 01-12-2010 10:26 AM
HTML and CSS for Dummies weedfreak Sigil 17 01-07-2010 09:34 PM
Problems generating ePub from HTML/CSS AlexBell Calibre 3 07-17-2009 05:10 AM
Supported HTML/CSS tags and properties Jellby Bookeen 9 05-04-2008 04:55 PM
Emphasis Line and Emphasis Dot mcortez Sony Reader 6 01-19-2008 07:19 PM


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


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