Re: [gtk-i18n-list] Re: On CJK font selection (was Re: [Fwd: Re: Request for review and advice on wqy-bitmap-fonts fontconfig settings])



On Thu, 20 Dec 2007 18:40:29 -0500
Behdad Esfahbod <behdad behdad org> wrote:
>> >So, the issue comes down to the fact that:
>> >
>> >  - It's unexpected to enter Latin under Japanese locale.
>> >
>> >  - You have a COMMON character at the beginning of the line.
>> >
>> >  - Your Japanese and Latin fonts have different heights.
>> 
>> I see. The first clause is quite important. I guess, inputting
>> Latin text under Arabic locale might be possible but irregular
>> (right guessing? please let me know), but an insertion of
>> Latin text (to be more correctly, I mean a string of ASCII
>> alphabets) under Japanese locale is popular, especially text
>> around information technology. For example, please check the
>> website of Japanese Standards Association http://www.jsa.or.jp/
>
>Arabic is like Japanese in that regard, no difference.  I actually see
>that coming, should have clarified.  By unexpected, I mean it's not the
>most likely event.  Japanese text coming is more expected.
>
>That said, we don't have that in issue as much in Arabic because it's
>considered bad writing to start an Arabic/Persian paragraph with an
>English word written in Latin.  It also screws bidirectional code in
>Pango and you end up with a left-to-right paragraph (because that's what
>it looks like from your text), so people just avoid it.

I see. Hearing "people just avoid it" is quite interesting.

>> >One way one may suggest is that Pango should reserve a minimum line
>> >height that is enough to fit the default Japanese font, because it's
>> >running under Japanese locale after all.  That would fix the jump from
>> >3' to 4', but makes English-only paragraphs look very ugly and badly
>> >spaced vertically, so that's not an option either.
>> >
>> >The jump from 2' to 3' can't be fixed.  I already proved that.  If one
>> >fixes it, it would introduce the bug that '[' followed by a Japanese
>> >character will choose a separate fonts for those chars, OR, that font
>> >used for '[' will change when you type a Japanese char.
>> 
>> Umm. Is it possible for Pango to bind COMMON characters to single
>> font? I understand the font switching in my example is caused by
>> the fact that the appropriate font to show COMMON character is
>> determined by its context. If the font to show COMMON character is
>> fixed to single font, my problem will be slightly better although
>> the line height shifting still occurs.
>
>But then when rendering a Japanese only text, all the punctuation marks
>will be rendered using a different font!  Now imagine that in a
>monospace text, with bitmap Japanese font and non-bitmap punctuation
>font.

Yes. Do you think it's worse than contextual font switching?
I don't think so. But it's because my fonts have varied/inconsistent
baselines and heights (and their inconsistency makes the contextual
font switching quite ugly), so my disagree is not so strong at present.

Anyway, your mention on bidi reminded me that binding a fixed font
to COMMON characters may confuse bidi glyph shaping of punctuation.
If so, it would be problematic and binding should be disabled even
if it's possible. Oops.

>> >I have two suggestions for what you can do that may achieve better
>> >results for you.
>> >
>> >  - Run under LC_LANG=en_US LC_MESSAGES=ja_JA
>> >
>> >  - Choose a non-generic font family in gedit.  That is, something other
>> >than Sans, Sans-serif, and Monospace.
>> 
>> Oops, it's too application specific...
>
>No.  Give it a try.  It should have the effect you asked for.  All
>punctuation should be chosen from the non-generic font you choose.  I
>said do it in gedit just to test, otherwise it's nothing specific to
>gedit, that's how fontconfig works.

OK, I will try to setup ~/.fonts.conf. It seems that my
request (binding a same font to COMMON character, at
least in Latin & CJK context) can be realized by it - so
it's off-topic to this list? Should I move to fontconfig?
Anyway, thank you for enlightening me.

Regards,
mpsuzuki


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