mirror of
https://github.com/libsdl-org/SDL.git
synced 2025-09-28 22:18:28 +00:00
Add more Unicode tests to testmessage, improve fallback fonts in X11TK (#14042)
This commit is contained in:
@@ -115,14 +115,14 @@ static const char g_ToolkitFontLatin1Fallback[] =
|
|||||||
"-*-*-*-*-*--*-*-*-*-*-*-iso8859-1";
|
"-*-*-*-*-*--*-*-*-*-*-*-iso8859-1";
|
||||||
|
|
||||||
static const char *g_ToolkitFont[] = {
|
static const char *g_ToolkitFont[] = {
|
||||||
"-*-*-medium-r-normal--*-%d-*-*-*-*-iso10646-1", // explicitly unicode (iso10646-1)
|
"-*-*-medium-r-normal--*-%d-*-*-*-*-iso10646-1,*", // explicitly unicode (iso10646-1)
|
||||||
"-*-*-medium-r-*--*-%d-*-*-*-*-iso10646-1", // explicitly unicode (iso10646-1)
|
"-*-*-medium-r-*--*-%d-*-*-*-*-iso10646-1,*", // explicitly unicode (iso10646-1)
|
||||||
"-misc-*-*-*-*--*-*-*-*-*-*-iso10646-1", // misc unicode (fix for some systems)
|
"-misc-*-*-*-*--*-*-*-*-*-*-iso10646-1,*", // misc unicode (fix for some systems)
|
||||||
"-*-*-*-*-*--*-*-*-*-*-*-iso10646-1", // just give me anything Unicode.
|
"-*-*-*-*-*--*-*-*-*-*-*-iso10646-1,*", // just give me anything Unicode.
|
||||||
"-*-*-medium-r-normal--*-%d-*-*-*-*-iso8859-1", // explicitly latin1, in case low-ASCII works out.
|
"-*-*-medium-r-normal--*-%d-*-*-*-*-iso8859-1,*", // explicitly latin1, in case low-ASCII works out.
|
||||||
"-*-*-medium-r-*--*-%d-*-*-*-*-iso8859-1", // explicitly latin1, in case low-ASCII works out.
|
"-*-*-medium-r-*--*-%d-*-*-*-*-iso8859-1,*", // explicitly latin1, in case low-ASCII works out.
|
||||||
"-misc-*-*-*-*--*-*-*-*-*-*-iso8859-1", // misc latin1 (fix for some systems)
|
"-misc-*-*-*-*--*-*-*-*-*-*-iso8859-1,*", // misc latin1 (fix for some systems)
|
||||||
"-*-*-*-*-*--*-*-*-*-*-*-iso8859-1", // just give me anything latin1.
|
"-*-*-*-*-*--*-*-*-*-*-*-iso8859-1,*", // just give me anything latin1.
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
#define G_TOOLKITFONT_SIZE 120
|
#define G_TOOLKITFONT_SIZE 120
|
||||||
|
@@ -194,6 +194,106 @@ int main(int argc, char *argv[])
|
|||||||
quit(1);
|
quit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Various other Unicode tests */
|
||||||
|
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||||
|
"Latin",
|
||||||
|
"Türkçe özellikle çok güzel bir dil.\nBjörn/Bjørn\nÆgypt",
|
||||||
|
NULL);
|
||||||
|
if (!success) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s", SDL_GetError());
|
||||||
|
quit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||||
|
"Arabic",
|
||||||
|
"يتم استخدام أنظمة الكتابة لتسجيل اللغة البشرية.",
|
||||||
|
NULL);
|
||||||
|
if (!success) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s", SDL_GetError());
|
||||||
|
quit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||||
|
"Cyrillic (Ukranian)",
|
||||||
|
"Для запису людської мови використовуються системи письма.",
|
||||||
|
NULL);
|
||||||
|
if (!success) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s", SDL_GetError());
|
||||||
|
quit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||||
|
"Japanese",
|
||||||
|
"文字体系は人間の言語を記録するために使用されます。",
|
||||||
|
NULL);
|
||||||
|
if (!success) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s", SDL_GetError());
|
||||||
|
quit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||||
|
"Indian",
|
||||||
|
"लेखन प्रणालियों का उपयोग मानव भाषा को रिकॉर्ड करने के लिए किया जाता है।",
|
||||||
|
NULL);
|
||||||
|
if (!success) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s", SDL_GetError());
|
||||||
|
quit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||||
|
"Korean",
|
||||||
|
"문자 체계는 인간의 언어를 기록하는 데 사용됩니다.",
|
||||||
|
NULL);
|
||||||
|
if (!success) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s", SDL_GetError());
|
||||||
|
quit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||||
|
"Thai",
|
||||||
|
"ระบบการเขียนใช้เพื่อบันทึกภาษาของมนุษย์",
|
||||||
|
NULL);
|
||||||
|
if (!success) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s", SDL_GetError());
|
||||||
|
quit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||||
|
"Greek",
|
||||||
|
"Τα συστήματα γραφής χρησιμοποιούνται για την καταγραφή της ανθρώπινης γλώσσας.",
|
||||||
|
NULL);
|
||||||
|
if (!success) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s", SDL_GetError());
|
||||||
|
quit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||||
|
"Hebrew",
|
||||||
|
"מערכות כתיבה משמשות לרישום שפה אנושית.",
|
||||||
|
NULL);
|
||||||
|
if (!success) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s", SDL_GetError());
|
||||||
|
quit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||||
|
"Armenian",
|
||||||
|
"Գրային համակարգերը օգտագործվում են մարդկային լեզուն գրանցելու համար։",
|
||||||
|
NULL);
|
||||||
|
if (!success) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s", SDL_GetError());
|
||||||
|
quit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
success = SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR,
|
||||||
|
"Georgian",
|
||||||
|
"წერის სისტემები გამოიყენება ადამიანის ენის ჩასაწერად.",
|
||||||
|
NULL);
|
||||||
|
if (!success) {
|
||||||
|
SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Error Presenting MessageBox: %s", SDL_GetError());
|
||||||
|
quit(1);
|
||||||
|
}
|
||||||
|
|
||||||
button_messagebox(NULL);
|
button_messagebox(NULL);
|
||||||
|
|
||||||
/* Test showing a message box from a background thread.
|
/* Test showing a message box from a background thread.
|
||||||
|
Reference in New Issue
Block a user