Bug 695922 - mupdf-1.7rc1 epub and css style problem with src: url(...) syntax
Summary: mupdf-1.7rc1 epub and css style problem with src: url(...) syntax
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: mupdf (show other bugs)
Version: unspecified
Hardware: PC NetBSD
: P4 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks: 695935
  Show dependency tree
 
Reported: 2015-04-13 10:59 UTC by Leonardo Taccari
Modified: 2015-05-02 11:34 UTC (History)
4 users (show)

See Also:
Customer:
Word Size: ---


Attachments
Wu Ming - Armata dei Sonnambuli (1.13 MB, application/epub+zip)
2015-04-13 10:59 UTC, Leonardo Taccari
Details
wrong font-face display (61.27 KB, image/png)
2015-04-29 09:55 UTC, Pablo Rodríguez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo Taccari 2015-04-13 10:59:33 UTC
Created attachment 11580 [details]
Wu Ming - Armata dei Sonnambuli

After reading mupdf-1.7rc1 changelog I had locally updated the
print/mupdf package that we have in pkgsrc to the 1.7rc1 release.

Previous feature works and so I was curious to test the new EPUB support
integrated in MuPDF.
Trying the following epub (Wu Ming - Armata dei Sonnambuli, freely
available here:
http://www.wumingfoundation.com/italiano/Wu_Ming_Armata_dei_Sonnambuli.epub
) I get the following error:

    $ mupdf Wu_Ming_Armata_dei_Sonnambuli.epub 
    epub: found root: OEBPS/content.opf
    epub: found outline: OEBPS/toc.ncx
    epub: found spine OEBPS/Text/content0001.xhtml
    error: css syntax error: unexpected character
    (OEBPS/Styles/style001.css:6)
    mupdf: error: cannot open document

Looking to the problematic CSS file I can see the following (only the
first lines causes the error):

    $ head -n 15 OEBPS/Styles/style001.css
    @namespace h "http://www.w3.org/1999/xhtml";
    @font-face {
    font-family: "DejaVu Serif";
    font-weight: normal;
    font-style: normal;
    src: url(../Fonts/DejaVuSerif.ttf);
    }
    
    
    @font-face {
    font-family: "DejaVu Serif";
    font-weight: normal;
    font-style: italic;
    src: url(../Fonts/DejaVuSerif-Italic.ttf);
    }

On #ghostscript channel Robin Watts kindly suggested to change the
url(.*) to the ".*" syntax and I can confirm that it works.
For completeness here the mupdf messages after the change described
above:

   $ mupdf Wu_Ming_Armata_dei_Sonnambuli-nourl.epub 
   epub: found root: OEBPS/content.opf
   epub: found outline: OEBPS/toc.ncx
   epub: found spine OEBPS/Text/content0001.xhtml
   epub: found spine OEBPS/Text/content0002.xhtml
   epub: found spine OEBPS/Text/content0003.xhtml
   epub: found spine OEBPS/Text/content0004.xhtml
   [...]
   epub: found spine OEBPS/Text/content0082.xhtml
   epub: found spine OEBPS/Text/Section0001.html
   epub: done.
   epub: laying out chapters.

I will attach the original .epub in this bug report (it is freely
sharable).
It seems that url(...) syntax is present also in other EPUBs.

For more information you can also give a look to the IRC log of today:

 http://ghostscript.com/irclogs/2015/04/13.html


If you need more information or testing a patch regarding that feel free
to contact me!


Thank you very much for your attention and keep up the good work!
Ciao,
L.
Comment 1 Leonardo Taccari 2015-04-14 08:54:50 UTC
Fixed by Tor Andersson in commit 1bc74dac2b251764d373c164e2b5235875f27901 .

Thank you very much!
L.
Comment 2 Pablo Rodríguez 2015-04-29 09:55:36 UTC
Created attachment 11633 [details]
wrong font-face display

(In reply to Leonardo Taccari from comment #1)
> Fixed by Tor Andersson in commit 1bc74dac2b251764d373c164e2b5235875f27901 .

Leonardo,

I’m afraid that the bug isn’t fixed. I least I experience it with current master in Linux.

The attached image shows the display with mupdf-x11 on the left and the display with ebook-viewer from calibre-2.26 on the right.

Only ebook-viewer selects the right font-family. mupdf-x11 from current master seems to ignore it.

Could you reopen this bug?

Many thanks,


Pablo
Comment 3 Leonardo Taccari 2015-04-29 10:34:25 UTC
Hello Pablo,
is it not better to open a new bug? Especially if it is not strictly related to the url(...) syntax.

Please let me know what you think, otherwise I will reopen this bug.


Thank you!
Ciao,
L.
Comment 4 Robin Watts 2015-04-29 10:50:26 UTC
Please open a new bug, and attach the smallest example you can find.

Thanks.
Comment 5 Pablo Rodríguez 2015-05-02 11:34:16 UTC
(In reply to Robin Watts from comment #4)
> Please open a new bug, and attach the smallest example you can find.

Just reported in http://bugs.ghostscript.com/show_bug.cgi?id=695936#c1.