Hello,
I am confusing with some strange things when using html tags with Arabic text.
For first for render text in Qlabel i use code:
Code:
1649,1604,1604,1617,1614,1607,1616, 1649,1604,1585,1617,1614,1581,1618, 1605,1614,1648,1606,1616,1649,1604, 1585,1617,1614,1581,1616,1610,1605,1616}; ui->label->setText(p);
The output:
Attachment 8502
there is all right and rendering is properly.
So i am using, for example, <em>arabic symbol</em> and write this code:
Code:
// 60,101,109,62 is <em> tag // 60,47,101,109,62 is </em> tag 1587,1618,1605,1616, 1649,1604,1604,1617,1614,1607,1616, 1649,1604,1585,1617,1614,1581,1618, 1605,1614,1648,1606,1616,1649,1604, 1585,1617,1614,1581,1616,1610,1605,1616}; ui->label->setText(p);
The output:
Attachment 8503
also for this example <span style="color:red">arabic symbol</span>
Code:
// <span style="color:red"> 60,115,112,97,110,32,115,116,121,108,101, 61,34,99,111,108,111,114,58,114,101,100,34,62, 1576,1616, 60,47,115,112,97,110,62, //</span> 1587,1618,1605,1616, 1649,1604,1604,1617,1614,1607,1616, 1649,1604,1585,1617,1614,1581,1618, 1605,1614,1648,1606,1616,1649,1604, 1585,1617,1614,1581,1616,1610,1605,1616}; ui->label->setText(p);
The output:
Attachment 8504
example for only first symbol
Code:
// <span style="color:red"> 60,115,112,97,110,32,115,116,121,108,101, 61,34,99,111,108,111,114,58,114,101,100,34,62, 1576, 60,47,115,112,97,110,62, //</span> 1616,1587,1618,1605,1616, 1649,1604,1604,1617,1614,1607,1616, 1649,1604,1585,1617,1614,1581,1618, 1605,1614,1648,1606,1616,1649,1604, 1585,1617,1614,1581,1616,1610,1605,1616}; ui->label->setText(p);
The output:
Attachment 8505
Why when using html tags rendering is wrong? i check (color and em) in libreoffice with this font and all ok. But qt can't rendering it properly. Need help.
PS. The task is rendering highlighted Arabic text on Qt widgets (QLabel, QTextEdit, etc.)