Writing input controls usually requires a certain knowledge of the scripts it is going to be used in. Arabic or languages from the Indian subcontinent), the width and shape of a glyph changes depending on the surrounding characters, which QTextLayout takes into account. When you write your own text input controls, use QTextLayout.Arabic and Hebrew application strings are usually right aligned, so for these languages use the version of drawText() that takes a QRect since this will align in accordance with the language. This will usually give you left aligned strings. QPainter::drawText(int x, int y, const QString &str) will always draw the string with its left edge at the position specified with the x, y parameters.This means that you don't need to have any knowledge about the writing system used in a particular language, except for the following small points: Support for these writing systems is transparent to the programmer and completely encapsulated in Qt's text engine. QLineEdit, QTextEdit, and derived classes or the Quick TextInput item) and Qt's display controls (e.g. You usually don't have to worry about these features so long as you use Qt's input controls (e.g. Qt tries to take care of all the special features listed above. Common examples are the fl and fi ligatures used in typesetting US and European books. In special contexts, some pairs of characters get replaced by a combined glyph forming a ligature. Some languages such as Vietnamese make extensive use of these marks and some characters can have more than one mark at the same time to clarify pronunciation. Non-spacing or diacritical marks (accents or umlauts in European languages). The exact behavior is defined in the Unicode Technical Annex #9. Arabic and Hebrew are written from right to left, except for numbers and embedded English text which is written left to right. Line breaking can occur either after every character (with exceptions) as in Chinese, Japanese and Korean, or after logical word boundaries as in Thai. Some of the Asian languages are written without spaces between words. Many of these writing systems exhibit special features: On macOS, the following languages are also supported: On Windows, Linux and Unix with FontConfig (client side font support) the following languages are also supported: The list above is supported and will work on all platforms as long as the system has fonts to render these writing systems installed. All scripts in Unicode 6.2 that do not require special processing.Cyrillic languages (Russian, Ukrainian, etc.).All Western languages (using Latin script).All East Asian languages (Chinese, Japanese and Korean). Qt supports most languages in use today, in particular: The built-in font engine is capable of correctly and attractively rendering text that contains characters from a variety of different writing systems at the same time. All input controls and text drawing methods in Qt offer built-in support for all supported languages. Qt tries to make internationalization as painless as possible for developers. But to make a US application usable by Japanese users, or a Korean application usable by German users, will require that the software operate not only in different languages, but use different input techniques, character encodings and presentation conventions. In some cases internationalization is simple, for example, making a US application accessible to Australian or British users may require little more than a few spelling corrections. Internationalization support for text outputĬompares strings according to a localized collation algorithmĬonverts between numbers and their string representations in various languages
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |