There's a short Greek footnote in one of my in prep epubs. In trying to reproduce these characters in an epub, I embedded a Greek font (SBL_grk.ttf) in the epub using Sigil, entered a few characters, then checked it with Adobe DE.

None of the characters with diacritics came through (ADE replaced them with ?) whereas those without diacritics were ok. All, including those with diacritics looked ok in Sigil book view (but in code view, those entered using a Greek keyboard, Keyman 7.1, in which the diacritics were added to the glyph in a two-step process - showed only as little boxes)

Are problems with diacritics in ADE a result of a known bug? And why should Sigil code view be different in response to an embedded font compared to book view?

Does anyone know a work-around for ADE?
Bob

theducks

09-23-2010, 08:22 PM

Code them as HTML entities: Φ δ Θ ?

CazMar

09-23-2010, 09:38 PM

I had the same problem on the Kobo with epub - I have found that it's easier to leave the books in PDF format. If I knew what fonts the Kobo used I could call up the hex code or whatever for the Greek letter, but without that information, difficult and I am not sure that the fonts it uses even have Greek diacritics. I guess as our needs are rather ""minority" we are probably not going to see a special software fix!
The other strange workaround might be to cut and past the Greek text as an image, messy but worth a try if it is vital to the book.

bobcdy

09-23-2010, 09:48 PM

Thanks for the info.
- theducks. I'm not entirely sure what you mean by html entity, but I think you meant creating a web page on which the correct glyphs are visible, then importing it into sigil, adding the proper fonts, and creating an epub. I tried this but had no better results than before. I also used Calibre to convert the html, with the same results for Adobe DE.

-CazMar. I thought about using images and I might use an image for the short paragraph if I can't do it any other way. The Greek is in a footnote and is not really important but I like to have everything in the epub that was in the original google book pdf. so I dislike just leaving it out (I also thought about omitting the text and have "(Greek text)" in its place.

I found a few web pages that discuss ADE/diacritics and the general conclusions seemed to be that Adobe DE decided not to support them except for special cases. Perhaps I'll have to use the image method...
Bob

ATDrake

09-24-2010, 12:52 AM

HTML entities are like putting &#x1F9A; in the source wherever you want "Greek Capital Letter Eta with Psili and Varia and Proscegrammeni", which will display this: ᾚ if you've a proper supporting font on your system.

One possibility is that your embedded font may not be Unicode, and whatever mapping it uses doesn't match the encoding of your source page.

Another is that ADE/Sigil code view/whatever, works better with precomposed characters in which the diacritics were designed to be part of the character, rather than the software having to take an existing character and then applying the appropriate diacritics to it. I know there are some other text editing/viewing apps that choke on having to do that.

Perhaps if you could hunt up the entity equivalents for the precomposed versions of the characters you'd like to use, you might have more luck displaying them.

And of course there's always just ADE being buggy and not supporting useful stuff, which is what I'd personally lay money upon.

Speaking as a reader, I'd rather not see text excluded if it's reasonably relevant and possible to put it in in some way. An image is not the optimum solution, but better than nothing, imho. You never know when someone will actually be able to read ancient Greek*. It's too bad there's no inversion of the <object> tag, where you could have text with an image fallback instead of the reverse.

Maybe you might like to try faking it by putting in the text with a link to the image, and a note in the front of the book saying "The original text of this book included footnotes in a language that your e-reader may not display properly. If you find that these footnotes are not appearing to you, please click on them to see an image of the footnote taken from the original text." or words to that effect.

* I'm assuming this is what you need the diacritics for and the more obscure polytonic combinations are giving you trouble, because if ADE truly doesn't support the rather simple few that monotonic modern Greek comes with, then that's really pitiful.

theducks

09-24-2010, 11:30 AM

Thanks for the info.
- theducks. I'm not entirely sure what you mean by html entity, but I think you meant creating a web page on which the correct glyphs are visible, then importing it into sigil, adding the proper fonts, and creating an epub. I tried this but had no better results than before. I also used Calibre to convert the html, with the same results for Adobe DE.

