Bug 695937 - font-size isn’t inherited, but inherited and applied again (ePub CSS)
Summary: font-size isn’t inherited, but inherited and applied again (ePub CSS)
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: master
Hardware: Other All
: P4 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks: 695935
  Show dependency tree
 
Reported: 2015-04-18 04:54 UTC by Pablo Rodríguez
Modified: 2015-05-26 06:42 UTC (History)
1 user (show)

See Also:
Customer:
Word Size: ---


Attachments
wrong display of CSS font-size (17.44 KB, image/png)
2015-04-18 04:54 UTC, Pablo Rodríguez
Details
ePub document with title in different font sizes (3.33 KB, application/epub+zip)
2015-04-28 09:47 UTC, Pablo Rodríguez
Details
screenshot showing title with code and emphasis (10.25 KB, image/png)
2015-04-28 09:48 UTC, Pablo Rodríguez
Details
ePub document with relative font size (3.29 KB, application/epub+zip)
2015-05-11 13:34 UTC, Pablo Rodríguez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pablo Rodríguez 2015-04-18 04:54:53 UTC
Created attachment 11599 [details]
wrong display of CSS font-size

The ePub file attached to bug 695935 contains the following CSS code:

    p {
        font-size: 100%;
        }
    
    h1 {
        font-size: 150%;
        }

In the attached image, ebook-viewer from calibre-2.25 displays font-sizes right and mupdf-1.7 doesn’t.
Comment 1 Pablo Rodríguez 2015-04-18 05:08:50 UTC
Sorry, I forgot to mention.

The attached screenshot includes mupdf display on the left and ebook-viewer display on the right.
Comment 2 Pablo Rodríguez 2015-04-28 09:47:50 UTC
Created attachment 11629 [details]
ePub document with title in different font sizes

It seems to be fixed in master, although I found another similar issue.

The title from the attached ePub file contains both italics and monospaced font with are clearly bigger than the rest of the title.
Comment 3 Pablo Rodríguez 2015-04-28 09:48:55 UTC
Created attachment 11630 [details]
screenshot showing title with code and emphasis

The attached image shows the display in mupdf (left) and in calibre (right).
Comment 4 Pablo Rodríguez 2015-05-09 02:53:38 UTC
Although the release notes from mupdf-1.7a include:

    * Fixed EPUB font scaling bug.

I’m afraid that the font switch (to monospace font or italics) in the title results in displaying higher sizes than they should be (as shown at http://bugs.ghostscript.com/attachment.cgi?id=11630).

Many thanks for your help,

Pablo
Comment 5 Pablo Rodríguez 2015-05-11 13:34:01 UTC
Created attachment 11668 [details]
ePub document with relative font size
Comment 6 Pablo Rodríguez 2015-05-11 13:38:19 UTC
Tor,

the new ePub document contains only the following CSS code:

    body {
        font-size: 1.05em;
        }

Instead of inheritance, elements seem to have the font-size setup again for them.

This is why font size is increased by no reason. Even unordered list has a slightly bigger font than the standard paragraph.

Could you fix this?

Many thanks for your help,


Pablo
Comment 7 Pablo Rodríguez 2015-05-16 10:05:01 UTC
Issue has been fixed with commit afa0a2b.
Comment 8 Tor Andersson 2015-05-26 06:42:54 UTC
Yeah, it took a while to iron out all the corner cases of the font-size inheritance. It should work properly now.