Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 02-15-2018, 10:21 AM   #1
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: 52,215
Karma: 45960469
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Aura H2O, Sony PRS-650, Sony PRS-T1, nook STR, iPad 4, iPhone 5
Scaling graphics

Does anyone have or can point to ePub 2 code that will scale bitmap and SVG graphics when the font size is changed? Thanks.
JSWolf is offline   Reply With Quote
Advert
Old 02-15-2018, 12:54 PM   #2
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: 10,983
Karma: 12294882
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
Quote:
Originally Posted by JSWolf View Post
Does anyone have or can point to ePub 2 code that will scale bitmap and SVG graphics when the font size is changed? Thanks.
If the image is inline it will normally scale. This is the only case I know of.

Dale
DaleDe is offline   Reply With Quote
Old 02-15-2018, 01:18 PM   #3
doubleshuffle
Flying Wheels
doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.doubleshuffle ought to be getting tired of karma fortunes by now.
 
doubleshuffle's Avatar
 
Posts: 11,245
Karma: 104260499
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD
I use em for height and width in graphics for initials. That makes them scale with the text.

Code:
<div class="lettrine">
    <svg xmlns="http://www.w3.org/2000/svg" height="8em" preserveAspectRatio="xMidYMid meet" version="1.1" viewBox="0 0 400 402" width="8em" xmlns:xlink="http://www.w3.org/1999/xlink"><image width="400" height="402" xlink:href="../Images/initial-d.png"/></svg>
  </div>
Code:
.lettrine {float: left;	margin: 1.1em 0.5em -0.1em 0;}
doubleshuffle is offline   Reply With Quote
Old 02-15-2018, 11:38 PM   #4
Tex2002ans
Guru
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: 996
Karma: 5860817
Join Date: Jul 2012
Device: Nook
Quote:
Originally Posted by JSWolf View Post
Does anyone have or can point to ePub 2 code that will scale bitmap and SVG graphics when the font size is changed?
Way back in 2013, we discussed this when someone wanted to put the "Apple" symbol in their EPUB:

Apple symbol and other special characters in ePub

There are sample EPUBs with scaling images and SVGs with font size.

RbnJrg has also written quite a bit on SVGs with code examples. If you do a search for "RbnJrg SVG", you should be able to come across many of his examples (Dropcaps, Scaling Tables, Images with Captions, [...]).

Last edited by Tex2002ans; 02-15-2018 at 11:47 PM.
Tex2002ans is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
UI Scaling 4K khashyarkh Calibre 2 10-21-2016 06:29 AM
Scaling up an image via SVG Kayto ePub 27 01-26-2013 03:38 AM
problem scaling images paola ePub 11 05-12-2011 02:20 AM
Font scaling DCotton Calibre 1 02-18-2011 11:03 AM
scaling pdfs davec67 Sony Reader 4 10-01-2006 08:07 AM


All times are GMT -4. The time now is 10:56 AM.


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