View Single Post
Old 05-12-2015, 05:11 AM   #4
Abekonge
Scripler Project Lead
Abekonge has met Morla.Abekonge has met Morla.Abekonge has met Morla.Abekonge has met Morla.Abekonge has met Morla.Abekonge has met Morla.Abekonge has met Morla.Abekonge has met Morla.Abekonge has met Morla.Abekonge has met Morla.Abekonge has met Morla.
 
Abekonge's Avatar
 
Posts: 19
Karma: 19304
Join Date: May 2014
Location: Copenhagen, Denmark.
Device: Gameboy Color
Are you asking about having the svg-files directly in spine?

Or whether to add the svg to the html file as a file or as xml (with the <svg> tags)?

I have had good results with adding svg as images in the html files, inside svg tags (yes it's hacky)- it seems to be supported on most reader systems (e.g. ADE3 - I ignore ADE 4 as it was so bad in the beginning - but it might have become better). It also works when converting to kindle.

Example:

html (Side_02.html):
Code:
  <div>
    <svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMin" version="1.1" viewBox="0 0 203 297" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
      <image height="297" width="203" xlink:href="../Images/02a.svg"/>
    </svg>
  </div>
Make sure that the viewbox size and the image height + width are the same.

It is a bit of a hack, but it has worked consistently with many different titles - I have mostly used it for faking fixed format poetry in dynamic ebooks.

opf:
Code:
<item href="Text/Side_02.html" id="Side_02.html" media-type="application/xhtml+xml" properties="svg"/>
<item href="Images/02a.svg" id="x02a.svg" media-type="image/svg+xml" />
Abekonge is offline   Reply With Quote