Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 07-05-2012, 02:56 PM   #61
Thasaidon
Hedge Wizard
Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.Thasaidon ought to be getting tired of karma fortunes by now.
 
Thasaidon's Avatar
 
Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
Exclamation Problems Converting mobi Files

Quote:
Originally Posted by artshim View Post
P.T,

I put some additional code for some more flexibility. Below are usage,


Thank you.
I have found a problem with this plugin. If you convert a short atory in mobi format to ePub it damages the OPF. If you then open the ePub produced in Sigil the cover page appears in the list of files but the file containing the text does not. I have not noticed any other source file being affected.

I tried removing the line - font-family: "LiberationSerif" ; - from "Look and Feel" - Extra CSS. I then converted the same mobi file and this time it did not damage the OPF so that all the files could be seen in Sigil.

Thanks must go to Kovid for his helping to sort this out.

If hope someone with more time and knowledge than myself will amend the plugin as I have found it very useful.
Thasaidon is offline   Reply With Quote
Old 01-04-2013, 07:39 AM   #62
kevin.pugh
Member
kevin.pugh began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jul 2012
Device: Boox M92
Fonts: Installed vs Embedded

Quote:
Originally Posted by wallcraft View Post
It can presumably screw up the fallback if there is something wrong with the font. The reason for doing it is that the fallback (the default serif font) isn't very good. By redefining serif you always get Liberation when no font is specified in the body of the ebook. This should not be necessary if the ePub was designed from the start to use an embedded font, but if it is added later it can be hard to get Liberation to to applied uniformly to all the CSS.

Hi there, the comma separated list does give a list of what fonts to use if the 'system' cannot find a particular font. For instance:

In the style.css file you might have:

@font-face {
font-family: "Liberation", Arial, sans-serif;
font-weight: normal;
font-style: normal;
src: url(../Fonts/LiberationSans-Regular.otf);
}


The above means - if you can't find font family "Liberation" then use Arial. If you cannot find Arial then use any font that is sans-serif.

I believe the use of quotes in such declarations is to handle font family names which have spaces in - e.g.: "Liberation Sans".

Note that the fall back strategy is important for those who are testing their ePub document with embed fonts. If your Windows or Linux system has these fonts installed already, then some ePub readers will use those fonts - SIGIL for instance. In contrast, So you assume that the embed fonts are working. However, when you transfer the ePub document to your eReader, the embed font does not work.

From my experience, Calibre uses the embed font.
kevin.pugh is offline   Reply With Quote
Advert
Old 01-04-2013, 08:07 AM   #63
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,537
Karma: 19000627
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by kevin.pugh View Post
In the style.css file you might have:

@font-face {
font-family: "Liberation", Arial, sans-serif;
font-weight: normal;
font-style: normal;
src: url(../Fonts/LiberationSans-Regular.otf);
}
I don't think you can have several fonts there. It is possible in a "normal" style:

Code:
p {
  font-family: "Liberation", Arial, sans-serif;
}
But in a @font-face, you are not specifying that a given font should be used, but you are actually defining the font, and to define the font you must give it a name, not a list of names. So with:

Code:
@font-face {
  font-family: "Liberation";
  font-weight: normal;
  font-style: normal;
  src: url(../Fonts/LiberationSans-Regular.otf);
}
you say that whenever the "Liberation" family is needed, in normal weight and style, the renderer should use the file in ../Fonts/LiberationSans-Regular.otf.
Jellby is offline   Reply With Quote
Old 01-04-2013, 11:57 PM   #64
pholy
Booklegger
pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.pholy ought to be getting tired of karma fortunes by now.
 
pholy's Avatar
 
Posts: 1,801
Karma: 7999816
Join Date: Jun 2009
Location: Toronto, Ontario, Canada
Device: BeBook(1 & 2010), PEZ, PRS-505, Kobo BT, PRS-T1, Playbook, Kobo Touch
I'm quite sure Jelby is right, having found and fixed this sort of problem elsewhere.
The @font-face is a declaration of a font, which can be found in a particular src: url().
The font-family in a style is a reference to a desired font, so the fallback list is appropriate there.
pholy is offline   Reply With Quote
Old 01-05-2013, 02:02 AM   #65
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 30,454
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Jelby is correct:
In the @fontface, you are specifying the definition of a single fonts relationship to a family: "Liberation" (it take 4 font weight/stokes to fully define a full family. normal, bold, italic, bold-italic)

The font-family in the (style) usage, gets the fallbacks
theducks is offline   Reply With Quote
Advert
Old 01-05-2013, 01:52 PM   #66
kevin.pugh
Member
kevin.pugh began at the beginning.
 
Posts: 12
Karma: 10
Join Date: Jul 2012
Device: Boox M92
Quote:
Originally Posted by theducks View Post
Jelby is correct:
In the @fontface, you are specifying the definition of a single fonts relationship to a family: "Liberation" (it take 4 font weight/stokes to fully define a full family. normal, bold, italic, bold-italic)

The font-family in the (style) usage, gets the fallbacks
hi folks, I stand corrected ... this is one more thing I have learned today. Thanks for the information.
Kevin
kevin.pugh is offline   Reply With Quote
Old 01-07-2013, 03:59 PM   #67
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,513
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 kevin.pugh View Post
hi folks, I stand corrected ... this is one more thing I have learned today. Thanks for the information.
Kevin
I can teach you another thing.

The current version of Calibre has font subsetting. Subsetting is where when Calibre converts to ePub (maybe AZW3 as well) it checks which embedded fonts are used and also which characters from which fonts.

So if you embed a 4 family font in your ePub and the bold italic version is not used, Calibre would delete it.

Subsetting also will remove characters from the font(s) that are not used in that specific ePub. So it makes the font files smaller for the used fonts and between cutting out unused fonts/characters, this can make the ePub significantly smaller.

What I do once the ePub is done other then subsetting, I load that into Calibre, convert the ePub > ePub (turning on font subsetting in Look & Feel) and in the converted ePub, extract the font directory to replace the font directory in the finished ePub. Then I edit the CSS & OPF as needed for any fonts that were deleted.

Once that's done and the ePub validates, I delete the two ePub in Calibre and put in the finished ePub to eventually go on my Reader.
JSWolf is offline   Reply With Quote
Old 01-30-2013, 11:31 AM   #68
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,228
Karma: 19001261
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by JSWolf View Post
I can teach you another thing.
Thanks Jon - that is exactly what I was looking for!

I thought I had seen something on MR that someone was making a plugin for Sigil to do all of that automatically...have you heard/seen anything?

[edit] Found it! Not a plugin, but a standalone.

Last edited by Turtle91; 01-30-2013 at 11:53 AM.
Turtle91 is offline   Reply With Quote
Old 01-30-2013, 02:37 PM   #69
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,513
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 Turtle91 View Post
Thanks Jon - that is exactly what I was looking for!

I thought I had seen something on MR that someone was making a plugin for Sigil to do all of that automatically...have you heard/seen anything?

[edit] Found it! Not a plugin, but a standalone.
It's not a plugin. It's Calibre. The standalone is much much harder to use. Use Calibre until the standalone works as well.
JSWolf is offline   Reply With Quote
Old 01-31-2013, 10:59 AM   #70
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
You could also use the Font Squirrel's @font-face Generator in expert mode, which offers more settings than Toxaris's standalone app, to subset fonts.
Doitsu is offline   Reply With Quote
Old 01-31-2013, 11:23 AM   #71
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,228
Karma: 19001261
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Does Font Squirrel scan a document and only provide the characters 'used', or do you need to manually delete the un-used?
Turtle91 is offline   Reply With Quote
Old 01-31-2013, 12:26 PM   #72
Doitsu
Grand Sorcerer
Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.Doitsu ought to be getting tired of karma fortunes by now.
 
Doitsu's Avatar
 
Posts: 5,640
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
Font Squirrel doesn't allow you to exclude unused characters. You can only select glyphs by Unicode ranges, languages or character types (uppercase, lowercase, numbers, punctuation etc.)
IMHO, excluding unused glyphs offers only minimal size advantages. Also if you find a font that you like, you'd have to run the subsetter each time you create a new book to make sure that all characters are included in the subset font.
Doitsu is offline   Reply With Quote
Old 01-31-2013, 12:50 PM   #73
Turtle91
A Hairy Wizard
Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.Turtle91 ought to be getting tired of karma fortunes by now.
 
Turtle91's Avatar
 
Posts: 3,228
Karma: 19001261
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
Quote:
Originally Posted by Doitsu View Post
Also if you find a font that you like, you'd have to run the subsetter each time you create a new book to make sure that all characters are included in the subset font.
I don't intend to use embedded fonts/subsetting on a regular basis...that's what user selection is for on the device; I'll let them choose which font THEY like best. The only time I would need an embedded font is if the specific font itself adds to the story of that specific book...HP for example. If a customer wants to pay for a different font in their header, who am I to tell them "no"... Being a professional [cough,cough] I would want to provide the best (smallest/cleanest) product I can - I would just like a tool that makes that easier!

Thanks for the suggestion though!
Turtle91 is offline   Reply With Quote
Old 01-31-2013, 02:55 PM   #74
Toxaris
Wizard
Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.Toxaris ought to be getting tired of karma fortunes by now.
 
Toxaris's Avatar
 
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
Keep in mind that Font Squirell will not subset all fonts. Quite a number of fonts are blacklisted.

Also, John, I take some offense to your words. My program was not intended to work as you would like, it works as I wanted. The fact that I am working on a new version that can open ePUB is because I can see some need for it for myself and some others. Quite frankly I don't care if it works better for you. You never ask for something, you demand.
Toxaris is offline   Reply With Quote
Old 11-10-2014, 08:14 PM   #75
trampino
Junior Member
trampino began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Oct 2014
Device: none
problem with embedfont_plugin.zip in Calibre 2.7 on Linux server

Hello, could anybody help me?

I make conversion of DOCX to EPUB, using Calibre command line. I use all recomandations, writen in this thread, for using plugin embedfont_plugin.zip

If I use original plugin version form P.T. in win7 with Calibre 2.7, it works perfect. If I use the same on Linux server with Calibre 2.7. files with fonts are not placed into epub file and error messages written below are displayed in terminal.

If I used modified version of plugin form artshim it does not work in win7 with Calibre 2.7 and it does not work in Linux with Calibre 2.7 too. In both operation systems terminal displays the same erro as for plugin from P.T.

The error messages are these:
Error: Can't find liberation fonts.
Running file type plugin EPUB Font embedding plugin failed with traceback:
Traceback (most recent call last):
File "site-packages/calibre/customize/ui.py", line 154, in _run_filetype_plugins
File "calibre_plugins.dummy1.__init__", line 88, in run
SystemExit: 0
EPUB output written to /u1/myusername/opt/calibre/KnihaVystup.epub
Output saved to /u1/myusername/opt/calibre/KnihaVystup.epub
trampino 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:10 PM.


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