|
|
Home » U++ Library support » U++ Libraries and TheIDE: i18n, Unicode and Internationalization » Help for Indian Language Unicode display
Help for Indian Language Unicode display [message #34180] |
Sat, 29 October 2011 18:07 |
|
deep
Messages: 265 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
I want to display Indian languages Unicode scripts.
I was experimenting with changing the script on the fly with selection buttons.
Most of Indian language scripts are multi tier. Generally 3 some times 4.
"upp-indian-fonts.png" file shows the strings as seen in TheIDE and in Notepad++. The text was created in notepad++ and pasted in TheIDE.
Win 7 It is working fine with proper font selection. Button text displayed properly. If I choose wrong font for the button text display then button text is not displayed correctly but "Title" is always displayed correctly.
"Windows-Screen.png" shows windows 7 screens.
Same code compiled in Ubuntu 10.04 is not showing correct font rendering. But title text is rendered correctly.
"Linux-Screen.png" file shows output.
To check my font installation I pasted the code from TheIDE to emacs ( Ubuntu ). All font rendering is correct.
"Linux-emacs.png" font rendering in emacs on ubuntu.
There are two Indian scripts in the text.
Request for some hints. How to get correct rendering.
Thanks.
Deepak.
Warm Regards
Deepak
|
|
|
|
Re: Help for Indian Language Unicode display [message #34198 is a reply to message #34196] |
Mon, 31 October 2011 15:43 |
|
Hi Deepak,
The reason why the title bar is correct while the button labels are not is because the title is rendered by OS but the content of the window is rendered by U++. I don't understand the code doing this much, but I think it might not be really ready for the multi tier scripts. Hopefully Mirek will be able to give you more detailed info and possibly also fix it.
Best regards,
Honza
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Help for Indian Language Unicode display [message #34420 is a reply to message #34180] |
Mon, 21 November 2011 12:45 |
|
deep
Messages: 265 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
Hi,
I was traveling last 2 weeks. Hence could not work on this.
I have added entries in Draw/FontCR.cpp , entries with 0xffffffff are mine.
{"Microsoft YaHei", 0xfd800000, 0x9ffff00f }, //MS Ya Hei
{"gargi",0xffffffff,0xffffffff}, // Gargi
{"Chandas",0xffffffff,0xffffffff}, // Chandas
// {"Kedage",0xffffffff,0xffffffff}, // Gargi
// {"Mallige",0xffffffff,0xffffffff}, // Gargi
{"Lohit Hindi",0xffffffff,0xffffffff}, // Lohit Hindi
// {"\351\273\221\344\275\223", 0xfd800000, 0x09ffff00 }, // Hei Ti
There is no difference with or without these lines.
But what I noticed is it is using correct font face. These fonts have Ascii and Devanagari Glyphs. Font face selection for rendering is ok but rendering of Devanagari is not correct in linux.
Example of conjunct Devanagari.
Linux rendering. Using RichTextView
Windows rendering
Warm Regards
Deepak
|
|
|
Re: Help for Indian Language Unicode display [message #34467 is a reply to message #34420] |
Thu, 24 November 2011 15:23 |
|
deep
Messages: 265 Registered: July 2011 Location: Bangalore
|
Experienced Member |
|
|
Referring to Lance thread about CJK fonts. I have done some tests.
Results from log file for DDUMP
Results are with following change in struct sRFace
sFontReplacements[] = {
{ "sans-serif", 0xffee0008, 0xdc000801 },
{ "Arial", 0xfffe0000, 0x9c000801 },
{"\346\226\260\345\256\213\344\275\223", 0xfd800000, 0x9ffff00d },//SimSun (or New Song Ti)
{"SimSun", 0xfd800000, 0x9ffff00d },//SimSun (or New Song Ti)
{"\345\256\213\344\275\223", 0xfd800000, 0x9ffff00d }, // Song Ti
{"\345\276\256\350\275\257\351\233\205\351\273\221", 0xfd800000, 0x9ffff00f }, //MS Ya Hei
{"Microsoft YaHei", 0xfd800000, 0x9ffff00f }, //MS Ya Hei
{"gargi",0xffffffff,0xffffffff}, // Gargi
{"Chandas",0xffffffff,0xffffffff}, // Chandas
{"Kedage",0xffffffff,0xffffffff}, // Gargi
{"Mallige",0xffffffff,0xffffffff}, // Gargi
{"Lohit Hindi",0xffffffff,0xffffffff}, // Lohit Hindi
Font f = fnt;
dword tl = chr < 4096 ? 0x80000000 >> (chr >> 7) : 0;
dword th = 0x8000000 >> ((dword)chr >> 11);
// DDUMP(FormatIntHex(chr));
// DDUMP(FormatIntHex(th));
for(int i = 0; i < rface.GetCount(); i++) {
// DDUMP(Font(rface[i], 10));
// DDUMP(FormatIntHex(h[i]));
// DDUMP(FormatIntHex(h[i] & th));
if(((l[i] & tl) || (h[i] & th)) && IsNormal(f.Face(rface[i]), chr)) {
int a = fnt.GetAscent();
FormatIntHex(chr) = 00000930
FormatIntHex(th) = 40000000
Font(rface[i], 10) = <sans-serif:10>
FormatIntHex(h[i]) = dc000801
FormatIntHex(h[i] & th) = 40000000
Font(rface[i], 10) = <gargi:10>
FormatIntHex(h[i]) = ffffffff
FormatIntHex(h[i] & th) = 40000000
FormatIntHex(chr) = 0000093e
FormatIntHex(th) = 40000000
Font(rface[i], 10) = <sans-serif:10>
FormatIntHex(h[i]) = dc000801
FormatIntHex(h[i] & th) = 40000000
Font(rface[i], 10) = <gargi:10>
FormatIntHex(h[i]) = ffffffff
FormatIntHex(h[i] & th) = 40000000
FormatIntHex(chr) = 00000937
FormatIntHex(th) = 40000000
Font(rface[i], 10) = <sans-serif:10>
FormatIntHex(h[i]) = dc000801
FormatIntHex(h[i] & th) = 40000000
Font(rface[i], 10) = <gargi:10>
FormatIntHex(h[i]) = ffffffff
FormatIntHex(h[i] & th) = 40000000
FormatIntHex(chr) = 0000094d
FormatIntHex(th) = 40000000
Font(rface[i], 10) = <sans-serif:10>
FormatIntHex(h[i]) = dc000801
FormatIntHex(h[i] & th) = 40000000
Font(rface[i], 10) = <gargi:10>
FormatIntHex(h[i]) = ffffffff
FormatIntHex(h[i] & th) = 40000000
FormatIntHex(chr) = 0000091f
FormatIntHex(th) = 40000000
Font(rface[i], 10) = <sans-serif:10>
FormatIntHex(h[i]) = dc000801
FormatIntHex(h[i] & th) = 40000000
Font(rface[i], 10) = <gargi:10>
FormatIntHex(h[i]) = ffffffff
FormatIntHex(h[i] & th) = 40000000
FormatIntHex(chr) = 0000093f
FormatIntHex(th) = 40000000
Font(rface[i], 10) = <sans-serif:10>
FormatIntHex(h[i]) = dc000801
FormatIntHex(h[i] & th) = 40000000
Font(rface[i], 10) = <gargi:10>
FormatIntHex(h[i]) = ffffffff
FormatIntHex(h[i] & th) = 40000000
GUI_APP_MAIN
{
for(int i = 0; i < Font::GetFaceCount(); i++)
LOG(Font::GetFaceName(i));
}
Results for font list.
STDFONT
serif
sans-serif
monospace
UnDotum
LMMonoLt10
Samyak Devanagari
Century Schoolbook L
OpenSymbol
Khmer OS System
Nakula
Chandas
LMSansQuot8
Lohit Nepali
LMMathSymbols10
LMRomanSlant9
LMRomanSlant8
LMSans9
LMSans8
Mukti Narrow
Meera
Kalimati
Vemana2000
Lohit Maithili
LMMonoSlant10
Umpush
Purisa
Pothana2000
DejaVu Sans Mono
Norasi
Loma
URW Palladio L
Phetsarath OT
Sawasdee
Sahadeva
Tlwg Typist
URW Gothic L
Dingbats
URW Chancery L
FreeSerif
ori1Uni
WenQuanYi Micro Hei Mono
Kedage
DejaVu Sans
Kinnari
LMSans17
LMSans12
LMSans10
Lohit Punjabi
LMRoman17
LMRoman12
LMRoman10
TlwgMono
Symbol
LMRomanDunh10
LMRoman7
LMRoman6
LMRoman5
LMRoman9
LMRoman8
Bitstream Charter
KacstOne
Lohit Kashmiri
Khmer OS
Liberation Mono
Courier 10 Pitch
Nimbus Sans L
TlwgTypewriter
TakaoPGothic
LMRomanDemi10
Rachana
WenQuanYi Micro Hei
LMMonoCaps10
Samanata
LMMonoLtCond10
Standard Symbols L
Lohit Marathi
Lohit Gujarati
Nimbus Mono L
Nimbus Mono L
Liberation Serif
Lohit Sindhi
Mallige
LMMathItalic10
Nimbus Roman No9 L
LMMathItalic12
LMRomanUnsl10
Lohit Konkani
Liberation Sans
LMMono10
LMMono12
LMMathItalic7
LMMathItalic6
LMMathItalic5
LMMathItalic9
LMMathItalic8
Mukti Narrow
LMMathSymbols6
LMMathSymbols7
LMMathSymbols5
FreeSans
LMMathSymbols8
LMMathSymbols9
Sarai
LMMono8
LMMono9
LMMathExtension10
Lohit Tamil
Tlwg Typo
LMRomanCaps10
UnBatang
Lohit Bengali
LMSansDemiCond10
LMRomanSlant10
LMRomanSlant12
LMRomanSlant17
Waree
gargi
Lohit Hindi
DejaVu Serif
Saab
LMMonoProp10
Garuda
Rekha
URW Bookman L
LMMonoPropLt10
FreeMono
Warm Regards
Deepak
|
|
|
Goto Forum:
Current Time: Fri Sep 20 14:30:54 CEST 2024
Total time taken to generate the page: 0.03446 seconds
|
|
|