06-26-2012, 04:16 PM | #1 |
Wizard
Posts: 3,489
Karma: 2914715
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 |
06-26-2012, 05:20 PM | #2 |
Trying for calm & polite
Posts: 4,012
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?
|
Advert | |
|
06-26-2012, 07:39 PM | #3 |
Pointed Pontification.
Posts: 64
Karma: 100000
Join Date: Sep 2011
Device: Kobo Touch (Black)
|
|
06-27-2012, 03:37 AM | #4 | |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
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? |
|
06-27-2012, 04:11 AM | #5 |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
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! |
Advert | |
|
06-28-2012, 08:12 AM | #6 |
Zealot
Posts: 112
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.
がんばって、ね |
06-28-2012, 05:21 PM | #7 | |
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
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 |
|
07-04-2012, 03:15 AM | #8 |
Pointed Pontification.
Posts: 64
Karma: 100000
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. |
07-04-2012, 03:51 PM | #9 | ||||
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
Quote:
Quote:
Quote:
Thank you for the input! |
||||
07-04-2012, 03:56 PM | #10 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
Code:
src: url('TibMachUni-1.901b.ttf'); |
|
07-04-2012, 04:04 PM | #11 |
Evangelist
Posts: 490
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 12:46 AM. Reason: See next post... |
07-04-2012, 09:40 PM | #12 | |
Resident Curmudgeon
Posts: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
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) |
|
07-05-2012, 04:00 PM | #13 | ||
Wizard
Posts: 3,489
Karma: 2914715
Join Date: Jun 2012
Device: kobo touch
|
Quote:
Quote:
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 04:06 PM. |
||
07-06-2012, 09:59 PM | #14 |
Grand Sorcerer
Posts: 12,167
Karma: 73448616
Join Date: Nov 2007
Location: Toronto
Device: Nexus 7, Clara, Touch, Tolino EPOS
|
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) |
07-07-2012, 12:52 PM | #15 |
Wizard
Posts: 3,489
Karma: 2914715
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) 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. |
Tags |
fonts, multilingual |
|
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 10:40 AM |
Troubleshooting need the fonts in /usr/java/lib/fonts of kindle touch5.0.0 | hanpal | Amazon Kindle | 0 | 02-20-2012 08:51 AM |
Chapter Links/cross-referencing | greenPublisher | Sigil | 1 | 12-07-2011 06:34 PM |
Internal cross referencing | Kumabjorn | General Discussions | 8 | 11-05-2010 12:07 PM |
quick question referencing fixing a typo on an epub | happy_terd | ePub | 2 | 01-30-2010 01:30 PM |