Docs @ Psychtoolbox Wiki : DrawHighQualityUnicodeTextDemo

Search PTB Function help:
homepsychtoolbox.orgpage updateslogin

DrawHighQualityUnicodeTextDemo

PsychtoolboxPsychDemos

DrawHighQualityUnicodeTextDemo

This demo shows how to draw high-quality, anti-aliased text, and some
japanese text encoded in Unicode on Apple MacOS/X and Microsoft Windows.
GNU/Linux is not yet supported for anti-aliased and unicode text rendering.

MacOS/X has text fonts with support for japanese characters preinstalled,
so this should just work out of the box. Have a look at the code of the
demo on how to select a suitable font, and how to read unicode text from
the filesystem. The (commented out) reading code for SHIFT_JIS -> Unicode
conversion would only work on recent Matlab releases. Older releases need
different approaches - also different wrt. PowerPC vs. IntelMac. That's
why we hard-coded the text in this demo -- Want to have it working even
on old Matlab 6...

On MS-Windows you will need to install the special east-asian font
support kit in order to be able to draw japanese text.
How to do this? See...

http://www.coscom.co.jp/japanesefont/index.html

with some more info here:
http://www.alanwood.net/unicode/fonts_windows.html#japanese

After that, text drawing seems to "just work" with our "Courier New"
font. If you don't install the font pack, you'll just see funny little
squares instead of nice japanese characters...




Path   Retrieve current version of DrawHighQualityUnicodeTextDemo.m from berliOS: beta | view WebSVN changelog of trunk branch
Psychtoolbox/PsychDemos/DrawHighQualityUnicodeTextDemo.m


Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki
Page was generated in 0.1321 seconds