Hi Tantai,

> I'm trying to fix this bug 
> http://qa.openoffice.org/issues/show_bug.cgi?id=103897. 
> 
> In windows Vista and windows 7, Segoe UI is set as default font for UI. When 
> starting OpenOffice.org with "Use system font for user interface" option, the 
> input box or UI text will be displayed overlapped when there is thai text 
> mixed with western text. I have tried to set windows UI font to Verdana, the 
> text also overlapped. I found that these fonts, Segoe UI and Verdata doesn't 
> have thai gryphs. But if I set the font to Tahoma (this font have Thai 
> gryphs), the OpenOffice.org input box and UI text will be displayed 
> correctly. I suspect that if OpenOffice.org use a UI font without thai gryph, 
> the text will be display overlapped when there are Thai characters mixed in 
> the text. 
> 
> Since vcl and outdev functions are very complex. Can anyone tell me where 
> should I start?

The problem has several aspects:
1) the default-UI font does not support the UI language
2) this problem is usually checked for but the check seems to fail in your case
3) the problem with the overlapping text runs

So here are some things I would ask or test or debug:

1) I guess you are using a Thai OOo on a non-Thai (e.g. english Vista)?

2) if the assumption above is true then the heuristic used in the check would 
fail. The code for the check is in vcl/source/window/window.cxx and the test 
method is Window::ImplCheckUIFont(). It seems to assume that the text for 
typical UI buttons is a good representation of the text used in all other parts 
of the UI. Please debug and analyze what is wrong with the test string and the 
check.

3) the problem with the overlapping text runs can be caused by several 
sub-issues:
a) the composition of the UI string, e.g. for keyboard accellerated option 
highlighting
   this would be code in vcl that uses TEXT_DRAW_MNEMONIC somewhere
b) for the currency listbox in your sample there were problem with the text 
composition regarding BiDi like i78466, maybe you find
     http://www.openoffice.org/issues/show_bug.cgi?id=78466#desc9 and followups 
interesting
c) the part where it is drawn, AFAIK a lot of that stuff is in svtools and the 
classes are named something like Outliner
d) if the string and the positions are alright then there is a feature called 
"glyph fallback" that helps in cases where the font and the text mismatch. For 
debugging that please look into
    vcl/source/gdi/outdev3.cxx vcl/source/gdi/sallayout.cxx 
vcl/win/source/gdi/winlayout.cxx

Happy debugging and hacking!
Herbert


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to