![]() |
#61 | |
Hedge Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 802
Karma: 19999999
Join Date: May 2011
Location: UK/Philippines
Device: Kobo Touch, Nook Simple
|
![]() Quote:
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. |
|
![]() |
![]() |
![]() |
#62 | |
Member
![]() Posts: 12
Karma: 10
Join Date: Jul 2012
Device: Boox M92
|
Fonts: Installed vs Embedded
Quote:
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. |
|
![]() |
![]() |
Advert | |
|
![]() |
#63 | |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,527
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Code:
p { font-family: "Liberation", Arial, sans-serif; } Code:
@font-face { font-family: "Liberation"; font-weight: normal; font-style: normal; src: url(../Fonts/LiberationSans-Regular.otf); } |
|
![]() |
![]() |
![]() |
#64 |
Booklegger
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#65 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,279
Karma: 57979022
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 |
![]() |
![]() |
Advert | |
|
![]() |
#66 | |
Member
![]() Posts: 12
Karma: 10
Join Date: Jul 2012
Device: Boox M92
|
Quote:
Kevin |
|
![]() |
![]() |
![]() |
#67 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,680
Karma: 134319570
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
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. |
|
![]() |
![]() |
![]() |
#68 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,160
Karma: 18843349
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
|
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. |
![]() |
![]() |
![]() |
#69 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,680
Karma: 134319570
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#70 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,635
Karma: 23190435
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.
|
![]() |
![]() |
![]() |
#71 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,160
Karma: 18843349
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?
|
![]() |
![]() |
![]() |
#72 |
Grand Sorcerer
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 5,635
Karma: 23190435
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. |
![]() |
![]() |
![]() |
#73 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,160
Karma: 18843349
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:
![]() Thanks for the suggestion though! |
|
![]() |
![]() |
![]() |
#74 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() 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. |
![]() |
![]() |
![]() |
#75 |
Junior Member
![]() 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 |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Can it embed fonts? | chalimac | Kobo Reader | 1 | 06-27-2017 05:46 PM |
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 |
Any free software can embed fonts in epub | droople | ePub | 4 | 03-06-2010 05:40 PM |