The official source: http://www.w3.org/TR/1999/REC-html401-19991224/sgml/entities.html

There is a "Greek" list near the end in this section :D

bobcdy

09-24-2010, 11:54 AM

ATDrake, theducks - thanks for the help and clarification!

I tried two: small alpha with tonos ά and capital sigma Σ (I used the decimal codes but they don't show in MR). I think that both are common in modern Greek. The capital sigma was visible in ADE whereas the alpha with tonos was not (appeared as ?). It looks like ADE just doesn't like Greek diacritics.

I plan to substitute an image for the Greek footnote; it should work ok but not nearly as satisfactory as would be the Greek text. I wonder why Adobe decided to cripple ADE in so many ways?
Bob

Perhaps the problem lies in the characters accepted by the HTML 4 specs. in the ref. listed in the previous post by theducks:

"This entity set contains all the letters used in modern Greek. However, it does not include Greek punctuation, precomposed accented characters nor the non-spacing accents (tonos, dialytika) required to compose them. There are no archaic letters, Coptic-unique letters, or precomposed letters for Polytonic Greek. The entities defined here are not intended for the representation of modern Greek text and would not be an efficient representation; rather, they are intended for occasional Greek letters used in technical and mathematical works."

omk3

09-24-2010, 01:18 PM

Hello bobcdy.

I am Greek and read Greek ebooks when I can. The font ADE uses doesn't support vowels with tonos, as you noticed - they are replaced with a question mark.
However I have succesfully got around this problem by embedding a greek font in my ebooks, or placing one on my reader and linking to it in the css. Maybe you are not actually making use of your embedded font in the correct place?

If it is only one sentence, though, maybe it is better to use an image rather than embed a whole font anyway.

bobcdy

09-24-2010, 04:30 PM

omk3-

Thanks for the imput. Its interesting that you can embed a Greek font and get it to work in ADE, but I wasn't able to do so. So I ran an experiment to verify my embedding method in sigil.

First, in Sigil I deleted all reference to the Greek font (SBL_grk.ttf), including the font and all css and body tags, then added an all-caps font (Deutgos.ttf) and added a css and a body tag for it, then inside the body tag I typed a combination of small and capital letters. Saved the epub and verified that ONLY capital letters appeared in ADE because of the embedded all-cap font. I think this demonstrates that the embedded font was working correctly.

Next, I deleted the all-caps font, added the Greek font, etc. Used both characters with and without diacritics. Found as usual that only the Greek characters without diacritics appeared in ADE.

The two parts of the experiments seem to me to demonstrate that the Greek font was properly embedded but that ADE discriminated against diacritics.
Bob

pholy

09-24-2010, 04:53 PM

@Bob - I noticed that back in post #5, ATDrake mentioned a distinction between pre-composed Greek Unicode characters and the inability of ADE to compose a character representation from two or more Unicode characters. Have you tried both methods (assuming the character you want exists as a pre-composed Unicode character)?

After my early problems I've only used pre-composed Greek unicode characters or their html decimal codes; combined diacritic plus Greek letter was a problem even for Sigil, much less with ADE. I add the pre-composed letters using PopChar and SBL_grk.ttf font that has a wide variety of Greek glyphs. I also tried other Greek fonts with equal lack of success for ADE and diacritics.
Bob

charleski

09-25-2010, 09:49 AM

Ok, I took a look at the SBL_grk font and the problem is that it's not been properly encoded. I recompiled the font and the modified version works fine in ADE, showing all the diacritics.

Unfortunately, the EULA for the font doesn't allow distribution of modified (i.e. fixed) versions :/. The problem lies with the font, not ADE, so you'll need to find one that's been properly compiled.

omk3

09-25-2010, 11:50 AM

Beat me to it, charleski! After trying to use the font myself to show that it can be done, (in vain I might add), I tried with a different one, and all was fine. So the problem lies with the font. I don't know what exactly its problem was - I thought it might be the font size, but encoding seems more plausible.

I attach an example epub with a greek sentence and an embedded font to show that it can work. The font is GFSArtemisia.ttf, found here http://www.greekfontsociety.gr/pages/en_typefaces20th.html , and the license states that
You may use these fonts for personal and commercial use. These fonts may be freely redistributed, provided that you do not alter them in any way and that you credit GFS for this.

These fonts are distributed free and may not be sold or resold for any purposes.

bobcdy

09-25-2010, 01:13 PM

omk3, charleski,
Great info! I had thought about the font being the problem and had earlier tried two other greek fonts (pala and aegean) but they didn't work either. However, I tried two fonts from the Greek Font Society (GFSPorson.otf and GFSArtemisia.ttf) and BOTH WORKED BEAUTIFULLY in ADE!

Thanks greatly for solving my problem!
Bob

bobcdy

10-03-2010, 09:25 PM

charleski,
In another post you indicated you used Fontforge to recompile the SBL_grk font to get it to work. I tried to do this with my Font Creator and had no luck, and so I downloaded and installed Fontforge. It's really a versatile program, much more so than Font Creator, and free to boot! With it I had no trouble recompiling the font.
Thanks
Bob

gthalas

10-12-2010, 07:32 PM

Beat me to it, charleski! After trying to use the font myself to show that it can be done, (in vain I might add), I tried with a different one, and all was fine. So the problem lies with the font. I don't know what exactly its problem was - I thought it might be the font size, but encoding seems more plausible.

I attach an example epub with a greek sentence and an embedded font to show that it can work. The font is GFSArtemisia.ttf, found here http://www.greekfontsociety.gr/pages/en_typefaces20th.html , and the license states that

I noticed that you have some sony e-readers. I am also a Greek and I have heard that the greek support is problematic in sony devices. How did you insert the extra fonts?
Can you read greek ebooks normally (I mean even those books bought from e-bookstores) or is it just those pdfs that are scanned documents and the reader perceives as images?

omk3

10-13-2010, 06:37 AM

Welcome to the forum, gthalas.

You can certainly read greek text-based pdfs on a sony, though it might not look pretty when you use reflow.

If you have an epub without embedded fonts, as long as it is not drmed, you can either embed a greek font like in my example above (you can use sigil for that), or, if you want to do it for more ebooks, you can place a greek font inside your reader and just alter the css to link to this font. Here is an example of how to do it: http://www.mobileread.com/forums/showthread.php?t=102146

More work than it should be, certainly. Ideally you should just place an ebook into your reader, and start reading, instead of all this tinkering... There are readers that can do that of course, and it's one of them I will be buying next.

Fabe

10-13-2010, 09:51 AM

My diacritical problem is not with Greek, but Pali.

Kaṅkhā-vitaraṇī-purāṇa-ṭīkā and the Kaṅkhā-vitaraṇī-abhinava-ṭīkā

Often, the foreign characters and accented ones come out as ersatz math symbols.

I use Sigil and posted a question about this there. I'm told if I "... ensure
that you are including the encoding declaration [UTF-8] (in XML) and in the
XHTML <meta> element," all will be well. I do not know how to do this correctly.

Any and all advice is appreciated. - Fabe

ATDrake

10-13-2010, 12:00 PM

The XML declaration is <?xml version="1.0" encoding="utf-8"?>, which you put at the very top of every XML/XHTML file.

The encoding declaration is <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />, which goes inside the <head> of every XHTML doc (I generally skip this if I've already got the XML declaration in, but it can't hurt to add it in).

While we are discussing font character display has anyone got a handle on why different files all using identical styles in both cs4 and the CSS have various characters rendering differently. Ie. " ' bullets, en and em dashes. Fine in one chapter, not in the next. It's got me beat and I just edit them out but with 17 more books to go I'd sure like to find the right switch to turn them on and off.