Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 06-14-2014, 06:32 AM   #16
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by MikeWV View Post
No, I have not picked apart the SVG image files, as I haven't figured out how to do that yet.
SVG files are just XML files. You can just open them up with your favorite Text Editor.

Quote:
Originally Posted by MikeWV View Post
Unfortunately, Amazon's image specs are ambiguous and contradictory, so it's hard to tell what they really want and what they'll accept.
Yep, I agree.

SVG works in KF8, and shows up as a blank in the old MOBI format "KF7" (Kindle 1+2+DX). You need a JPG/GIF/PNG fallback.

Since you are going to create the JPG/GIF/PNG anyway, most publishers/converters just settle on the easiest + least labor intensive + least headache method... which "works" across all devices (although as you noticed, if an image of a table gets scaled up/down, the text starts looking like junk).

Quote:
Originally Posted by MikeWV View Post
I've attached my largest table and a chart in SVG format as requested. I've also attached a smaller SVG table and a PNG version of the large table that is low resolution and sized for a basic e-reader. When the PNG image is presented at dimensions that match the image dimensions, it looks good and is actually legible on my Kobo Touch. The files are in a zipped folder, as SVG is not a valid type for uploading.
Fantastic, thanks so much. Examples are a HUGE help!

Side Note: Fantastic work by the way, this is DEFINITELY better than a bunch of the crap that I get. SVG/Vector Graphs are a HUGE PLUS (you would be surprised how much JPG trash I have to work through... and then the source document gets lost in the abyss, and you have no way of generating a higher resolution image.... Makes me want to pull my hair out).)

Quote:
Originally Posted by MikeWV View Post
The part of my question that I haven't figured out is how to specify a non-proprietary or generic sans serif font within the SVG files, within the image tag or in the CSS that will override the font that is set in the software presenting the images to a reader. I really need a sans serif font for the larger tables, as tiny serifed fonts are not clear.
I attached an EPUB I put together testing a bunch of different stuff.

I opened up the SVG in a text editor, and spotted this:

Quote:
<tspan
style="font-size:11.03999996px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family:Calibri Light;-inkscape-font-specification:Calibri"
x="0 5.59728 8.3793602 14.039999"
y="0"
sodipodi:role="line"
id="tspan3148">0.00</tspan>
As you can see, it is specifying a font. Anything prefaced with -inkscape can be tossed in the trash, that is only for Inkscape specific stuff if you ever wanted to reimport it back in (useless if you are sticking it in an ebook).

I did a Replace All and replaced everything in RED with what DaleDe mentioned above:

Quote:
<tspan
style="font-size:11.03999996px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family: sans-serif"
x="0 5.59728 8.3793602 14.039999"
y="0"
sodipodi:role="line"
id="tspan3148">0.00</tspan>
This made the table display using a sans-serif font (I also tested on my Nook, and the font was the sans-serif font):

Before: Click image for larger version

Name:	OriginalSVG.png
Views:	238
Size:	24.5 KB
ID:	124132 After: Click image for larger version

Name:	SansSerifSVG.png
Views:	263
Size:	27.5 KB
ID:	124130

When using any non-Calibri fonts, letters ran into eachother (seen in the After picture above).

I wittled the error down to the part marked in BLUE (I think this is specifying an exact location of each letter along the x-axis?):

Quote:
<tspan
style="font-size:11.03999996px;font-variant:normal;font-weight:normal;writing-mode:lr-tb;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;font-family: sans-serif"
x="0"
y="0"
sodipodi:role="line"
id="tspan3148">0.00</tspan>
I changed them almost all to x="0" and it solved a bunch of the characters running into eachother problem:

Click image for larger version

Name:	TweakedSVG.png
Views:	222
Size:	26.5 KB
ID:	124131

The EPUB includes:
  • Your Original SVG
  • An SVG where I implemented the RED change
  • An SVG where I implemented the BLUE change
  • 96dpi + 200dpi + 300dpi images which I generated from your SVG.
  • Original + Blue expanded to 100% width via CSS
    • It seems to overflow off the bottom of the page on thinner devices.
      • Instead of that junky CSS, it would probably be much better to just emulate something along the lines of the typical SVG Cover code, which will stretch to max width and/or max height while keeping the same aspect ratio.
  • HTML Table + a Split HTML Table (with some rough CSS to align/border cells).
    • This table CSS is junk, and doesn't work across devices, do not copy it. I just quickly put it together with no serious testing.
    • Side Note: The SVG information wasn't easily copy/pastable out. So I manually filled in a portion of the table.
      • Point proven... SVG/Images, NOT EASILY COPY/PASTABLE.

