Subject: Re: bug#8562: Emacs 23.1 and later don't work in windows 98

From: Eli Zaretskii <[email-masked]>
Date: Fri, 03 Jun 2011 10:10:38 +0300

> Date: Fri, 3 Jun 2011 01:41:59 +0200
> From: oslsachem <[email-masked]>
> Cc: [email-masked]
> 
> > OK, so let's call GetOutlineTextMetricsW and GetTextMetricsW in Emacs
> > through function pointers, like the sample program did.  Let's see if
> > that works.  You will need to declare hm_unicows `extern' in w32font.c [...]
> 
> It works! :)
> 
> There isn't any error in the debugger and the program quits cleanly:
> 
> http://www.speedyshare.com/files/28780096/Emacs-23.3GDBSizeOK.txt

Good.  I will prepare a patch for you to try along these lines, but
I'd really be glad if someone beats me to it.

> http://www.speedyshare.com/files/28780099/Emacs23BufferTests.png
> 
> The previous image represents approximately the following sequence of
> characters:
> 
> aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
> 
>                                    (a line of spaces)
> OOOOOOOOOOOOOOOOOOOO
> TTTTTTTTTTTTTTTTTTTT
> SSSSSSSSSSSSSSSS
> XXXXXXXXXXXXXXXXXXXXX
> .....................................
> :::::::::::::::::::::::::::::::::::::
> JJJJJJJJJJJJJJJJJJJJJJJJJJ
> 33333333333333333333333
> 77777777777777777777
> ????????????????????
> >>>>>>>>>>>>>>>>>
> XXXXXX XXXXXX XXXXXX
> 
> That is, the cursor doesn't advance enough and so consecutive
> characters overlap.
> Also, the Space and the End Of Line are represented as an empty square
> that advances the cursor correctly.

It's more than overlap, it sounds like the font is not really working
(empty squares mean the character has no glyphs in the font).  I will
look into this when I have time, but in the meantime, please try the
same in an Emacs invoked with "-xrm Emacs.fontBackend:gdi", and see if
these problems persist with the GDI font driver.