freebangfont-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freebangfont-devel] Re: [Issue N22662] Bengali rendering bugs in Qt 3


From: qt-bugs
Subject: [Freebangfont-devel] Re: [Issue N22662] Bengali rendering bugs in Qt 3.2 beta
Date: Wed, 21 May 2003 12:01:33 +0200

Hi deepayan,

On Tuesday, 20. May 2003 00:08 Deepayan Sarkar wrote:
> thanks for the wonderful work on Opentype support in Qt. Here are a
> few bug reports about Bengali rendering in the just released Qt 3.2
> beta.

Thanks for your report :)

> Attached are a test file (UTF-8 encoded), a screenshot of what it
> should look like (yudit-qt-test.png) and another of how it actually
> looks like (kate-qt-test.png) with this font
>
> http://www.stat.wisc.edu/~deepayan/Bengali/FreeBangTemplate/BanglaTemplate.ttf
>
> 1. ya-phala
> ===========
>
> This is a minor bug, I think. Bengali fonts should contain a lookup
> for replacing
>
> 09AF + 09CD
>
> by a 'ya-phala' glyph. This is supposed to be done by the lookup 'Post
> Base Forms' (pstf) --- refer to
>
> http://www.microsoft.com/typography/otfntdev/bengalot/features.htm
>
> (section on "Post-base form of consonant")
>
> Akaash and Mukti, two of the fonts available from the Free Bangla
> Fonts site, had this substitution listed under the 'Post Base
> Substitutions' (psts) lookup, but that's a mistake. Qt 3.2 beta
> renders this correctly when psts is used, but not when pstf is used.

A simple typo. I used psbf as the table name not pstf. I was mainly
testing with mukta, and this one rendered the combination correctly.

> 2. a + ya-phala
> ===============
>
> The sequence 0985 09CD 09AF 09BE is not rendered correctly.
> (Microsoft's engine doesn't render this correctly either yet, but it
> will.)
>
> I quote from http://www.unicode.org/faq/indic.html#13
>
> ------------
>
> Q: What are the Bengali characters used to transcribe the sound "a"
>    (as in English "bat") in Unicode?
>
>
> A: In Bengali, the sequence "zophola" (U+09CD U+09AF) + the "aa" matra
>    (U+09BE) is used for transcribing the English "a" in "bat". This
>    zophola_aa can be seen as a special "composite" matra to write a
>    new Bengali sound, imported from English. Represent these sequences
>    using a halant (virama):
>
>    Vowel_A_zophola_AA = 0985 09CD 09AF 09BE ( a- halant ya -aa )
>    Vowel_E_zophola_AA = 098F 09CD 09AF 09BE ( e- halant ya -aa )
>
>    If you need to add a candrabindu or other combining mark in the
>    sequence, represent the sequence as:
>
>    Vowel_A_zophola_AA + candrabindu = 0985 09CD 09AF 09BE 0981
>    ( a- halant ya -aa candrabindu )
>
> --------------

Ok, that's something new for me. I always thought combinations of
independent vowels+halant were forbidden, and that's how I handled it
in Qt. Looks like I need an exception for bengali.

The faq entry you quote is not 100% clear to me. Does this mean any
combination of

independent vowel + halant + ya + -aa

forms a valid syllable in bengali?

What about the general
vowel + halant + consonant + matra
case?

I've worked around this for now by treating an Independent Vowel at the
start of a syllable identical to a consonant for syllable breaking
rules in Bengali, so your example renders correctly. I do however not
know if this breaks anything else.

> 3. Reph and ra-phala
> ====================
>
> There are two different lookups that substitute 09B0 + 09CD, namely
> rphf and blwf. Qt seems to confuse the two sometimes, but I haven't
> been able to figure out exactly what triggers it. Everything seems
> fine when the consonant following 09B0 + 09CD is the last glyph in the
> syllable, so perhaps it's a problem in reordering the glyphs.
>
> The test file contains some examples, I can supply more if you want.

Found the bug, thanks.

> 4. ZWNJ (U+200C) and ZWJ (U+200D)
> =================================
>
> (Qt doesn't seem to have any support for this at all, maybe you
> haven't started on this part yet.)

I actually didn't know about it. Maybe something I ocerlooked from my
side, but actually MS open type specs do not write about it neither.

> This is very important for bengali (probably not so much for other
> Indic scripts). The general usage is as variations on the normal
> substitution rules. Consider the following forms:
>
> (a) k1 + H
> (b) k1 + H + k2
>
> (c) k1 + H + ZWNJ
> (d) k1 + H + ZWJ
>
> (e) k1 + H + ZWNJ + k2
> (f) k1 + H + ZWJ + k2
>
> where k1 and k2 are consonants and H is the halant character (U+09CD).
>
> In case (a), the sequence of lookups is
>
> k1 + H -> halant form of k1 (via the haln lookup)
>
> In case (b), the sequence is
>
> k1 + H + k2 -> [half form of k1 (half)] + k2
>             -> half-k1 + k2 conjunct (pres) (if that substitution is
>             present)
>
> Both these are rendered OK.
>
>
> Cases (c) and (d) are supposed to be rendered as
>
> k1 + H + ZWNJ -> halant form of k1 (haln)
> k1 + H + ZWJ  -> half form of k1 (half)
>
>
> Cases (e) and (f) should be
>
> k1 + H + ZWNJ + k2 -> [halant form of k1 (haln)] + k2
> k1 + H + ZWJ  + k2 -> [half form of k1 (half)] + k2
>
> (i.e., same as cases (c) and (d), with further 'pres' substitutions
> suppressed.)
>
>
> Currently Qt displays a box in cases (c) - (f).
>
> Some references on this (neither as comprehensive as I would have
> liked):
>
> http://www.unicode.org/faq/indic.html#19
> http://www.microsoft.com/typography/otfntdev/bengalot/other.htm

Ok, these should work aswell now. Please test.

> I think that's all the problems I have noticed.
>
> A couple of related questions. Does Qt 3.2 do any GPOS lookups yet ?
> And some fonts that should be available through fontconfig are not
> listed in the Font chooser dialogs. Is that a Qt problem or a bug in
> my system ?

Qt uses the GPOS tables if they are available.

Hmmm... there was a bug in the fontdatabase. It was emitting the first
font (alphabetically) in your font list in some cases.

I patched qt-copy in KDEs CVS to include the fixes. I've also attached
them here against the beta in case you're not using qt-copy.

Best regards,
Lars

--
Lars Knoll, Senior Software Engineer
Trolltech AS, Waldemar Thranes gt. 98, N-0175 Oslo, Norway

Attachment: patch.diff
Description: Text Data

Attachment: bengali.diff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]