05-14-2012, 10:30 PM | #1 |
Member
Posts: 11
Karma: 10
Join Date: Apr 2012
Device: Kindle
|
Problem embedding font for Sanskrit
I have been trying to embed the Liberation font in an ebook that includes quotations in Sanskrit, which include a lot of diacritical marks.
The marks appear in a few readers, but not in ADE. I have tried many different things, but the letters with diacriticals appear as rectangles with X's inside or they're just blank. I have read that the Liberation font includes a large number of unicode glyphs and that it should work for this application. However, when I have downloaded the font -- multiple times -- I sometimes see that only about 700 glyphs are included. I am wondering if it could be that I'm not getting the glyphs I need. If anyone can help me figure this one out, I'd be very grateful. I'd be happy to post what I'm doing if it seems like it would help. Does it matter whether I use ttf or otf version? Thanks a lot. |
05-15-2012, 02:42 AM | #2 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
The first action would be making sure the font contains the glyphs you need. Then, if you embed the font correctly, it will work in ADE.
A few pointers: 1. mind the case of font-name. Not only the file, but also the name and family itself. 2. make sure you specify the @font-face correctly 3. make sure you specify the font in a class attached to the text |
Advert | |
|
05-15-2012, 03:07 AM | #3 |
Grand Sorcerer
Posts: 5,635
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
ADE can handle combined glyphs. Most likely your problems were caused by the font. For example Annapurna SIL works fine, but contains only basic Devanagari characters.
Last edited by Doitsu; 05-15-2012 at 03:14 AM. |
05-20-2012, 12:15 PM | #4 |
Member
Posts: 11
Karma: 10
Join Date: Apr 2012
Device: Kindle
|
Hi. Thanks very much for your replies. They are very helpful.
However, there are two points you mention that I have been unable to figure out. I've googled them both with no luck. The first is: How do you confirm that a particular glyph exists in a font? The best I've been able to do on this is to open Word, choose the font and enter the unicode for the glyph. Unfortunately, I've found that while the glyph appears in Word, it's still missing in ADE. Second: Where can I find the exact name of the font that should be used in the CSS. The only approach I've been able to find is to open the font in a text editor. However, this doesn't reveal very much. Any suggestions as to how to carry out these two tasks would be much appreciated. Thanks |
05-20-2012, 01:05 PM | #5 | ||
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
Quote:
Code:
@font-face { font-family: "Roman Antique"; font-weight: bold; font-style: normal; src: url("../fonts/RomanAntique-Italic.otf") format("opentype"); } h1, h2, h3 { font-family: "Roman Antique"; font-weight: bold; } |
||
Advert | |
|
05-20-2012, 01:08 PM | #6 | ||
Grand Sorcerer
Posts: 5,635
Karma: 23191067
Join Date: Dec 2010
Device: Kindle PW2
|
Quote:
Quote:
You can use any name that you like. The only thing that ADE cares about is that the font path is correct. For an example, open my Devanagari ePub with Sigil. |
||
07-09-2012, 09:51 AM | #7 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jul 2012
Device: Nook Color CM10
|
@northstar7
I too am working on an ebook that embeds romanized sanskrit with lots of diacriticals. I have embedded Libertine successfully and the Sigil validation passes the epub and the embedding works in my Nook and other android readers I use, but not ADE. Have you had any joy? FYI, the devanagari script isn't included in Linux Libertine, but the Latin Extended Additional segement IS included. (It contains all the less common diacriticals you may be searching for, such as ṛ, ḥ, ṅ etc.) |
07-09-2012, 09:53 AM | #8 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jul 2012
Device: Nook Color CM10
|
Lol @northstar7
lets just say that was n-dot-above, h-dot-below and s-dot-below! It will be useful when forum software supports unicode too! |
07-10-2012, 04:05 AM | #9 |
frumious Bandersnatch
Posts: 7,533
Karma: 19000001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
You mean ṅ, ḥ, ṣ? Those are supported all right by the forum, it must be something with your copy-pasting...
|
07-10-2012, 08:37 AM | #10 | |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Quote:
With ADE you must really mind you p's and q's with regards to the stylesheet. A small mistake in the stylesheet will make ADE ignore the stylesheet and thus font embedding. Try to validate your stylesheet. |
|
07-17-2012, 11:10 PM | #11 |
Junior Member
Posts: 5
Karma: 10
Join Date: Jul 2012
Device: Nook Color CM10
|
Thanks Toxaris. I have validated with http://jigsaw.w3.org/css-validator/validator and all is well with the css, but not withing ADE. Any other suggestions? (Or perhaps another validator to suggest?)
|
07-18-2012, 02:47 AM | #12 |
Wizard
Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Can you post your stylesheet and a part of the XHTML which you want to display in that font? Please note, I would like to see the code of the XHTML page.
|
Tags |
ade, diacricitals, fonts, sanskrit |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Simple Solution for Converting Devnagari (Sanskrit/Hindi) or other font book to epub | Sanjay Agnihotri | ePub | 4 | 05-01-2020 06:44 PM |
Font embedding | sachin | Sigil | 3 | 03-21-2012 09:19 AM |
Problem embedding font into an ePub | mvo | ePub | 16 | 01-03-2012 07:10 PM |
Do I need a font license if all I'm doing is referring to the font (not embedding)? | Stodder | Workshop | 21 | 04-21-2011 04:19 AM |
Another font embedding problem | b.tarde | EPUBReader | 12 | 03-11-2010 01:40 PM |