Char width and text output


Subject: Char width and text output
From: Henrik Berg (henrik@lansen.se)
Date: Wed Jan 26 2000 - 19:17:46 CST


There is something rotten in the state of Denmark - no that's Hamlet - I mean in using charwidth for output.

If we use charwidth to determine where the cursor should be then all chars should be printed ONE by ONE. But right now (in Win32) sometimes blocks are printed all together, and sometimes on char is printed on the position found by adding all charwidth up to that char. The cursor is also placed on this add all charwidth place.

This can't work. If only having US or Latin1 support in mind, the fact that kerning makes the actual length of a printed word shorter, breaks this method. And adding X other i18n issues makes it even more broken.

Can this be done in some way that printing a word/block fills an array of positions that is correct for this word/block. What is the most XP way?

--hb



This archive was generated by hypermail 2b25 : Wed Jan 26 2000 - 19:21:41 CST