04-22-2012, 07:02 AM | #1 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Problem with font
Hi all,
I have a problem with line spacing of an embedded font in an ePub file (attached). The font is Roman Antique. The problem is that this font appears with very tight line spacing (actually overlapping lines) when I test the XHTML files in Opera. In my Cybook Orizon reader (using Adobe renderer) the spacing looks better, but when I select text using this font, only the bottom half or so of each line is marked. This, by the way, also happens in Opera, but with the top half. I'd say there's something wrong with the height definition of this font, but I've tried opening it in FontForge and can't find where the problem is. So, I humbly ask for help in finding and fixing the cause of this behaviour. |
04-22-2012, 08:48 AM | #2 |
Evangelist
Posts: 450
Karma: 343115
Join Date: Nov 2009
Location: Romania
Device: PW2 2014
|
There's a marker that draws a baseline for the bottom half of characters such as p, j, q, g, etc., and it looks like it's right in the middle of the characters.
Here's Arial, Times New Roman, and your font: A - Ascender C - Caps height x - Character height D - Descender I don't remember how to do this in FontForge, but I can tell you how to change it using TypeTool 3 (Windows): Right click the "D" line, choose "Properties" and set it from 333 to -333. This looks like an exact match for the "g" character. Then go to File, Generate Font and select Open Type. Even though I use Arch Linux as my main OS, I always thought that FontForge was fugleeee (emphasis on the eeee). It's why I keep a virtual machine with TinyXP around, for situations like this. Last edited by DSpider; 04-22-2012 at 09:31 AM. |
Advert | |
|
04-22-2012, 12:09 PM | #3 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Thanks, that gives me something to look at. I believe this is the relevant part of FontForge: http://fontforge.sourceforge.net/fon...ml#TTF-Metrics
But I can't say I'm being successful at fixing it. Maybe it's only because Opera doesn't reload the font file when it changes, but I've tried changing the filename every time too. Could you change the two files in the sample ePub (regular and italic) and upload them? Maybe if I see the differences I can learn something. ---- Nevermind, I did it. I changed all offsets to 0 (they had some seemingly random values). Last edited by Jellby; 04-22-2012 at 01:34 PM. |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem with font | bobcdy | Workshop | 12 | 09-21-2011 12:53 PM |
Problem with font weights | taskforsome | Calibre | 0 | 09-22-2010 02:33 PM |
Another font embedding problem | b.tarde | EPUBReader | 12 | 03-11-2010 01:40 PM |
Font problem | DNT | PocketBook | 19 | 01-20-2010 08:58 AM |
problem with embedded font | ericshliao | EPUBReader | 2 | 12-11-2009 10:04 AM |