Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Kobo Reader

Notices

Reply
 
Thread Tools Search this Thread
Old 06-26-2012, 05:16 PM   #1
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,361
Karma: 354062
Join Date: Jun 2012
Device: kobo touch
referencing fonts

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
tshering is offline   Reply With Quote
Old 06-26-2012, 06:20 PM   #2
taming
Trying for calm & polite
taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.taming ought to be getting tired of karma fortunes by now.
 
taming's Avatar
 
Posts: 4,013
Karma: 9455193
Join Date: May 2010
Location: Mostly in Canada
Device: kobo original, WiFI, Touch, Glo, and Aura
Are you expecting them to work if the individual does not have the fonts installed on their device?
taming is offline   Reply With Quote
Old 06-26-2012, 08:39 PM   #3
novou
Pointed Pontification.
novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.
 
Posts: 64
Karma: 95154
Join Date: Sep 2011
Device: Kobo Touch (Black)
Quote:
Originally Posted by tshering View Post
...and would like to make my own epubs for private use.
I doubt it.
novou is offline   Reply With Quote
Old 06-27-2012, 04:37 AM   #4
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,361
Karma: 354062
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by taming View Post
Are you expecting them to work if the individual does not have the fonts installed on their device?
Since I would like to prepare study materials for some friends and myself, there is no need for these epubs to run without the correct fonts installed.
file. Since I plan to prepare a whole lot of rather short booklets, it would be convenient to achieve this without embedding fonts in each and every file.

Thank you for the question!

Any ideas?
tshering is offline   Reply With Quote
Old 06-27-2012, 05:11 AM   #5
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,361
Karma: 354062
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by novou View Post
I doubt it.
I guess you are saying that one cannot possibly reference fonts outside of the container. Right? The possibility to reference to resources outside of the container would be convenient in several respects, e.g., cross references between several epubs. Is there any means by design or hack to make this kind of references possible?

Thank you for the interest!
tshering is offline   Reply With Quote
Old 06-28-2012, 09:12 AM   #6
Geco
Zealot
Geco doesn't litterGeco doesn't litter
 
Posts: 111
Karma: 100
Join Date: Aug 2011
Device: Touch, Aura
I have the Unifont font (http://unifoundry.com/unifont.html) installed (/fonts directory) and, even without referring it in the CSS (I'm also experimenting with epub constructions), it appears correctly my epubs. I've even downloaded free Japanese epub from Kobo and with such font installed they work perfectly.
がんばって、ね
Geco is offline   Reply With Quote
Old 06-28-2012, 06:21 PM   #7
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,361
Karma: 354062
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by Geco View Post
I have the Unifont font (http://unifoundry.com/unifont.html) installed (/fonts directory) and, even without referring it in the CSS (I'm also experimenting with epub constructions), it appears correctly my epubs. I've even downloaded free Japanese epub from Kobo and with such font installed they work perfectly.
がんばって、ね
Thank you for your response. I just read in another thread ([url]http://www.mobileread.com/forums/showthread.php?t=177947) that you and others indicate that the KT is able to select appropriate fonts according to the code range. Unfortunately, I cannot observe this behaviour on my KT. I have copied into my KT's fonts folder additionally the "Arial Unicode MS" and the "Tibetan Machine Uni" fonts. Looking at a book that contains Japanese and Tibetan passages, there a three results according to the font I select.
1) with "Arial Unicode MS", Japanese is displayed nicely, Tibetan unreadable (Arial Unicode Ms supports the code range of Tibetan, but does not show readable results, at least in most applications)
2) with "Tibetan Machine Uni", Tibetan is displayed somehow readable, all Japanese signs appear as question marks
3) any of the pre-installed fonts, or document default, all Tibetan and Japanese signs appear as question marks.

As you suggest, I could use a font that covers all the scripts of the languages I would like to read on the KT. The problem is, that I have not yet seen such a font with a decent quality. Therefore, I am looking for a possibility to have some passages of an epub file displayed in on font, and some other passages in another font, however, without embedding them in each and every epub-file. Maybe this is not possible on the KT. Or does somebody know how to make it work?

Thank you again for the suggestion
tshering is offline   Reply With Quote
Old 07-04-2012, 04:15 AM   #8
novou
Pointed Pontification.
novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.novou knows how to set a laser printer to stun.
 
Posts: 64
Karma: 95154
Join Date: Sep 2011
Device: Kobo Touch (Black)
[QUOTE=tshering;2128754]I guess you are saying that one cannot possibly reference fonts outside of the container. Right? The possibility to reference to resources outside of the container would be convenient in several respects, e.g., cross references between several epubs. Is there any means by design or hack to make this kind of references possible?/QUOTE]
Nope, I was just referring to taming's question about whether you wanted it to work even without the right fonts installed, and quoted your statement that the books were for people who already have the fonts.

You might be able to reference fonts outside the container by using CSS or HTML. Say something like font-family: Name1,"Other Font",More; in your CSS stylesheet. Just do it like using a stardard font like Georgia on the web; the @font-face might be confusing the device.

Referencing fonts in other ePubs would be a bad idea, and I'm pretty sure that it's impossible anyway.

PS: Have you tried installing Unifont on your Kobo to at least test it?
The issue with automatic loading might just be a problem with your test fonts.
novou is offline   Reply With Quote
Old 07-04-2012, 04:51 PM   #9
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,361
Karma: 354062
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by novou View Post
Nope, I was just referring to taming's question about whether you wanted it to work even without the right fonts installed, and quoted your statement that the books were for people who already have the fonts.
I see. I completely mistook the reference. At first glance I even thought you doubted that I make the epubs for private use. Would not be a big business anyway!

