Re: Font Problems



At 12:01 PM 8/23/2002, Owen Taylor wrote:

Roozbeh Pournader <roozbeh sharif edu> writes:

> On Tue, 20 Aug 2002, Eric Mader wrote:
>
> > (Also, while debuggin this, it looks like arabic-xft.c is getting called
> > for *each word* in the Arabic text. I guess that it's finding the space
> > character in another font. This is probably a performance hit...)
>
> I also noticed this, but I guess this is a feature. Owen?

It's not a feature; it's just hard avoid. The idea I've had in
mind for a long time is that some characters should be "neutral"
for shaper selection ... and Pango should just use the same shaper
as for the preceding characters.

What I did in the JDK was to implement a function which returns a script ID for a given Unicode character, based on Unicode TR#24. Given this, I wrote a function which identifies runs of text in the same script, taking "neutral" characters in to account. (TR#24 has a script called "inherited," meaning that the characters inherit the script from the characers surrounding them.)

If we had this function, we could just pass the whole "script run" to the shaper at once. In fact, we could have shapers identify which script they support, instead of (or as well as?) the character range.

FWIW, all of this is also in ICU 2.2. It might be a bit hard to split out though, because the character -> script function is based on ICU's Unicode property implementation, which is quite large. For the JDK, I wrote a little tool in Java which reads the Unicode script data file and writes a bunch of tables.

Regards,
Eric





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