readium / readium-sdk

A C++ ePub renderer SDK
BSD 3-Clause "New" or "Revised" License
383 stars 164 forks source link

SVG rendering on Android app based on Readium SDK #308

Open garconvacher opened 6 years ago

garconvacher commented 6 years ago

Hi, There's an issue with SVG files on Android.

(edit: I've maid a mistake in my epub)

danielweck commented 6 years ago

cc @rkwright

JayPanoz commented 6 years ago

So I can confirm the issue will apply to background-image as well when it’s SVG (JPG, GIF, etc. are OK), on every Android app I know is using the SDK I could test.

I’ll try to provide a sample ASAP.

garconvacher commented 6 years ago

Screenshot in Lea Reader

screenshot_20180316-150539

JayPanoz commented 6 years ago

So here you go, test file for the background-image case: https://www.dropbox.com/s/t1bkxptt4ptwk59/svg-sample.epub?dl=0

@garconvacher Please feel free to re-use this file and add your use case.

In the following screenshots, when you’re seeing whitespace, there should be a dinkus a.k.a. * * * displayed (SVG background image).

Here is a control capture:

capture d ecran 2018-03-16 a 15 48 37

So, from quick testing, apps using the SDK consistently fail at rendering the SVG on Android…

screenshot_2018-03-16-15-26-20

screenshot_2018-03-16-15-27-30

screenshot_2018-03-16-15-28-41

screenshot_2018-03-16-15-29-18

On iOS, it may or may not work depending on the app so I’m correcting my previous statement…

WKWebView seems to be fine…

photo 16-03-2018 15 34 32

UIWebView is not…

photo 16-03-2018 15 37 53

Which brings the question: could that be a WebView issue?

In this case, I’m afraid that will impact Readium2 as well…