Quote:
Originally Posted by novou View Post
You might be able to reference fonts outside the container by using CSS or HTML. Say something like font-family: Name1,"Other Font",More; in your CSS stylesheet. Just do it like using a stardard font like Georgia on the web; the @font-face might be confusing the device.
This is actually what I did right at the beginning. Only as it did not work I started playing with the @font-face.

Quote:
Originally Posted by novou View Post
Referencing fonts in other ePubs would be a bad idea, and I'm pretty sure that it's impossible anyway.
I was rather thinking of image files residing in the root directory or so.

Quote:
Originally Posted by novou View Post
PS: Have you tried installing Unifont on your Kobo to at least test it?
The issue with automatic loading might just be a problem with your test fonts.
I tried it right now. Unfortunately, without success.

Thank you for the input!
tshering is offline   Reply With Quote
Old 07-04-2012, 04: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: 37,869
Karma: 18755150
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
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
Old 07-04-2012, 05:04 PM   #11
Danger
Evangelist
Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.
 
Danger's Avatar
 
Posts: 486
Karma: 1665031
Join Date: Nov 2010
Location: Vancouver Island, Nanaimo
Device: K2 (retired), Kobo Touch (passed to the wife), KGlo, Galaxy TabPro
disregard....

Last edited by Danger; 07-05-2012 at 01:46 AM. Reason: See next post...
Danger is offline   Reply With Quote
Old 07-04-2012, 10:40 PM   #12
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: 37,869
Karma: 18755150
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Sony Reader PRS-650, iPad, nook STR
Quote:
Originally Posted by Danger View Post
it should be:

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

Change font class:

p {
font-family: "Tibetan Machine Uni", serif, sans-serif;
}
The OP is talking of a fonts directory on the Kobo and not in the ePub. So your URL is still pointing to a non-existing place in the ePub to find the font files that aren't there.

For example, if I create a fonts directory on my 650, I can use a URL to reference these fonts outside of the ePub.

Code:
src: url(res:///Data/fonts/CharisSILR.ttf)
This probably won't work on a Kobo. But you can give it a try.
JSWolf is offline   Reply With Quote
Old 07-05-2012, 05:00 PM   #13
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,361
Karma: 354062
Join Date: Jun 2012
Device: kobo touch
Quote:
Originally Posted by JSWolf View Post
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.
Thank you for your note. As you might have read, I tried several ways to specify the path to the font files. Unfortunately, I did not document my trials. Anyhow, none of them worked. As I had read somewhere on the web that in the case of the KT - different from the Sony - there is not need to specify the path to the fonts in the css, since the KT has already a list of all fonts available to the system, I tried also to drop the path at all. The obvious took place: it did not work.

Quote:
Originally Posted by JSWolf View Post
For example, if I create a fonts directory on my 650, I can use a URL to reference these fonts outside of the ePub.

Code:
src: url(res:///Data/fonts/CharisSILR.ttf)
This probably won't work on a Kobo. But you can give it a try.
I did.



If anybody has already successfully referenced a font outside of the container, I would really appreciate if she could post an example.

Last edited by tshering; 07-05-2012 at 05:06 PM.
tshering is offline   Reply With Quote
Old 07-06-2012, 10:59 PM   #14
PeterT
Taking a break; Fed up
PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.PeterT ought to be getting tired of karma fortunes by now.
 
PeterT's Avatar
 
Posts: 7,195
Karma: 45329895
Join Date: Nov 2007
Location: Toronto
Device: Wife: Touch, Arc, Vox Me: Nexus 7, Glo
When you look in the Sqlite database on the Kobo which references all the books, you see the following path given for material
Code:
file:///mnt/onboard/Russinovich, Mark/Zero Day.epub
.

This makes me wonder if you could refer to fonts in the /fonts directory on the Kobo as
Code:
src: url(res:///mnt/onboard/fonts/CharisSILR.ttf)
PeterT is offline   Reply With Quote
Old 07-07-2012, 01:52 PM   #15
tshering
Wizard
tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.tshering ought to be getting tired of karma fortunes by now.
 
Posts: 1,361
Karma: 354062
Join Date: Jun 2012
Device: kobo touch
This makes me wonder if you could refer to fonts in the /fonts directory on the Kobo as
Code:
src: url(res:///mnt/onboard/fonts/CharisSILR.ttf)
[/QUOTE]

Thank you for proposing this. I have tried it already and it did not work. I wonder whether I might be better using "src: local(theFontName)" instaed of "src: url(FontFileNameIncludingPath)" since in the case of originally built-in fonts it would be even more difficult to figure out how to reference them by their file location. However, I did not get the hoped for result.
tshering is offline   Reply With Quote
Reply

Tags
fonts, multilingual

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
need the fonts in /usr/java/lib/fonts of kindle touch5.0.0 hanpal Kindle Developer's Corner 1 02-20-2012 11:40 AM
Troubleshooting need the fonts in /usr/java/lib/fonts of kindle touch5.0.0 hanpal Amazon Kindle 0 02-20-2012 09:51 AM
Chapter Links/cross-referencing greenPublisher Sigil 1 12-07-2011 07:34 PM
Internal cross referencing Kumabjorn General Discussions 8 11-05-2010 01:07 PM
quick question referencing fixing a typo on an epub happy_terd ePub 2 01-30-2010 02:30 PM


All times are GMT -4. The time now is 01:36 AM.


MobileRead.com is a privately owned, operated and funded community.