QFontDatabase: store Vietnamese writingSystemSample() in UTF-16
The old code stored it in UTF-8 with an encoded BOM. Using the new QString::op+=(QStringView), we can store the string, without the BOM, in ten instead of 15 bytes. Change-Id: Ia1c51da523fcd6298b39bf2ec162a49c7cfdda63 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>bb10
parent
920487bf6b
commit
1baf60d18c
|
|
@ -2213,16 +2213,8 @@ QString QFontDatabase::writingSystemSample(WritingSystem writingSystem)
|
|||
sample += QChar(0xac2f);
|
||||
break;
|
||||
case Vietnamese:
|
||||
{
|
||||
static const char vietnameseUtf8[] = {
|
||||
char(0xef), char(0xbb), char(0xbf), char(0xe1), char(0xbb), char(0x97),
|
||||
char(0xe1), char(0xbb), char(0x99),
|
||||
char(0xe1), char(0xbb), char(0x91),
|
||||
char(0xe1), char(0xbb), char(0x93),
|
||||
};
|
||||
sample += QString::fromUtf8(vietnameseUtf8, sizeof(vietnameseUtf8));
|
||||
sample += u"\x1ED7\x1ED9\x1ED1\x1ED3";
|
||||
break;
|
||||
}
|
||||
case Ogham:
|
||||
sample += QChar(0x1681);
|
||||
sample += QChar(0x1682);
|
||||
|
|
|
|||
Loading…
Reference in New Issue