Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-23-2009, 01:02 PM   #16
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: 76,531
Karma: 136565488
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
I just ran epubcheck on one of the edited ePub files and it did not have any issue with mimetype.
JSWolf is online now   Reply With Quote
Old 11-27-2009, 05:08 AM   #17
padman
Junior Member
padman began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2009
Device: Cybook Gen3, Cybook Opus, Cool-ER, iRex DR1000, iRex iLiad
Does the compression have to be zip? What if I use another software – eg. 7-zip? And what software do you use for compression on mac?
padman is offline   Reply With Quote
Advert
Old 11-27-2009, 06:39 AM   #18
pdurrant
The Grand Mouse 高貴的老鼠
pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.pdurrant ought to be getting tired of karma fortunes by now.
 
pdurrant's Avatar
 
Posts: 72,555
Karma: 309960766
Join Date: Jul 2007
Location: Norfolk, England
Device: Kindle Voyage
Any zip program that produces a valid zip file should be fine - provided it doesn't add extraneous stuff between filename and file contents.

On the Mac I use the built-in zip command, controlled with an AppleScript to make it a drag&drop operation.

Quote:
Originally Posted by padman View Post
Does the compression have to be zip? What if I use another software – eg. 7-zip? And what software do you use for compression on mac?
pdurrant is offline   Reply With Quote
Old 11-30-2009, 06:49 AM   #19
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Quote:
Originally Posted by JSWolf View Post
What I do is unzip the ePub, and then make the changes and put back just the files that I've changed. Works quite easily.
I use WinRAR, with the external editor set to Notepad++ in the options. This allows me to open an epub in WinRAR, click on a file and have it open in Notepad++. When I save the file after editing, WinRAR automatically asks if I want to insert the changed version back into the archive. This way all the zipping and unzipping is handled behind the scenes.
charleski is offline   Reply With Quote
Old 11-30-2009, 02:25 PM   #20
Lloyd Simcoe
immortal observer
Lloyd Simcoe ought to be getting tired of karma fortunes by now.Lloyd Simcoe ought to be getting tired of karma fortunes by now.Lloyd Simcoe ought to be getting tired of karma fortunes by now.Lloyd Simcoe ought to be getting tired of karma fortunes by now.Lloyd Simcoe ought to be getting tired of karma fortunes by now.Lloyd Simcoe ought to be getting tired of karma fortunes by now.Lloyd Simcoe ought to be getting tired of karma fortunes by now.Lloyd Simcoe ought to be getting tired of karma fortunes by now.Lloyd Simcoe ought to be getting tired of karma fortunes by now.Lloyd Simcoe ought to be getting tired of karma fortunes by now.Lloyd Simcoe ought to be getting tired of karma fortunes by now.
 
Lloyd Simcoe's Avatar
 
Posts: 24
Karma: 263256
Join Date: Nov 2009
Device: PRS505
Quote:
Originally Posted by charleski View Post
I use WinRAR, with the external editor set to Notepad++ in the options. This allows me to open an epub in WinRAR, click on a file and have it open in Notepad++. When I save the file after editing, WinRAR automatically asks if I want to insert the changed version back into the archive. This way all the zipping and unzipping is handled behind the scenes.
Thanks for the tip. I gave it a go and it worked nicely.
Lloyd Simcoe is offline   Reply With Quote
Advert
Old 12-01-2009, 12:29 PM   #21
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: 76,531
Karma: 136565488
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by charleski View Post
I use WinRAR, with the external editor set to Notepad++ in the options. This allows me to open an epub in WinRAR, click on a file and have it open in Notepad++. When I save the file after editing, WinRAR automatically asks if I want to insert the changed version back into the archive. This way all the zipping and unzipping is handled behind the scenes.
I do the exact same thing with WinRAR and Notepad++. Works very well and is a very easy setup.
JSWolf is online now   Reply With Quote
Old 02-02-2010, 08:05 PM   #22
teodorp
Junior Member
teodorp began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2010
Device: none
Any chance for *.bat file which will make all this quckly?
teodorp is offline   Reply With Quote
Old 02-14-2010, 04:52 PM   #23
P.T
Junior Member
P.T began at the beginning.
 
Posts: 1
Karma: 10
Join Date: Feb 2010
Device: Nook
I created a simple plugin for Calibre that embeds fonts into epub as a part of the conversion process.

Any feedback is welcome.
Attached Files
File Type: zip embedfont_plugin.zip (1.9 KB, 31633 views)
P.T is offline   Reply With Quote
Old 02-14-2010, 09:37 PM   #24
brewt
Boo-Frickety-Hoo-Erizer
brewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enough
 
brewt's Avatar
 
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
Quote:
Originally Posted by P.T View Post
I created a simple plugin for Calibre that embeds fonts into epub as a part of the conversion process.

Any feedback is welcome.
Apparently, my plugin adding/using ability is lacking.

er, how to use? I can get the epub built with what looks like the font embedded in the file, but it sure don't look like it in the viewers I have (calibre and ade[attached]).

-bjc
Attached Thumbnails
Click image for larger version

Name:	Clipboard01.jpg
Views:	2028
Size:	62.4 KB
ID:	45597  
Attached Files
File Type: epub Liberation serif - Unknown.epub (356.8 KB, 1626 views)
File Type: zip Liberation serif - Unknown.zip (1.5 KB, 1630 views)

Last edited by brewt; 02-14-2010 at 10:05 PM.
brewt is offline   Reply With Quote
Old 02-14-2010, 09:46 PM   #25
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 44,572
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
@PT: You can find the font file path like this

