Subject: Re: Support for combining/composing characters

From: Nadim Shaikli <[email-masked]>
Date: Wed, 11 Jun 2003 15:19:08 -0700 (PDT)

Marcus, I just tried 'snap-20030611' with regard to combining
(which also includes composing -- that's what unicode calls the
act of 'superimposing of characters atop each other').  As far
as arabic is concerned, still no composing is taking place.  I'm
wondering if you are abiding by the order of things that were
suggested (it seemed like that was an issue before),

  http://www.hpc.uh.edu/fvwm/archive/0306/msg00042.html

I can mail you sample test cases and fonts off-list if you'd like.
Its rather simple really - you'll need,

 + a font
 + a sample minimal .fvwm2rc
 + an xterm invoking script with the title to be composed
 + an image of the expected results (to compare against)

I took a very quick peek at the code and don't see any considerations for
true composing (and not replacing - what did I overlook ?).  Case in point
0x0646 followed by 0x064E, don't see how composing is being taken care of
(there is no resulting stand-alone glyph for what's noted) they need to
be superimposed on top of each other.

Regards (& keep up the great work coming),

 - Nadim

__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Marcus Lundblad <[email-masked]>
Date: Thu, 12 Jun 2003 18:12:08 +0200 (CEST)

> Its rather simple really - you'll need,

Yes, that would be nice.
Thank you.

> be superimposed on top of each other.

Yes, the first thing I did (which is in current CVS), is to combine for
those characters were a composed glyph (equivalent to a base character and
one or more combining characters) exists in Unicode.

The next part (which I have more or less working, need some testing), is
to pick out those remaining composing characters (like U+064E) into a list
of (position,value) and also reoreder those positions after BIDI is
applied.

The next thing to do (the most complicated, I'm afraid), is to draw those
composing characters on top of the "normal" characters.
The hard thing, as it seems to me, is to calculate the position of each
character in the ordinary string.
One way is to draw each character separately and take care of all
composing characters for a given character. The other might be to first
draw the "base" string, then use the "TextLength" routine to
"backtrack" the positions (in pixels) of each individual character.

//Marcus

> Regards (& keep up the great work coming),
Thank you! (Shukran)

---

From: Nadim Shaikli <[email-masked]>
Date: Tue, 17 Jun 2003 23:20:00 -0700 (PDT)

--- Marcus Lundblad <ml update.uu.se> wrote:
[snip snip]
> > Its rather simple really - you'll need,

Marcus, I mailed ya a tarball a few days ago of all the files you'd
require off-list - hope you got it.

> one or more combining characters) exists in Unicode.

Yeah saw that.
 
> of (position,value) and also reoreder those positions after BIDI is

Sounds good.
 
> The next thing to do (the most complicated, I'm afraid), is to draw
> those composing characters on top of the "normal" characters.
> The hard thing, as it seems to me, is to calculate the position of
> each character in the ordinary string. One way is to draw each
> character separately and take care of all composing characters for
> a given character. The other might be to first draw the "base" string,
> then use the "TextLength" routine to "backtrack" the positions (in pixels)
> of each individual character.

Yeah, this is where I get lost.  I haven't looked at how other
applications do it as this might be a source of enlightenment (you
might consider doing that).  Unless I'm misunderstanding you though,
I don't see why you'd care to know the TextLength.  The way I view
this (and I could off mark here), one could simply right-align the
glyphs and draw them on top of each other (order should not matter).
The glyphs should be designed in such a manner so that superimposing
these composing glyphs remains within the realm of self-alignment (any
overlap ought to be considered a fault of the font file and not of the
superimposing process).

Regards,

 - Nadim

SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com