|
|
#1 |
|
Snarky Snark
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,105
Karma: 5830757
Join Date: Sep 2011
Location: Coastal Texas
Device: Asus TF300
|
Font Embedding?
I'm curious because there's some FOSS fonts I've got that would be great in an ePub, but at this point there doesn't seem to be any way to embed them. |
|
|
|
|
|
#2 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 300
Karma: 185297
Join Date: Sep 2009
Location: Ankh Morpork
Device: calibre
|
Not really sure why anyone would want to embed fonts in an ebook, unless it is a few fancy illuminated caps perhaps. First thing I do is delete embedded fonts.
In any case there seems to be an option to do it in document preferences, you may need to edit the macro to get your font in the list.
__________________
Television has raised writing to a new low. - Samuel Goldwyn |
|
|
|
|
Enthusiast
|
|
|
|
#3 |
|
Ebook Museum Curator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 301
Karma: 106851
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
|
Font embedding is still work in progress, sorry.
Luke
__________________
|
|
|
|
|
|
#4 |
|
temp. out of service
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,985
Karma: 10590862
Join Date: May 2010
Location: Duisburg (DE)
Device: BeBook mini
|
Since the "why" has already been covered in a fair bunch of threads I suggest you take a sheet of paper and write: "Not everyone lives in ASCII-land; not every firmware supplies fonts for every language." 100 times.
__________________
|
|
|
|
|
|
#5 | |
|
Snarky Snark
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,105
Karma: 5830757
Join Date: Sep 2011
Location: Coastal Texas
Device: Asus TF300
|
Quote:
That having been said, I feel your pain when it comes to people trying to set their entire book in something ridiculous like Comic Sans. |
|
|
|
|
|
|
#6 |
|
Addict
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 300
Karma: 185297
Join Date: Sep 2009
Location: Ankh Morpork
Device: calibre
|
I can understand that use for embeded fonts even if I do not agree with the bloat introduced by the process, I also dislike Times New Roman - Comic Sans is almost preferable to it.
If I remember correctly the standard W2Epub CSS file sets font family to Garamond, serif, sansserif, monospace. It is easy to change that with Macro editor so you can list fonts by your preference in the hope that readers have the first or second choice fonts installed. I realise this is not ideal for what you want but it does give some control over the rendered look. An option that I have seen used for title page and headers is to create them as images. This is also not ideal as some readers do not dislay images well. FBReader will only display images if the file structure is none standard, flat, that is all files in one directory. I am not sure there is a simple solution unless you create the ebook in W2Epub then edit it further with something like Sigil, which has a habit of changing your styles with informing you, but does allow font embeding.
__________________
Television has raised writing to a new low. - Samuel Goldwyn |
|
|
|
|
|
#7 |
|
temp. out of service
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,985
Karma: 10590862
Join Date: May 2010
Location: Duisburg (DE)
Device: BeBook mini
|
The bloat problem is a different one:
Solution would be a script analysing the epub in question, create lists of used chars only of every used fontfile (+ ligatures where fitting pairs appear) and pass them via python to fontforge to make an individually tailored subset *tf
__________________
|
|
|
|
|
|
#8 | |
|
Ebook Museum Curator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 301
Karma: 106851
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
|
Quote:
We have a working software prototype, as soon as we find time to spend on it, we will release a tool online for this job. Freeshadow, if you are an experienced Python programmer and you have time to spend, wish you help us in this project? ![]() If so, feel free to contact me in PM Luke
__________________
|
|
|
|
|
|
|
#9 | |
|
Ebook Museum Curator
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 301
Karma: 106851
Join Date: Sep 2009
Location: Genova, Italy
Device: Cybook Bebook iLiad Kindle HanlinV2 Readius SonyPRS500 SonyPRS700 etc
|
Quote:
Was true in the first version, now I don't set anymore any font. Now my goal is to check the glyphs used in the document, and warning the user if some non-ade glyph is present in the document. Luke
__________________
|
|
|
|
|
|
|
#10 | |
|
temp. out of service
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,985
Karma: 10590862
Join Date: May 2010
Location: Duisburg (DE)
Device: BeBook mini
|
font file stripping
Quote:
I couldn't even hello world in python ![]() I just was thinking about if and how such font stripping could be possible since I read a posting confirming that someone got in trouble embedding a commercial font. (I think Dennis posted) Keeping in mind that commercial full utf-range containing fonts are not only expensive (thinking about the Linotype collection CDs here... 4 digit prices) but huge too (isn't, the full UTF Times New Roman, according to Wikipedia several megabytes big?) It would make sense to strip them for several reasons: 1.)I can't think of a book really needing ALL of the glyphs: several languages (some purely historic), math, physics etc. and the kitchen sink. If a book with such needs exists it makes the Rosetta Stone look like a nursery rhyme. I think such a case is highly improbable. So let's strip and save size. When we remove the unused glyphs without changing the location of the used ones inside the font it should be fine with the epub specs I think. 2.) when stripped, to strictly! what's needed in a specific epub, then renamed because of said modifications, replace the original fontfiles in the epub and finally run pdurrands obfuscation script over it. The result would be as close to font embedding like it's done with PDFs, as it can be done with epubs. And now the real kicker: This similarity should give a way to use fonts acquired under pre-epub licensing terms because as with PDFs the embedded data would be neither easily readable nor complete. Et voilà no problems with using commercial fonts anymore. IMO you should present the project of the ebook club at the epub general forum for all the reasons above.
__________________
|
|
|
|
|
|
|
#11 | |
|
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
|
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 |
|
|
|
|
|
|
#12 |
|
temp. out of service
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,985
Karma: 10590862
Join Date: May 2010
Location: Duisburg (DE)
Device: BeBook mini
|
Well isn't Calibre doing exactly part of the job? Parsing epubs in python? I notified Kovid about the idea here... Interested what he might have to say.
I was thinking about the problem since here: http://www.mobileread.com/forums/sho...6&postcount=15 and tought about how to best present the idea to the python savvy ones on MR, then Luke wrote here that such a thing is already in the making - sparing me a definitely heavy task of composing a teal deer post hoping some coders might find it useful too. We know what's commonly said about a user with an idea don't we? ![]() Personally I think such a finalizing tool could make epubs compatible to the majority of commercial font licenses. And THAT would be a hell of a breakthrough in production of commercially usable epubs.
__________________
|
|
|
|
|
|
#13 |
|
Creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 22,664
Karma: 3473290
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
__________________
Get calibre Notice to all: I can not provide assistance with DRM removal, for legal reasons, so please do not contact me about it. |
|
|
|
|
|
#14 |
|
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
|
What I think Kovid is saying is that calibre has all the XHTML/CSS parsing code needed, and all that would need to be added to calibre would be font subsetting code and some UI elements to turn it on during ePub->ePub 'conversion'.
__________________
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 |
|
|
|
|
|
#15 | |
|
Snarky Snark
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,105
Karma: 5830757
Join Date: Sep 2011
Location: Coastal Texas
Device: Asus TF300
|
Quote:
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Another problem embedding font | Alabala | ePub | 26 | 08-02-2012 05:19 PM |
| Font embedding | sachin | Sigil | 36 | 03-30-2012 03:26 AM |
| Font embedding | sachin | Sigil | 3 | 03-21-2012 09:19 AM |
| Do I need a font license if all I'm doing is referring to the font (not embedding)? | Stodder | Workshop | 21 | 04-21-2011 04:19 AM |
| Font embedding error | Peto | Calibre | 2 | 08-05-2008 10:40 AM |