[Libreoffice] Please help us work on VCL bug #33090 - Thai text in some UI elements will be displayed overlapped on Windows Vista / Windows 7

Samphan Raruenrom samphan at osdev.co.th
Mon Mar 21 04:18:03 PDT 2011

I'm working on this bug : https://bugs.freedesktop.org/show_bug.cgi?id=33090
"Thai text in some UI elements will be displayed overlapped on Windows 
Vista / Windows 7"

I've tried debugging the bug. Note: You must set the Option to "use 
system font for user interface" and the system font must not have Thai 
glyph (such as Segoe UI) so fallback mechanism kick-in.

Here's the steps I've tried.

1) First attach the debugger to the LO process, then

2) In Writer, choose File > Properties > Description tab > Title box, type
(Using Thai keyboard, type "dbo")

3) Then set the breakpoint at the (*pScriptTextOut)() call here

4) Still in the Title box, type an English character "a" to make
The character "a" will be displayed *over* "น" which is the 
characteristic of this bug. The English text run will be displayed 
starting after the first non-spacing mark ( ิ )

5) The breakpoint will fire. LO is about to textout the Thai run "กิน". 
Let's take note of some variables
aPos.nA = 0x9c --> X
aPos.nB = 0x39 --> Y
  (mpGlyphAdvances + nMinGlyphPos)[] = [7, 0, 7, 6] --> the width of 
each character in "กินa"

6) In the debugger, run to continue debugging. The breakpoint will fire 
again. LO is about to textout the English run "a". Let's look at the 
variables again:-
aPos.nA = 0xa3  --> X
aPos.nB = 0x39  --> Y
  (mpGlyphAdvances + nMinGlyphPos)[] = [6] --> the width of the 
character "a"

Please note that the value of aPos.nA should be 0xaa (0x9c + 7 + 0 + 7) 
but it is 0xa3 (0x9c + 7). It seems like that computation of the width 
of the last text run is stop at the first non-spacing character. We can 
repeat the same process with different text and always reach the same 
conclusion. However, we can't find the code that compute the aPos.nA 
before textout each run.

Anyone has an idea where should I start looking?
_/|\_ /Samphan Raruenrom./  Osdev - Open Source Development Co., Ltd.
/สัมพันธ์ ระรื่นรมย์./  โอเอสเด็บ - บริษัท โอเพนซอร์สดิเวลอปเมนต์ จำกัด
tel: +66 2 269 9889  web: osdev.co.th <http://www.osdev.co.th/>
twitter: @osdev <http://twitter.com/osdev>  facebook: facebook.com/osdev 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20110321/bf3e8a3c/attachment.html>

More information about the LibreOffice mailing list