Thread: Touch referencing fonts
View Single Post
Old 07-04-2012, 03:56 PM   #10
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: 73,970
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by tshering View Post
Greetings to the community!

I have a Kobo Touch and would like to make my own epubs for private use. These epubs would contain Japanese and Tibetan. I copied suitable fonts already into the fonts folder and they are available for manual selection. I would, however, like to reference them in the epubs. In this way one could for instance make them both available at the same time in one book. Based on discussions on how to achieve this with the Sony reader, I tried to reference the fonts in the css in this way:

@font-face {
font-family: 'Tibetan Machine Uni', serif, sans-serif;
font-style: normal;
font-weight: normal;
src: url('TibMachUni-1.901b.ttf');
}

p {
font-family: 'Tibetan Machine Uni';
...
}

and in the content.opf in this way:

<manifest>
...
<item id="font1" href="TibMachUni-1.901b.ttf" media-type="application/octet-stream" />
</manifest>

This, however, had no effect on the appearance of the book at all. I also tried to specify the path of the scr: url command in various ways. The only result was that with one variant starting with src: url("res:/// - I cannot recall the rest - the reader made a restart whenever I launched the book.
Just to clarify, I would rather not like to embed the fonts in each end every epub.

Could anybody please hint me in the right direction on how to reference fonts in the correct way?

Thank you in advance,
Tshering
I have no idea how the Kobo Touch references fonts sitting in a fonts directory on the device. But, I can tell you that your line
Code:
src: url('TibMachUni-1.901b.ttf');
is actually trying to reference a font in the same directory (in the ePub) as the CSS. And obviously, that's not going to work. The URL is going to be different then any URL used for referencing fonts inside the ePub. That's all I can tell you.
JSWolf is offline   Reply With Quote