U++ framework
Do not panic. Ask here before giving up.

Home » U++ Library support » FileSel&FileList, Path » FileSel bug when displaying Han characters
Re: FileSel bug when displaying Han characters [message #15023 is a reply to message #15022] Wed, 26 March 2008 11:55 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14291
Registered: November 2005
Ultimate Member
Oh, great. Looks like GetTextSize does not work with CJK:

void MyApp::Paint(Draw& w)
{
	w.DrawRect(GetSize(), SWhite);
	String txt = "皆の日本語";
	Size sz = GetTextSize(txt, Arial(30));
	w.DrawRect(100, 100, sz.cx, sz.cy, LtGray());
	w.DrawText(100, 100, txt, Arial(30));
}

GUI_APP_MAIN
{
	SetDefaultCharset(CHARSET_UTF8);
	MyApp().Run();
}


I was going down and it finally turned out that "GetCharWidthABC" does not return correct sizes for whatever reason. Just great...

(in void FontInfo::Data::GetMetrics(int page, CharMetrics *t))

Mirek
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Getting the file type. (binary vs text files)
Next Topic: FileSel ExecuteSaveAs replace file prompt bug
Goto Forum:
  


Current Time: Mon Sep 07 17:28:14 GMT+2 2026

Total time taken to generate the page: 0.00792 seconds