Showing posts with label Mac OS X. Show all posts
Showing posts with label Mac OS X. Show all posts

Wednesday, March 28, 2007

Displaying multilingual text in SVG using Firefox

In Khem's tree editor, SVG is used for displaying tree in Firefox. Firefox 2.x on Windows XP can display English text and Thai text in SVG correctly. But when I try to use Firefox 2.x on Mac OS X, Thai, Bengari and Chinese text became a box as shown below. firefox screenshot
(using this following code) <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full"> <text x="50" y="50" font-size="16" fill="blue" > Wikipedia 維基百科 วิกิพีเดีย উইকিপিডিয়া </text> </svg>
Thus, I try to assign a font family to the text as the following code:
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" baseProfile="full"> <text x="50" y="50" font-family="Garuda" font-size="16" fill="blue" > Wikipedia 維基百科 วิกิพีเดีย উইকিপিডিয়া </text> </svg>
It works. Firefox can display Thai text correctly. However, Firefox still cannot display Bangari text and Chinese text. As shown below. firefox screenshot I try to use other font families, i.e. Times, Sans and Helvetica but only English text can be displayed.

Sunday, December 24, 2006

GIZA++ on Mac OS X (HFS+)

Today I find that foobar.a3.final and foobar.A3.final are the same file on HFS+ (the file system are used in my iBook). Now I know why foobar.A3.final in my working directory is not the same as what mentioned in GIZA++'s README. A workaround is as follow:
diff -Nuar GIZA++-v2/model3.cc GIZA++-v2-osx/model3.cc
--- GIZA++-v2/model3.cc Tue Sep 30 21:24:18 2003
+++ GIZA++-v2-osx/model3.cc     Sat Dec 23 18:16:08 2006
@@ -318,8 +318,8 @@
     d4file = Prefix + ".d4." + number ;
     d4file2 = Prefix + ".D4." + number ;
     d5file = Prefix + ".d5." + number ;
-      alignfile = Prefix + ".A3." + number ;
-      test_alignfile = Prefix + ".tst.A3." + number ;
+      alignfile = Prefix + ".uA3." + number ;
+      test_alignfile = Prefix + ".tst.uA3." + number ;
     p0file = Prefix + ".p0_3." + number ;
   }
   // clear count tables
I noticed this after running GIZA++ on NetBSD and the result was just like in README. Update: Now I switched from Mac OS X to Ubuntu http://blog.vee-u.com/2008/03/02/giza_pp/
Creative Commons License
This workis licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 License.