MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   Font embedding (https://www.mobileread.com/forums/showthread.php?t=172742)

sachin 03-20-2012 04:37 AM

Font embedding
 
I tried embedding fonts to my newly created epub by using Sigil, embedded font is showing in the sigil, but when i open that epub in calibre it showing the default font but not my embedded font. And i tried reading it even on firefox add-on. there also it is not showing my embedded font it is considering other default font which are present in system.
Can anyone guess where i went wrong? :thanks:

Doitsu 03-20-2012 04:56 AM

Quote:

Originally Posted by sachin (Post 2010733)
Can anyone guess where i went wrong?

Without actually seeing your ePub it's hard to tell. There are two possible sources of errors:

1. You didn't embed the font correctly
2. The font doesn't support embedding

Some time ago, I created a very simple ePub template with an embedded font. You can download it and experiment with it.

Simply add your font in Sigil and then change the font path in the stylesheet so that it points to your font.
If your font still doesn't show up, it cannot be embedded.

sachin 03-20-2012 05:28 AM

I have done everything properly and my font allows embedding. One more thing is which are all the devices i can read my font embedded epub? How can i test my font embedding on different platforms?

Doitsu 03-20-2012 06:08 AM

Quote:

Originally Posted by sachin (Post 2010770)
I have done everything properly and my font allows embedding.

Since most eReaders manufacturers have licensed the mobile edition of Adobe Digital Editions, I'd recommend installing Wine and Adobe Digital Editions to test your ePub with it. (AFAIK, this can be a bit tricky, but it can be done.)
If your embedded font doesn't show up correctly in ADE, it won't show up correctly on most eReaders either. Assuming that your stylesheet is indeed coded correctly, it also means that your font cannot be embedded, even if it shows up correctly in Sigil, because ADE is way more picky than Sigil.

Quote:

Originally Posted by sachin (Post 2010770)
One more thing is which are all the devices i can read my font embedded epub?

If it works with ADE, your ePub should theoretically work on all officially supported ADE devices and apps.

theducks 03-20-2012 09:07 AM

Quote:

Originally Posted by Doitsu (Post 2010749)
Without actually seeing your ePub it's hard to tell. There are two possible sources of errors:

1. You didn't embed the font correctly
2. The font doesn't support embedding

Some time ago, I created a very simple ePub template with an embedded font. You can download it and experiment with it.

Simply add your font in Sigil and then change the font path in the stylesheet so that it points to your font.
If your font still doesn't show up, it cannot be embedded.

I vote for your answer #1 :D

It took me 3 tries to get it right after placing a font into the Fonts folder (remember, there are separate fonts for each weight and stroke).
there are 3 places that all need to be exactly in synch:

a) the font files themselves (remember name CASE)
b) the @font { sections must match 'a'
c) the place used ( typically in a class) font-face, font-weight, font-style

I have not played with font-decoration, but that may be another set of font files to ad to the mix :rolleyes:


Just look at the problems with a device in this thread https://www.mobileread.com/forums/sho...d.php?t=171846

sachin 03-21-2012 01:59 AM

Quote:

Originally Posted by Doitsu (Post 2010806)
Since most eReaders manufacturers have licensed the mobile edition of Adobe Digital Editions, I'd recommend installing Wine and Adobe Digital Editions to test your ePub with it. (AFAIK, this can be a bit tricky, but it can be done.)
If your embedded font doesn't show up correctly in ADE, it won't show up correctly on most eReaders either. Assuming that your stylesheet is indeed coded correctly, it also means that your font cannot be embedded, even if it shows up correctly in Sigil, because ADE is way more picky than Sigil.


If it works with ADE, your ePub should theoretically work on all officially supported ADE devices and apps.

Thanks for your great help Doitsu, Let me install and check whether my font embedding works properly or not. Thanks for your time.

sachin 03-21-2012 05:32 AM

I installed ADE on windows7 and tested my newly created ebook of epub format. My font is embedded but there is problem in rendering. What can i do further? Any help is greatly appreciated.:thanks:

Doitsu 03-21-2012 06:06 AM

Quote:

Originally Posted by sachin (Post 2012116)
My font is embedded but there is problem in rendering

You'll have to be more specific, to get a useful answer.

For example:
- The embedded font is correctly displayed in Sigil but not ADE.
- Some characters are not displayed displayed correctly etc.

Also attach a small ePub sample of your book that has your specific problem.

sachin 03-21-2012 07:21 AM

1 Attachment(s)
I attached my sample epub here, in which two different types of fonts are embedded in two chapters using Sigil and they are showing properly on firefox add-on, calibre. but the characters are not displaying correctly on ADE(u can easily make out by taking a close look at characters). What you suggest me to edit in my CSS?
:thanks:

Doitsu 03-21-2012 08:33 AM

Unfortunately, ADE does not support complex languages with diacritics such as Kannada. (Diacritics are treated like separate letters and are displayed next to the base letter.)
This means that most existing commercial ADE compatible (hardware) eBook readers that haven't been adapted for the Indian market won't be able to display your ePub correctly.
This leaves only Webkit based ePub reader apps, for example, iBooks and Bluefire Reader. I also tested your ePub with the Kindle KF8 Previewer app and it seems to display your book correctly in Kindle Fire mode after I added the correct language information metadata to the ePub.
I.e. as of now, your best bets are iPhones, iPads, Android devices with Webkit-based reader apps and possibly the Kindle Fire (after ePub-to-KF8 conversion).

Timur 03-21-2012 09:22 AM

@sachin: I have tried your test.epub with Sigil, Calibre, Firefox EPUBReader addon, ADE 1.7, ADE 1.8 preview 2, and Nook STR stock reader(RMSDK based). Here are the results:

ADE 1.7: does not show diacritics properly.
Firefox EPUBReader: shows diacritics but the glyphs are slightly different compared to the other readers; also second embedded font displays the same glyphs as the first one.
ADE 1.8p2, Sigil, Calibre, Nook STR: diacritics ok; both embedded fonts seem to be working properly.

sachin 03-26-2012 03:13 AM

I tried converting my newly created epub to .MOBI format by using CALIBRE. But it is not showing the embedded fonts instead taking default font. :(

Doitsu 03-26-2012 04:20 AM

Quote:

Originally Posted by sachin (Post 2017563)
I tried converting my newly created epub to .MOBI format by using CALIBRE. But it is not showing the embedded fonts instead taking default font. :(

That was to be expected, because the standard .mobi format doesn't support embedded fonts. Only the new KF8 .mobi format does, however, AFAIK, they only recently added KF8 reading support to Calibre.

sachin 03-26-2012 10:47 AM

1) I tried it on ipad but it is taking local font instead of my embedded font.
2) And on android phone if font is present in the phone then only it 'll show properly otherwise not.
2) and the last doubt is, Total weight of epub file with embedded font is less than the total weight of the provided fonts. is it possible?(i.e. my epub is less than 0.2 MB and i provided 3 types of fonts which are more that 100 kb each)

JSWolf 03-26-2012 12:06 PM

Quote:

Originally Posted by sachin (Post 2017563)
I tried converting my newly created epub to .MOBI format by using CALIBRE. But it is not showing the embedded fonts instead taking default font. :(

Mobi does not support embedded fonts.


All times are GMT -4. The time now is 07:54 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.