ebook-convert doesn't handle composite font-sizes

Bug #1348173 reported by qqqqqqqqq9 on 2014-07-24
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
calibre
Undecided
Unassigned

Bug Description

My epub contains "font: normal 0.6em/135% arial,helvetica,verdana,sans-serif"

The font-size information 0.6em/135% does not make it into the final epub, the resulting font is a lot bigger than in the original.

Attach a file demonstrating/reproducing the problem to this bug report. You can do that by clicking the "Add attachment or patch" link at the bottom of the bug's page. If the file you are attaching is copyrighted, mark the bug as private. You can do this by clicking the tiny lock icon next to "This report contains Public information" in the top right area of the bug's page.

 status incomplete

Changed in calibre:
status: New → Incomplete
Kovid Goyal (kovid) wrote :

And note that fonts are resized by the conversion. You
can turn it off via the look & feel section of the conversion dialog.

qqqqqqqqq9 (qqqqqqqqq9) wrote :

An example file is available here.

https://dl.taz.de/epub/demo (08.07)

It is copyrighted, but an issue available for testing purposes, I'm not sure I can attach it without making the bug private. I will do so if you think it neccessary.

Search for "taz E-Book Generator Version 4.00" and compare the relative font-size with the original.

I tried ebook-convert --disable-font-rescaling, but no avail.

I think the problem is in oeb/normalize_css.py

line 128: vals = [x.cssText for x in cssvalue]

breaks it down to:

[u'normal', u'0.6111em', u'135%', u'arial', u'helvetica', u'verdana', u'sans-serif']

And the following loop breaks after recognizing 135% as font-size.

qqqqqqqqq9 (qqqqqqqqq9) wrote :

correction:

Of cause, it breaks it down to:

[u'normal', u'0.6em', u'135%', u'arial', u'helvetica', u'verdana', u'sans-serif']

Fixed in branch master. The fix will be in the next release. calibre is usually released every Friday.

 status fixreleased

Changed in calibre:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers