summaryrefslogtreecommitdiffstats
path: root/ksvg/test/fonttest.svg
diff options
context:
space:
mode:
Diffstat (limited to 'ksvg/test/fonttest.svg')
-rw-r--r--ksvg/test/fonttest.svg126
1 files changed, 126 insertions, 0 deletions
diff --git a/ksvg/test/fonttest.svg b/ksvg/test/fonttest.svg
new file mode 100644
index 00000000..29a0ecc3
--- /dev/null
+++ b/ksvg/test/fonttest.svg
@@ -0,0 +1,126 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
+<svg width="800" height="1000" onload="init(evt)">
+<g id="insert">
+</g>
+
+<script language="JavaScript">
+var FAM1 = "Arial";
+var FAM2 = "LucidaSansUnicode";
+var FAM3 = "MS-Gothic";
+
+var entry_y = 10;
+var entry_dy = 16;
+
+var entry1_x = 10;
+var entry2_x = 100;
+var entry3_x = 190;
+var entry_end = entry2_x + entry3_x + 30;
+
+var entry1_count = entry_y;
+var entry2_count = entry_y;
+var entry3_count = entry_y;
+
+var doc, insert;
+
+function draw_grid(one, two)
+{
+ var element = doc.createElement("line");
+ element.x1.baseVal.value = Math.floor(one);
+ element.y1.baseVal.value = Math.floor(two) + (entry_dy / 2) - 4;
+ element.x2.baseVal.value = Math.floor(one) + entry_end;
+ element.y2.baseVal.value = Math.floor(two) + (entry_dy / 2) - 4;
+ element.setAttribute("style", "stroke-width:1px; stroke:black; opacity:0.5");
+
+ insert.appendChild(element);
+}
+
+function entry(text, one, two, what)
+{
+ var element = doc.createElement("text");
+
+ use = FAM1;
+ if(what == 1)
+ {
+ use = FAM2;
+ }
+ else if(what == 2)
+ {
+ use = FAM3;
+ }
+
+ element.x.baseVal.getItem(0).value = one;
+ element.y.baseVal.getItem(0).value = two;
+ element.firstChild.data = text;
+ element.setAttribute("font-family", use);
+ element.setAttribute("font-size", "12");
+
+ insert.appendChild(element);
+
+ return entry_dy;
+}
+
+function entry1(text)
+{
+ draw_grid(entry1_x, entry1_count);
+
+ entry1_count += entry(text, entry1_x, entry1_count, 0);
+}
+
+function entry2(text, what)
+{
+ entry2_count += entry(text, entry2_x, entry2_count, what);
+}
+
+function entry3(text, what)
+{
+ entry3_count += entry(text, entry3_x, entry3_count, what);
+}
+
+function init(evt)
+{
+ var target = evt.target;
+ doc = target.ownerDocument;
+
+ insert = doc.getElementById("insert");
+
+ entry1("Arabic", 0); entry2("", 0); entry3("السلام عليكم ", 0);
+ entry1("Bengali", 0); entry2("বাঙ্লা", 0); entry3("ষাগতোম", 0); // Which lang?
+ entry1("Burmese", 0); entry2("", 0); entry3("မ္ရန္မာ", 0); // Which lang?
+ entry1("Cherokee", 0); entry2("ᏣᎳᎩ", 0); entry3("ᎣᏏᏲ", 0); // Which lang?
+ entry1("Czech", 0); entry2("česky", 0); entry3("Dobrý den", 0);
+ entry1("Danish", 0); entry2("Dansk", 0); entry3("Hej, Goddag", 0);
+ entry1("English", 0); entry2("", 0); entry3("Hello", 0);
+ entry1("Esperanto", 0); entry2("", 0); entry3("Saluton", 0);
+ entry1("Estonian", 0); entry2("", 0); entry3("Tere, Tervist", 0);
+ entry1("Finnish", 0); entry2("Suomi", 0); entry3("Hei", 0);
+ entry1("French", 0); entry2("Français", 0); entry3("Bonjour, Salut", 0);
+ entry1("German", 0); entry2("Deutsch Nord", 0); entry3("Guten Tag", 0);
+ entry1("German", 0); entry2("Deutsch Süd", 0); entry3("Grüß Gott", 0);
+ entry1("Georgian", 0); entry2("ქართველი", 0); entry3("გამარჯობა", 0); // Which lang?
+ entry1("Gujarati", 0); entry2("", 0); entry3("ગુજરાતિ", 0); // Which lang?
+ entry1("Greek", 0); entry2("Ελληνικά", 0); entry3("Γειά σας", 0);
+ entry1("Hebrew", 1); entry2("", 1); entry3("שלום", 1);
+ entry1("Hindi", 0); entry2("", 0); entry3("नमस्ते, नमस्कार।", 0); // Which lang?
+ entry1("Italiano", 0); entry2("", 0); entry3("Ciao, Buon giorno", 0);
+ entry1("ɪŋglɪʃ", 1); entry2("", 1); entry3("hɛləʊ", 1); // Which lang here?
+ entry1("Maltese", 1); entry2("", 1); entry3("Ċaw, Saħħa", 1);
+ entry1("Nederlands", 0); entry2("", 0); entry3("Hallo, Dag", 0);
+ entry1("Norwegian", 0); entry2("Norsk", 0); entry3("Hei, God dag", 0);
+ entry1("Punjabi", 0); entry2("", 0); entry3("ੁਪੁਂਜਾਬਿ", 0); // Which lang?
+ entry1("Polish", 0); entry2("", 0); entry3("Dzień dobry, Hej", 0);
+ entry1("Russian", 0); entry2("Русский", 0); entry3("Здравствуйте!", 0);
+ entry1("Slovak", 0); entry2("", 0); entry3("Dobrý deň", 0);
+ entry1("Spanish", 1); entry2("Español", 1); entry3("‎¡Hola!‎", 1);
+ entry1("Swedish", 0); entry2("Svenska", 0); entry3("Hej, Goddag", 0);
+ entry1("Thai", 0); entry2("ภาษาไทย", 0); entry3("สวัสดีครับ, สวัสดีค่ะ", 0); // Which lang?
+ entry1("Turkish", 0); entry2("Türkçe", 0); entry3("Merhaba", 0);
+ entry1("Vietnamese", 0); entry2("Tiếng Việt", 0); entry3("Xin Chào", 0);
+ entry1("Yiddish", 1); entry2("ײַדישע", 1); entry3("דאָס הײַזעלע ", 1);
+ entry1("Japanese", 2); entry2("日本語", 2); entry3("こんにちは, コンニチハ", 2);
+ entry1("Chinese", 2); entry2("中文,普通话,汉语", 2); entry3("你好", 2);
+ entry1("Cantonese", 2); entry2("粵語,廣東話", 2); entry3("早晨, 你好", 2);
+ entry1("Korean", 0); entry2("한글", 0); entry3("안녕하세요, 안녕하십니까", 0); // Which lang?
+}
+</script>
+</svg>