Anyway, I had a giant tome written tackling a lot of your statements/questions + a ton of screenshots... but it will take me a while to go through and edit it (and I am too tired currently). I will maybe post it tomorrow/in a few days tackling/discussing a few more of the things that were brought up.
Attached Files
File Type: epub TestSVGTableFonts.epub (341.3 KB, 173 views)

Last edited by Tex2002ans; 06-14-2014 at 06:53 AM.
Tex2002ans is offline   Reply With Quote
Old 06-14-2014, 09:51 AM   #17
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,542
Karma: 6613969
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by MikeWV View Post
I figured out part of the answer to my original question. The font used in the SVG images is the default font of the device on which it is displayed. For example, if I change the default font in Firefox to Calibri, the font in my SVG images is Calibri when I simply open an SVG file or an XHTML file containing an SVG image in Firefox. I also see Calibri in EPUBReader for Firefox. The default font in ADE is apparently Times New Roman and that cannot be changed.

The part of my question that I haven't figured out is how to specify a non-proprietary or generic sans serif font within the SVG files, within the image tag or in the CSS that will override the font that is set in the software presenting the images to a reader. I really need a sans serif font for the larger tables, as tiny serifed fonts are not clear...
When you want to use a custom font (any non-generic font) in a svg image, you have two ways:

1) Use the font of your election in Inkscape and, before saving the file, convert all the svg graph to "paths"; or

2) On the other hand, if you don't want to convert the font to paths, you have to embed it in the ebook where you are going to use that font. But before using it, you have to declare it in the svg graph by using:

Code:
    <defs>
       <style type="text/css">
         <![CDATA[
           @font-face {
              font-family: "MyFont"; /* Of course this name can vary */
              src: url("../Fonts/MyFont.ttf"); /* And here you'll write the font of your election */
           }
         ]]>
       </style>
    </defs>
You have to add that definition before using it in a <text> tag. For example:

Code:
<svg version="1.1"
     xmlns="http://www.w3.org/2000/svg"
     width="155" height="120">
    <defs>
       <style type="text/css">
         <![CDATA[
           @font-face {
              font-family: "Marnie";
              src: url("../Fonts/Marnie.ttf");
           }
         ]]>
       </style>
    </defs>
    <text x="77.5" y="117" style="font-size: 150px; font-weight: bold" font-family="Marnie" text-anchor="middle">T</text>
</svg>
If you are using Sigil, then your .ttf font must be in the Sigil "Fonts" folder and if you are going to use that font only in the svg graph, then is not necessary to include a @font-face declaration in your css stylesheet.

Regards
Rubén

NOTE: Sigil doesn't show the svg embeded fonts (a Sigil bug evidently) but if you open the ePub in ADE, you'll perfectly see your custom font in your svg graph.

Last edited by RbnJrg; 06-14-2014 at 04:56 PM.
RbnJrg is online now   Reply With Quote
Advert
Old 06-14-2014, 10:54 AM   #18
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by MikeWV View Post
I've tried specifying the font family in about six different places, some in the HTML file and a couple in the CSS file, but none have had any effect.

Per the Amazon Kindle Publishing Guidelines, 1/1/14:
3.6.1 Image Guideline #1:
* Use Supported Input Formats The Kindle platform supports GIF, BMP, JPEG, non-transparent PNG, and Scalable Vector Graphics (SVG) images.
* When using images for schemas, charts, tables, maps, or anything that includes text, pay special attention to the legibility of the final image.
* Add images to the source using the standard HTML <img> tag.
* Use a resolution of 300 dpi or 300 ppi for all images.
Good to know that SVG is now supported in Amazon. The font family could be inside the SVG itself as part of the text according to the specs.
Code:
<text x="250" y="150" font-family="sans-serif" font-size="55" fill="blue" >
    Hello, out there
  </text>
Dale

Last edited by DaleDe; 06-14-2014 at 11:07 AM.
DaleDe is offline   Reply With Quote
Old 06-14-2014, 11:27 AM   #19
MikeWV
Connoisseur
MikeWV began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Nov 2013
Device: Kobo Touch
I though I had it but I had opened an old file that had the PNGs rather than the SVGs. So no good news after all.

(I couldn't figure out how to delete my earlier post, so I just edited it.)

Last edited by MikeWV; 06-14-2014 at 11:37 AM. Reason: Delete Earlier Post
MikeWV is offline   Reply With Quote
Old 06-14-2014, 11:52 AM   #20
MikeWV
Connoisseur
MikeWV began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Nov 2013
Device: Kobo Touch
Font Familiy in SVG File

Yes, Dale, the font family is specified in the SVG file for every text element in the file. I opened couple of the SVGs with Notepad++ and looked for a means of specifying the font family universally or forcing the SVG font specification to override the browser/reader default font but struck out.

According to what I read earlier today, applying "font-family: sans-serif" to the parent element should set the font for the SVG. But as I said earlier, it's not working. The parent element is an inline block specified by a CSS class. I tried adding the style to the class but it had no effect. And I tried adding it to the class of the division the inline block is in and within the image tag but neither of them worked either.

I'm going to post my XHTML code and associated CSS for my images. Maybe someone will see something I'm overlooking.
MikeWV is offline   Reply With Quote
Advert
Old 06-14-2014, 12:03 PM   #21
MikeWV
Connoisseur
MikeWV began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Nov 2013
Device: Kobo Touch
SVG Image Code

The following is an example of the code I'm using for my images. Maybe someone will see a reason why applying "font-family: sans-serif" to the parent element is having no effect.

<div class="txcenter">
<p class="imcenter">
<img src="../images/13f01_eff_front_graph.svg"
width="100%"
height="auto"
alt="Efficient Frontier Plot"
title="Efficient Frontier Plot" />
</p>
<p class="figurenum">Figure 13-1</p>
</div>

img {
display: block;
text-indent: 0;
margin-left: auto;
margin-right: auto;
margin-bottom: 0;
}
.txcenter {
text-align: center;
page-break-inside: avoid;
}

.imcenter {
text-align: center;
display:inline-block;
font-family: sans-serif; This has no effect.
}

Any place where font-family has been specified in the CSS it has been specified as normal. I did that so that readers can use their preferred fonts.

.txcenter is the class for the division that contains the inline block. Adding font-family to that class has no effect either.
MikeWV is offline   Reply With Quote
Old 06-14-2014, 01:01 PM   #22
DaleDe
Grand Sorcerer
DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.DaleDe ought to be getting tired of karma fortunes by now.
 
DaleDe's Avatar
 
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by MikeWV View Post
The following is an example of the code I'm using for my images. Maybe someone will see a reason why applying "font-family: sans-serif" to the parent element is having no effect.

<div class="txcenter">
<p class="imcenter">
<img src="../images/13f01_eff_front_graph.svg"
width="100%"
height="auto"
alt="Efficient Frontier Plot"
title="Efficient Frontier Plot" />
</p>
<p class="figurenum">Figure 13-1</p>
</div>

img {
display: block;
text-indent: 0;
margin-left: auto;
margin-right: auto;
margin-bottom: 0;
}
.txcenter {
text-align: center;
page-break-inside: avoid;
}

.imcenter {
text-align: center;
display:inline-block;
font-family: sans-serif; This has no effect.
}

Any place where font-family has been specified in the CSS it has been specified as normal. I did that so that readers can use their preferred fonts.

.txcenter is the class for the division that contains the inline block. Adding font-family to that class has no effect either.
Ah, I do not think inheritance works to another file. Try placing the SVG code inline in the html document instead of as a separate file. However putting the SVG statements inside the SVG itself should have worked. When it is a different document the rules are different.

Dale
DaleDe is offline   Reply With Quote
Old 06-14-2014, 01:48 PM   #23
MikeWV
Connoisseur
MikeWV began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Nov 2013
Device: Kobo Touch
Tex2002ans,

When I refreshed the page this morning, your post was above where I landed after punching F5 and I just now found your post. It will take me a while to digest all of that and see what you did in the attached file.

I appreciate the time and effort you've expended on this issue.

Mike
MikeWV is offline   Reply With Quote
Old 06-14-2014, 10:54 PM   #24
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
There is a serious bug with the SVG tables. If they are too long for the page, they run over to the next page and if they are still too long, you don't see all the rows.

The HTML table splits at whatever rows don't fit and moves them to the next page properly. My suggestion is to forget SVG and stick with HTML for tables.
JSWolf is offline   Reply With Quote
Old 06-15-2014, 01:16 AM   #25
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by MikeWV View Post
I appreciate the time and effort you've expended on this issue.
No problem. SVG has been an area I have been quite interested in, but haven't spent as much time as I would like.

It is definitely an area that isn't well documented/tested in the ebook field.

RbnJrg has definitely fiddled around with it much more than most of us on the boards.

Last edited by Tex2002ans; 06-15-2014 at 01:51 AM.
Tex2002ans is offline   Reply With Quote
Old 06-15-2014, 09:51 AM   #26
MikeWV
Connoisseur
MikeWV began at the beginning.
 
Posts: 54
Karma: 10
Join Date: Nov 2013
Device: Kobo Touch
SVG Table Overflow Bug

Quote:
Originally Posted by JSWolf View Post
There is a serious bug with the SVG tables. If they are too long for the page, they run over to the next page and if they are still too long, you don't see all the rows.
That's not good but's it's good to know. I though the problem was either attributable to my coding or some idiosyncrasy of my Kobo.
MikeWV is offline   Reply With Quote
Old 06-15-2014, 02:19 PM   #27
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by MikeWV View Post
That's not good but's it's good to know. I though the problem was either attributable to my coding or some idiosyncrasy of my Kobo.
Well, if you open up the SVG, you can see the internal measurements of your large table is:

Code:
width="577.20001"
height="789.90002"
To my knowledge, if you just plop the SVG into your ebook, the device will render it at a 1:1 ratio (~577px x ~780px).

If your device does not have enough pixels for that width/height, the image can flow off the edges of the device (just like your typical too large image, that isn't resized via CSS).

I attached a new EPUB with the typical "Cover" SVG Wrapper that many use.

I wrapped it around the table + tweaked the width/height, so now it should resize to fill the entire width/height of the device, while maintaining a proper ratio. (Tested it on my Nook, it works perfect).

Quote:
<svg xmlns="http://www.w3.org/2000/svg" height="100%" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 577 789" width="100%" xmlns:xlink="http://www.w3.org/1999/xlink">
<image height="789" width="577" xlink:href="../Images/13t04_table4_r2v_mat_full.svg"></image>
</svg>
Again, I haven't done extensive testing, and from a quick feed into Kindle Previewer, it did not look like the Kindles liked the code. (Some of the text got mangled).

Side Note: A lot of this talk got me thinking about my SVG Tutorial I had laid the groundwork on... I looked in my notes, and I haven't touched it since February. I should get back on doing thorough research/testing/writing.
Attached Files
File Type: epub TestSVGTableFonts[06.15.2014].epub (340.5 KB, 184 views)

Last edited by Tex2002ans; 06-15-2014 at 02:23 PM.
Tex2002ans is offline   Reply With Quote
Old 06-15-2014, 05:20 PM   #28
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
After viewing the new test ePub from tex2002ans, I issues with both SVG and HTMLbtables.

I made the size of my ADE window smaller.

The SVG table in the SVG wrapper did work as expected, but because it fit the entire table on screen at once, it was too small to read.

The HTML table was good to read until I increased the font size to be too large to fit width wise without going past the edge of the window. But if the font size was not too large, it displayed best because it was more readable and the rows that didn't fit dropped to the next page (and so on).

So in either case, there are issues. If it's a small enough and simple enough table, SVG could work. HTML could work as well.

The font size did not change with the SVG table in the SVG wrapper. I could change the font size with the HTML table.

Given that you don;t know the font size nor the screen size, the HTML table is a better option. Especially when reading on a cell phone screen such as an iPhone. As for a 6" eInk screen, I would say again, the HTML table is better. given how many rows are in the SVG table, it would come out smaller and harder for to read. The HTML table as long as the font size is not too large to go off the side of the screen, it's the winner.
JSWolf is offline   Reply With Quote
Old 06-15-2014, 09:43 PM   #29
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
Quote:
Originally Posted by JSWolf View Post
The SVG table in the SVG wrapper did work as expected, but because it fit the entire table on screen at once, it was too small to read.
Indeed, this goes back to my first post where I mentioned it is just physically "impossible" for a very large table to fit on a very small device. The text just becomes impossibly small to read.

And while you would HOPE that your readers would choose a more suitable device for non-fiction, technical works (tablets, PCs, etc. etc.), you can't guarantee that...

Potential pro for bitmap image: Now, depending on your device, SOME of them allow you to click on a JPG/GIF/PNG, and get a full-scale version of the image, which you can then scroll around. This might be a case where a large table might MIGHT beat out a comparable SVG. I do not believe these devices can allow you to do the same thing via SVG (expand + scroll).

Pro for SVG: On devices that do not have such capabilities, the legibility of the text in the SVG image would DESTROY the shrunken JPG/GIF/PNG (image resizing algorithms on typically do HORRENDOUSLY on text).

Quote:
Originally Posted by JSWolf View Post
The HTML table was good to read until I increased the font size to be too large to fit width wise without going past the edge of the window. But if the font size was not too large, it displayed best because it was more readable and the rows that didn't fit dropped to the next page (and so on).
Yep, that specific Split Table broke the ol' "4-column rule" (it was 5 columns). This is something where you have to logically break up the tables on a case-by-case basis depending on what data is inside, while still maintaining comprehension.

For that specific table, there was the "Weights" spanning 4 columns + the "Portfolio Number"... it would be QUITE odd having Portfolio Number + 3 of the 4 "Weight"s. And then the 2nd Table with "Portofolio Number" + 1 "Weight" + the rest of the data.

This again goes back to the pro/con balancing scale... Coming up with the best way to transfer a table to be readable on a smaller device.... sometimes it is just not possible to logically split the data while maintaining comprehension.

Side Note: And here we come back to the balancing scale. Most just settle on making a bitmap image of the table, and screw the disadvantages, it works "good enough" It takes about two seconds to generate an image (and IS compatible with nearly every device).... but it takes a lot more hard work trying to make books more accessible/user/reader friendly!

Quote:
Originally Posted by JSWolf View Post
The font size did not change with the SVG table in the SVG wrapper. I could change the font size with the HTML table.
Also, you have to keep in mind the other advantages of the HTML table. For example, I would say THIS:

Click image for larger version

Name:	SplitHTMLTable[CalibreBlackRed].png
Views:	235
Size:	26.3 KB
ID:	124231 Click image for larger version

Name:	SplitHTMLTable[ADE].png
Views:	229
Size:	29.9 KB
ID:	124232

is better than this:

Click image for larger version

Name:	OriginalSVG[CalibreBlackRed].png
Views:	236
Size:	14.5 KB
ID:	124233 Click image for larger version

Name:	OriginalSVG[ADE].png
Views:	232
Size:	42.2 KB
ID:	124234

(Notice the SVG text is specified as black... Black on black, no good!).

and here is a screenshot of the 96dpi image of the table:

Click image for larger version

Name:	96dpiImage[ADE].png
Views:	228
Size:	59.6 KB
ID:	124235 Click image for larger version

Name:	96dpiImage[CalibreBlackRed].png
Views:	237
Size:	64.6 KB
ID:	124236

This is an example of the disadvantage of going the image route... while it looks fine on white background + black text, it begins to fall apart when the user decides to use anything else as their background colors.

And sure, sure, the HTML table I made isn't as pretty... but it follows user preferences. The HTML table can change font size/color, and scale to quite a large font size on the same size screen (comparable to the image/SVG).

Also, your book will become much more accessible to a person with poor eyesight (this is one of the FANTASTIC advantages of ebooks compared to their (crappy) physical counterparts!).

Quote:
Originally Posted by JSWolf View Post
Given that you don;t know the font size nor the screen size, the HTML table is a better option. Especially when reading on a cell phone screen such as an iPhone. As for a 6" eInk screen, I would say again, the HTML table is better. given how many rows are in the SVG table, it would come out smaller and harder for to read. The HTML table as long as the font size is not too large to go off the side of the screen, it's the winner.
You could also do something like split your really large tables into smaller SVG files. Maybe 15/20 rows each. This would allow the entire SVG to expand slightly larger, potentially giving slightly bigger text.

Last edited by Tex2002ans; 06-15-2014 at 09:48 PM.
Tex2002ans is offline   Reply With Quote
Old 06-15-2014, 10:00 PM   #30
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 73,957
Karma: 128903250
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I'd still stick with the HTML. Try it on an iPhone with Bluefire and if it works well enough, go for it. But don't forget to try larger font sizes until it breaks to see if you can go large enough. I mean one thing the reader can do is when the reader gets to the table, reduce the font size for the table. Then increase again for the rest of the book.
JSWolf is offline   Reply With Quote
Reply

Tags
charts, images, svg, tables


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
A problem with images inside tables RbnJrg ePub 2 10-28-2013 09:09 PM
can I use SVG images in mobi? sarah_pnix Kindle Formats 4 01-07-2013 04:21 PM
Q: Tables, images, and word-wrap AndrewH Workshop 2 12-22-2010 02:34 AM
PDF conversion which respects images/tables? fivebells Amazon Kindle 9 12-19-2010 11:18 AM
tables or svg? bobcdy ePub 18 12-06-2010 02:24 PM


All times are GMT -4. The time now is 11:50 PM.


MobileRead.com is a privately owned, operated and funded community.