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
http://opengrok.libreoffice.org/xref/libs-gui/vcl/win/source/gdi/winlayout.cxx#2238
4) Still in the Title box, type an English character "a" to make
กินa
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
<http://www.facebook.com/osdev>
Context
- [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
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.