Quote:
Originally Posted by mtrahan
But still there must be something I'm doing wrong (long story). What's the good way to add the .svg image so that it appears inline with the text (ie. I want to downsize it so that it is just the size of a letter in the middle of a paragraph)? Style an image class with something like "height: 1em;"? Or there is a better way?
|
Sorry, I don't know more details... SVG is one area where I don't have any experience.
Just wanted to toss it out there that using SVG is also a choice when dealing with odd characters/symbols.
I would say embedding a subsetted font would be the MOST COMPATIBLE bet. More devices/programs support font-embedding than those that have proper SVG support... and to my knowledge, the Kindle formats, and iBooks, don't support SVG. Also going the SVG route would need some sort of relevant fallback anyway.
Also, let us say you wanted to use a tool (like Calibre) to convert from EPUB -> DOC. I bet Calibre would handle the font-embedded Apple character fine... while an Apple SVG... who knows what would happen.
Quote:
Originally Posted by mtrahan
EDIT: OK, styling an image class with "height: 1em;" just doesn't work in iBooks. I end up with a giant apple... Argh.
|
And
if all else fails (even the font embedding), I generated a (quite large) PNG from that Wikimedia SVG that you can scale down to 1em.
To generate the Apple PNG: I used Inkscape (exported as a 600px wide PNG) -> GIMP (stripped transparency and made grayscale) -> Export as PNG -> Ran the PNG through ScriptPNG to optimize it.
I haven't tested it in a long while, but last time I did something similar (if I remember, it had to deal with formulas needing to be in-line), scaling the image down to 1em worked on ADE + Kindle.
Here is the code from the test EPUB:
Code:
<p>This is a lot of sample text with the apple <img alt="" class="apple" src="../Images/ApplePNG.png" />.</p>
<p class="double">This text is <img alt="" class="apple" src="../Images/ApplePNG.png" /> 2em.</p>
Here is the CSS:
Code:
img.apple {
height: 1em;
}
p.double {
font-size: 2em;
}
Here are the sample images. First = 100% scale, Second = 200% scale:
