Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SVG rendering on Android app based on Readium SDK #308

Open
garconvacher opened this issue Mar 16, 2018 · 4 comments
Open

SVG rendering on Android app based on Readium SDK #308

garconvacher opened this issue Mar 16, 2018 · 4 comments

Comments

@garconvacher
Copy link

garconvacher commented Mar 16, 2018

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

  • SVG aren't rendered in this case:
<img src="my.svg" />
  • SVG are rendered in these cases:
<object data="my.svg" type="image/svg+xml"></object>
<svg>(my.svg code)</svg>

cc @JayPanoz

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

@danielweck
Copy link
Member

cc @rkwright

@JayPanoz
Copy link

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
Copy link
Author

Screenshot in Lea Reader

screenshot_20180316-150539

@JayPanoz
Copy link

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…

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants