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 07-05-2012, 01: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: 106
Karma: 624406
Join Date: May 2011
Location: Doncaster UK
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, 06: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
Old 01-04-2013, 07: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: 6,142
Karma: 4792399
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 online now   Reply With Quote
Old 01-04-2013, 10: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,790
Karma: 7999034
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, 01:02 AM   #65
theducks
Grand Sorcerer
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: 14,612
Karma: 5628865
Join Date: Aug 2009
Location: (The original) Silicon Valley, USA
Device: Galaxy Tab 2, Astak Pocket Pro, K4NT
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
Old 01-05-2013, 12: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, 02: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: 37,005
Karma: 18129756
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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, 10:31 AM   #68
Turtle91
Guru
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: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
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 10:53 AM.
Turtle91 is offline   Reply With Quote
Old 01-30-2013, 01: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: 37,005
Karma: 18129756
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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, 09:59 AM   #70
Doitsu
Wizard
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: 1,937
Karma: 4633610
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, 10:23 AM   #71
Turtle91
Guru
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: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
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, 11:26 AM   #72
Doitsu
Wizard
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: 1,937
Karma: 4633610
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, 11:50 AM   #73
Turtle91
Guru
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: 669
Karma: 3807234
Join Date: Dec 2012
Location: Shannon, Ireland today
Device: iPhone 5/iPad 1&2/Surface Pro/Kindle PW
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, 01: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: 2,955
Karma: 3363559
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-300, PRS-T1
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 online now   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
Best Practice: Embed Fonts?? luthar28 ePub 37 11-01-2011 04:16 AM
Possible to embed fonts in CSS of .lit file? tanzer21 Calibre 9 06-30-2010 07:26 PM
Is it possible to UN embed fonts? lmronan Sigil 14 06-04-2010 09:26 AM
Can it embed fonts? chalimac Kobo Reader 0 05-01-2010 03:47 PM
Any free software can embed fonts in epub droople ePub 4 03-06-2010 05:40 PM


All times are GMT -4. The time now is 03:54 AM.


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