|
|
#1 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
|
First time formatting an epub from scratch
I've in the process of formatting some books into decent looking epubs but my xhtml/css skills are a bit limited at present (I'm hoping that developing these books will fix that), and need a bit of help. Well here are my questions. 1. I want to include cover art that scales with the screen size. I believe this is done using SVG, but I've no idea how. 2. One of my books in its pbook form uses a pair of parrallel horizontal lines to the right of every chapter heading. How do I put horizontal lines after the text? I assume I would be putting in image files for the horizontal line. Is it possible to fix their position to be just after the heading text. Would using SVG make it possible to stretch them to go to the far right of the screen regardless of the screen size? 3. How do I embed fonts? I hope someone can point me in theright direction for these, any help would be great.
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free. Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here Currently working on updating some of my Lovecraft work after receiving some corrections |
|
|
|
|
|
#2 | |
|
The Grand Mouse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,910
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
|
A1. Download my ePub sample. That has a resizing cover using SVG. Just unzip it and take a look at the code.
A2. Hmm... I think this can be done using an image file and resizing it non-proportionally. I'll see if I can come up with something. A3. See A1. If you want to embed commercial fonts you'll also want to encrypt them. I've made a Python script that will encrypt embedded fonts to the Adobe specification. Quote:
__________________
Kai Lung Raises His Voice, now available at Amazon and BooksOnBoard A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories. Books I've read in 2013, 2012, 2011, 2010 Last edited by pdurrant; 11-03-2009 at 10:06 AM. Reason: added link for the python script |
|
|
|
|
|
Enthusiast
|
|
|
|
#3 | |
|
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,746
Karma: 21843110
Join Date: Dec 2008
Location: Krewerd
Device: HTC Flyer; BBMini; Sony PRS650
|
And where might I find that epub sample?
__________________
Quote:
|
|
|
|
|
|
|
#4 |
|
Bookaholic
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,491
Karma: 19230583
Join Date: Oct 2007
Location: Minnesota
Device: AuraHD, Nook HD+, Kindle 2,3,T , Opus, TF101, Nexus7, iPT, iPhone5
|
__________________
~Brian "The test of any good fiction is that you should care something for the characters; the good to succeed, the bad to fail. The trouble with most fiction is that you want them all to land in hell together, as quickly as possible." — Mark Twain Get 15GB of cloud space free at Copy.com, plus an extra 5GB free by using this link (I get 5GB free too). |
|
|
|
|
|
#5 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
|
Thanks pdurrant.
I'm not very familier with the SVG code, but a bit of experimentation should help me understand how to use it for my covers. I'm not sure I understand the need to encrypt fonts. I take it this would be only neccessary if it is for a font that isn't free or comes supplied with the OS? Or is it neccessary for me to do this for all fonts I use? I thought my second question may be difficult, any help on that one would be great.
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free. Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here Currently working on updating some of my Lovecraft work after receiving some corrections |
|
|
|
|
|
#6 | |
|
The Grand Mouse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,910
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
|
If you intend to distribute ePubs, for free or otherwise, you need to make sure you have permission from the font's copyright holder before embedding them.
Just having bought a user licence isn't enough, nor are fonts that come with your operating system necessarily free for distribution in ePubs. So - you need to make sure you have permission to distribute the fonts. If you have blanket permission to distribute, you don't need to encrypt them. But for most fonts, you're more likely to get permission to embed the fonts in distributable documents, but not to redistribute the fonts themselves. Since ePubs are essentially zip files, embedding fonts is ePubs without encryption is probably considered redistribution, not embedding, since they can be extracted so easily. So. You'll need to encrypt the fonts you embed in ePubs. Unfortunately, there are two methods of doing that. The Adobe method, which is supported by ADE and all ebook readers that include ADE, and the standard IDPF method, that no reader currently supports. So at the moment, my script uses the Adobe encryption method. ePub is a remarkably new format, and being standards based, change is slow, as there's no one person that can dictate changes. Also, the readers and tools are slow to appear, which si why I needed to roll my own font encryption script. Quote:
__________________
Kai Lung Raises His Voice, now available at Amazon and BooksOnBoard A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories. Books I've read in 2013, 2012, 2011, 2010 |
|
|
|
|
|
|
#7 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
|
Ah, that makes sense.
Well I've got your scripts and will have a crack at it and see if I can't encrypt the fonts. That'll be the next thing I tackle after I've fully understood SVG for book covers (so tommorow then). Any joy on the getting the image files to stretch across the page after the title (my question 2)?
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free. Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here Currently working on updating some of my Lovecraft work after receiving some corrections |
|
|
|
|
|
#8 |
|
The Grand Mouse
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 24,910
Karma: 74252384
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle 2; iPhone 3G; Bookeen Opus; NOOK ST GlowLight
|
I'm not very happy with it, but here's something that seems to work in ADE.
It uses tables (ugh), and the behaviour isn't consistent across renderers. Or even terribly logical. But it's the best I can come up with, since ePub CSS doesn't support the position: attribute. The easiest way to adjust the positioning of the lines is to tweak the graphic. No doubt there's other ways too, to do with vertical alignment in table cells. It might be possible to do something better with an SVG graphic for the entire heading - I haven't looked.
__________________
Kai Lung Raises His Voice, now available at Amazon and BooksOnBoard A new collection of ‘Kai Lung’ stories by Ernest Bramah, including four previously unpublished stories. Books I've read in 2013, 2012, 2011, 2010 Last edited by pdurrant; 11-04-2009 at 08:22 AM. Reason: typos |
|
|
|
|
|
#9 |
|
Guru
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 682
Karma: 1085478
Join Date: Mar 2009
Location: Bristol, England
Device: PRS-600, Acer 1825PT, Galaxy Tab, PRS-T1, HTC One X, TF700T
|
Well thanks for trying anyway.
I'll see how it works in the file and if it's as bad as you say, I might have to try something different or just drop the idea altogether. If it can't be made to match the pbook then it can't be made to match. No use crying over spilt milk (as the saying goes), I'll just have to try something a bit different then. I had a go with trying to position it using CSS and although it partly worked in a HTML file (managed to moved them around and sort of put them in the correct place) but I could never get them to stretch to the far end of the screen on my PC in IE or FF.
__________________
Get 5GB of online storage for free from SugarSync. Click here for an additional 500MB to give you 5.5GB for free. Always have your stuff when you need it with @Dropbox. 2GB account is free! Click here Currently working on updating some of my Lovecraft work after receiving some corrections |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| PRS-650 epub formatting question | scribblenauts | Sony Reader | 11 | 11-01-2010 01:47 PM |
| ePub. Several formatting problems | tibiafry | ePub | 14 | 06-18-2010 11:07 AM |
| Epub formatting | kurt_da_nerd | ePub | 8 | 05-11-2010 02:04 PM |
| ePub to ePub? (preserve formatting) | DrMoze | Calibre | 5 | 03-21-2010 11:25 PM |
| Long 'Formatting...' time | Magnum | Sony Reader | 12 | 07-19-2009 12:15 PM |