02-15-2018, 10:21 AM | #1 |
Resident Curmudgeon
Posts: 73,897
Karma: 128597114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
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.
|
02-15-2018, 12:54 PM | #2 |
Grand Sorcerer
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
|
|
02-15-2018, 01:18 PM | #3 |
Unicycle Daredevil
Posts: 13,923
Karma: 185041098
Join Date: Jan 2011
Location: Planet of the Pudding Brains
Device: Aura HD (R.I.P. After six years the USB socket died.) tolino shine 3
|
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;} |
02-15-2018, 11:38 PM | #4 | |
Wizard
Posts: 2,297
Karma: 12126329
Join Date: Jul 2012
Device: Kobo Forma, Nook
|
Quote:
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. |
|
|
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 |