Code:
font_dir = P('fonts/liberation')
This is guaranteed to work on all platforms. It will give you the platform dependent location of the directory containing the liberation fonts.
kovidgoyal is online now   Reply With Quote
Old 02-20-2010, 11:54 AM   #26
padman
Junior Member
padman began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Nov 2009
Device: Cybook Gen3, Cybook Opus, Cool-ER, iRex DR1000, iRex iLiad
Quote:
Originally Posted by P.T View Post
I created a simple plugin for Calibre that embeds fonts into epub as a part of the conversion process.

Any feedback is welcome.
I have added the plugin to Calibre, but apparently I do not know how to activate it. Generated ePUBs are still without fonts. Any hint how to use this plugin?
padman is offline   Reply With Quote
Old 02-21-2010, 11:12 AM   #27
brewt
Boo-Frickety-Hoo-Erizer
brewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enoughbrewt will become famous soon enough
 
brewt's Avatar
 
Posts: 251
Karma: 686
Join Date: Oct 2007
Device: Kobo Glo HD!
Quote:
Originally Posted by padman View Post
I have added the plugin to Calibre, but apparently I do not know how to activate it. Generated ePUBs are still without fonts. Any hint how to use this plugin?
The plugin seems to be built for Liberation Fonts - if you have them in C:\Program Files\Calibre2\resources\fonts\liberation, and then open the epub as zip, you should see those in it.

I just can't figure out how to call them in my css/xhtml to make it work.

This is a grand idea - any chance of getting a) some more guidance, and b) the encryption scripts in it too?

-bjc
brewt is offline   Reply With Quote
Old 02-23-2010, 10:08 PM   #28
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
Ok, I took a look at the css in the epub you posted. I don't use Calibre to produce ePubs (apart from a few very rough conversions), so I can't help you with that, but I can point out why you aren't seeing the fonts.

Firstly, the ePub has only got Liberation Serif embedded in it, so you aren't going to see the sans font at all, this may be an issue with how you've configured this plugin.
Secondly, the css code for the fonts is mangled. I don't know if this is an issue with the plugin code, but that seems a possibility.

Here are the edits I needed to make to get Liberation Serif to show up in the viewer:
Original:
Code:
@font-face {font-style: normal;font-family: 'Liberation', serif, sans-serif;font-weight: normal;src: url(LiberationSerif-Regular.ttf);}
Modified:
Code:
@font-face {font-style: normal;font-family: "Liberation Serif";font-weight: normal;src: url(LiberationSerif-Regular.ttf);}
1) The font is referred to as "Liberation Serif" in the class definition, but is called 'Liberation' in the @font-face definition. The font-face defn. needed to be changed to Liberation Serif.
2) The font name is surrounded by single quotes in the font-face defn. These needed to be changed to double quotes.
3) I'm at a loss as to what the ancillary names are doing in the font-face definition ('Liberation', serif, sans-serif). These needed to be deleted.
All three changes had to be made for the font to show up correctly.

I'd suspect this is an issue with the plugin code needing to be tweaked a bit.
charleski is offline   Reply With Quote
Old 04-05-2010, 01:40 PM   #29
JaneFancher
Zealot
JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.JaneFancher has a complete set of Star Wars action figures.
 
JaneFancher's Avatar
 
Posts: 123
Karma: 496
Join Date: Feb 2009
Location: Spokane, Washington
Device: Kindle2
This is exactly what I was looking for.

Thanks so much!
JaneFancher is offline   Reply With Quote
Old 04-12-2010, 06:00 PM   #30
frabjous
Wizard
frabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameterfrabjous can solve quadratic equations while standing on his or her head reciting poetry in iambic pentameter
 
frabjous's Avatar
 
Posts: 1,213
Karma: 12890
Join Date: Feb 2009
Location: Amherst, Massachusetts, USA
Device: Sony PRS-505
Quote:
Originally Posted by fiery
@font-face {
font-style: italic;
font-family: 'Liberation', serif, sans-serif;
font-weight: normal;
src: url(LiberationSerif-Italic.ttf);
}
@font-face {
font-style: normal;
font-family: 'Liberation', serif, sans-serif;
font-weight: normal;
src: url(LiberationSerif-Regular.ttf);
}
@font-face {
font-style: italic;
font-family: 'Liberation', serif, sans-serif;
font-weight: bold;
src: url(LiberationSerif-BoldItalic.ttf);
}
@font-face {
font-style: normal;
font-family: 'Liberation', serif, sans-serif;
font-weight: bold;
src: url(LiberationSerif-Bold.ttf);
}
I don't really understand putting multiple family names in the @font-face declaration. This makes sense when you're using the fonts: you want a stack so that it moves down to a fallback if need be, but in the font-face, all this can do is screw up the fallbacks, right?

In any case, it appears that calibre's own viewer does not support multiple font weights/styles defined for the same family, which is rather obnoxious. At least others seem to.

(P.S. Hmm. Now I'm not entirely sure about this. I need to investigate something.)

Last edited by frabjous; 04-12-2010 at 06:15 PM.
frabjous is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can it embed fonts? chalimac Kobo Reader 1 06-27-2017 06:46 PM
Best Practice: Embed Fonts?? luthar28 ePub 37 11-01-2011 05:16 AM
Possible to embed fonts in CSS of .lit file? tanzer21 Calibre 9 06-30-2010 08:26 PM
Is it possible to UN embed fonts? lmronan Sigil 14 06-04-2010 10:26 AM
Any free software can embed fonts in epub droople ePub 4 03-06-2010 06:40 PM


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


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