<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=TIS-620">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    <font size="+1">I'm working on this bug :
      <a class="moz-txt-link-freetext" href="https://bugs.freedesktop.org/show_bug.cgi?id=33090">https://bugs.freedesktop.org/show_bug.cgi?id=33090</a><br>
    </font><span id="summary_alias_container"><span
        id="short_desc_nonedit_display">"Thai text in some UI elements
        will be displayed overlapped on Windows Vista / Windows 7"<br>
        <br>
      </span></span><font size="+1">I've tried debugging the bug. Note:
      You must set the Option to &#8220;use system font for user interface&#8221;
      and the system font must not have Thai glyph (such as Segoe UI) so
      fallback mechanism kick-in.<br>
      <br>
      Here's the steps I've tried.<br>
      <br>
      1) First attach the debugger to the LO process, then <br>
      <br>
      2) In Writer, choose File &gt; Properties &gt; Description tab
      &gt; Title box, type<br>
      กิน<br>
      (Using Thai keyboard, type &#8220;dbo&#8221;)<br>
      <br>
      3) Then set the breakpoint at the (*pScriptTextOut)() call here<br>
      <a class="moz-txt-link-freetext" href="http://opengrok.libreoffice.org/xref/libs-gui/vcl/win/source/gdi/winlayout.cxx#2238">http://opengrok.libreoffice.org/xref/libs-gui/vcl/win/source/gdi/winlayout.cxx#2238</a>
      <br>
      <br>
      4) Still in the Title box, type an English character &#8220;a&#8221; to make<br>
      กินa<br>
      The character &#8220;a&#8221; will be displayed *over* &#8220;น&#8221; which is the
      characteristic of this bug. The English text run will be displayed
      starting after the first non-spacing mark ( ิ )<br>
      <br>
      5) The breakpoint will fire. LO is about to textout the Thai run
      &#8220;กิน&#8221;. Let's take note of some variables<br>
      aPos.nA = 0x9c --&gt; X<br>
      aPos.nB = 0x39 --&gt; Y<br>
       (mpGlyphAdvances + nMinGlyphPos)[] = [7, 0, 7, 6] --&gt; the
      width of each character in &#8220;กินa&#8221;<br>
      <br>
      6) In the debugger, run to continue debugging. The breakpoint will
      fire again. LO is about to textout the English run &#8220;a&#8221;. Let's look
      at the variables again:-<br>
      aPos.nA = 0xa3  --&gt; X<br>
      aPos.nB = 0x39  --&gt; Y<br>
       (mpGlyphAdvances + nMinGlyphPos)[] = [6] --&gt; the width of the
      character &#8220;a&#8221;<br>
      <br>
      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.<br>
      <br>
      Anyone has an idea where should I start looking?</font><br>
    <div class="moz-signature">-- <br>
      _/|\_ <i>Samphan Raruenrom.</i>  Osdev - Open Source Development
      Co., Ltd.<br>
      <i>สัมพันธ์ ระรื่นรมย์.</i>  โอเอสเด็บ - บริษัท
      โอเพนซอร์สดิเวลอปเมนต์ จำกัด<br>
      tel: +66 2 269 9889  web: <a href="http://www.osdev.co.th/">osdev.co.th</a><br>
      twitter: <a href="http://twitter.com/osdev">@osdev</a>  facebook:
      <a href="http://www.facebook.com/osdev">facebook.com/osdev</a></div>
  </body>
</html>