Mobileread
Problem with an embedded font on Kobo e-reader
#1  hulabula 09-29-2019, 03:52 PM
Hello,

I have created an e-book in which I would like to use an embedded font for some parts of the text.
I have the following in a css file:

@font-face {
font-family: "Open Sans";
font-weight: normal;
font-style: normal;
src: url(../Fonts/OpenSans-Regular.otf);
}

This is used as follows:

.sansserif {
font-family: "Open Sans", sans-serif;
}

I created the e-book with Sigil. The preview in Sigil works, it also works in Calibre. But when I copy the e-book to my Kobo reader (Aura H2O 2nd edition), only one font is used. Not the special one I embedded, and not the fallback sans-serif font, but the "default" serif font I use for all the other text in the book.
This is my first self-created e-book, and I don't have a different e-reader to test with. So I have no comparisons.

What could be the problem here?

Thanks for any help!
Reply 

#2  JSWolf 09-29-2019, 07:03 PM
Quote hulabula
Hello,

I have created an e-book in which I would like to use an embedded font for some parts of the text.
I have the following in a css file:

@font-face {
font-family: "Open Sans";
font-weight: normal;
font-style: normal;
src: url(../Fonts/OpenSans-Regular.otf);
}

This is used as follows:

.sansserif {
font-family: "Open Sans", sans-serif;
}

I created the e-book with Sigil. The preview in Sigil works, it also works in Calibre. But when I copy the e-book to my Kobo reader (Aura H2O 2nd edition), only one font is used. Not the special one I embedded, and not the fallback sans-serif font, but the "default" serif font I use for all the other text in the book.
This is my first self-created e-book, and I don't have a different e-reader to test with. So I have no comparisons.

What could be the problem here?

Thanks for any help!
Kobo supports sans-serif. So you don't need to embed a sans-serif font. Just use...

Code
font-family: sans-serif;
in the classes you want a sans-serif font.

As for your CSS code, it looks good unless it's your pointer to the font file.
Reply 

#3  theducks 09-30-2019, 12:46 PM
Is you Kobo set to use Publishers font for that title? (the Aa font setting, while reading should offer that choice)
Reply 

#4  JSWolf 09-30-2019, 01:48 PM
I just tested embedded fonts with my H2O on 4.17.x (latest) and found that when the font was embedded, it displayed and where it wasn't, the font of my choice was displayed.
Reply 

#5  hulabula 09-30-2019, 03:09 PM
Quote JSWolf
Kobo supports sans-serif. So you don't need to embed a sans-serif font. Just use...

Code
font-family: sans-serif;
in the classes you want a sans-serif font.

As for your CSS code, it looks good unless it's your pointer to the font file.
I just tried to use "sans-serif;" only. It made no change at all :-(


Quote
Is you Kobo set to use Publishers font for that title? (the Aa font setting, while reading should offer that choice)
Yes it's the publishers font. Actually this does not matter, as if I choose any other serif font there that one is used for all text. If a choose a sans-serif font there, that one is used for all text :-(


Quote
I just tested embedded fonts with my H2O on 4.17.x (latest) and found that when the font was embedded, it displayed and where it wasn't, the font of my choice was displayed.
My Kobo has firmware 4.15.12920. Could there be such a bug in this firmware?

Any other ideas? It is very frustrating that such trivial functionality is not working :-(
Reply 

#6  JSWolf 09-30-2019, 04:06 PM
Quote hulabula
I just tried to use "sans-serif;" only. It made no change at all :-(




Yes it's the publishers font. Actually this does not matter, as if I choose any other serif font there that one is used for all text. If a choose a sans-serif font there, that one is used for all text :-(




My Kobo has firmware 4.15.12920. Could there be such a bug in this firmware?

Any other ideas? It is very frustrating that such trivial functionality is not working :-(
One idea is to go read the thread on the latest 4.17.x firmware. You can do a manual upgrade. Yes, there as some gotchas in 4.15 which is why I didn't install it as one of them might have been an issue for me. 4.17. is pretty good.
Reply 

#7  hulabula 10-03-2019, 01:31 PM
Hi,

I found the problem. After upgrading to the 4.15.x firmware I patched it for the first time, without knowing what was included in the patch. I took a pre-done patch from somebody else.

Now I looked through all things which could be enabled in a patch, and one of the enabled functionalities was the reason that multiple fonts are not working.

Now I fixed it by creating a patch myself (and I updated to the newest firmware).

Thanks for your answers.
Reply 

Today's Posts | Search this Thread | Login | Register