Bug 696004 - text-top and text-bottom not working as vertical-align values (ePub CSS)
Summary: text-top and text-bottom not working as vertical-align values (ePub CSS)
Status: RESOLVED FIXED
Alias: None
Product: MuPDF
Classification: Unclassified
Component: epub (show other bugs)
Version: master
Hardware: Other All
: P4 normal
Assignee: MuPDF bugs
URL:
Keywords:
Depends on:
Blocks: 695935
  Show dependency tree
 
Reported: 2015-05-20 12:15 UTC by Pablo Rodríguez
Modified: 2016-04-07 02:50 UTC (History)
2 users (show)

See Also:
Customer:
Word Size: ---


Attachments
ePub with text-top sup and text-bottom sub (3.20 KB, application/epub+zip)
2015-05-20 12:15 UTC, Pablo Rodríguez
Details
mupdf vs. ebook-viewer display (16.81 KB, image/png)
2015-05-20 12:18 UTC, Pablo Rodríguez
Details
ePub with text-top sup and text-bottom sub (3.24 KB, application/epub+zip)
2016-02-10 09:11 UTC, Pablo Rodríguez
Details
mupdf vs. ebook-viewer display (5.62 KB, image/png)
2016-02-10 09:12 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-05-20 12:15:25 UTC
Created attachment 11700 [details]
ePub with text-top sup and text-bottom sub

Tor,

the attached file shows that the following CSS code doesn’t work:

    sup {
        line-height: normal;
        vertical-align: text-top;
        font-size: 75%;
        }

    sub {
        line-height: normal;
        vertical-align: text-bottom;
        font-size: 75%;
        }

mupdf doesn’t place the characters right, when text-top or text-bottom values are selected for the vertical-align property.

Many thanks for your help,

Pablo
Comment 1 Pablo Rodríguez 2015-05-20 12:18:58 UTC
Created attachment 11701 [details]
mupdf vs. ebook-viewer display

mupdf display on the left and ebook-viewer display on the right.

BTW, text-bottom doesn’t seem to be implemented in ebook-viewer from calibre.
Comment 2 Pablo Rodríguez 2016-02-10 09:10:44 UTC
Sebastian,

many thanks for your commit:

commit 93699403812c87a8d96d0029f37134cf86e86205
Author: Sebastian Rasmussen <sebras@gmail.com>
Date:   Tue Feb 2 00:26:01 2016 +0100

    html: Support vertical alignment to top/bottom of parent box
    
    Fixes http://bugs.ghostscript.com/show_bug.cgi?id=696004

I’m afraid I still experience an issue with "vertical-align: text-top". The content isn’t placed any higher than without this property.

"vertical-align: text-bottom" works perfectly fine here.

I attach new versions of the ePub file and display with a clearer sample.
Comment 3 Pablo Rodríguez 2016-02-10 09:11:36 UTC
Created attachment 12319 [details]
ePub with text-top sup and text-bottom sub
Comment 4 Pablo Rodríguez 2016-02-10 09:12:12 UTC
Created attachment 12320 [details]
mupdf vs. ebook-viewer display
Comment 5 Sebastian Rasmussen 2016-02-16 15:07:18 UTC
Thanks for reporting this Pablo. Using your excellent sample files I could easily confirm what you saw. I'll look into it.
Comment 6 Pablo Rodríguez 2016-02-17 22:40:55 UTC
(In reply to Sebastian Rasmussen from comment #5)
> Thanks for reporting this Pablo. Using your excellent sample files I could
> easily confirm what you saw. I'll look into it.

Many thanks for your work with mupdf and your kind words, Sebras.

I cannot contribute code, so I report the issues the best way they may help to developers to fix them :-).
Comment 7 Tor Andersson 2016-04-07 02:50:33 UTC
commit 935f1ba5c2a4c67d98658d72322ae11402d380d0
Author: Tor Andersson <tor.andersson@artifex.com>
Date:   Wed Apr 6 00:05:32 2016 +0200

    epub: Fix vertical-align: text-top and text-bottom.