X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12 Jul 2005 10:30 AM by  anon
How to display / input the CHINESE FONTS @ IDL - UNIX/LINUX environment?
 1 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
12 Jul 2005 10:30 AM
    How to display / input the CHINESE FONTS @ IDL - UNIX/LINUX environment? (1) Display CHINESE FONTS maybe passed by some technique, however it is very difficult; (2) Input CHINESE FONTS is a big problem here @ UNIX/LINUX environment, who can tell me how to do ?

    Deleted User



    New Member


    Posts:
    New Member


    --
    12 Jul 2005 10:30 AM
    My recommendation for displaying Chinese fonts within IDL on Unix platforms is to do the following: 1) Register your new font with IDL. To do this, you will need to modify the ttfont.map file in the resource/fonts/tt subdirectory of your IDL distribution. This is a text file describing the TrueType fonts that will be utilized by IDL. (I recommend making a backup copy of the original version of this file before you edit it.) The format of this file is: FontName FileName DirectGraphicsScale ObjectGraphicsScale Edit the file to include an additional entry for your Chinese font. Initially, you can set the two scale factors to 1.0; these may be adjusted later if you find it is necessary. After editing the ttfont.map file, you will need to start a new session of IDL for the addition to take effect. 2) Display the Chinese font. To display characters from the Chinese font in a Direct Graphics window, you will need to take a few steps: a) Setup IDL to use TrueType fonts: IDL> !P.FONT = 1 b) Set the current TrueType font: IDL> DEVICE, SET_FONT=fontName, /TT_FONT c) Prepare the string to be display. For Chinese fonts, it may be easiest to utilize the Unicode value for each glyph: IDL> XYOUTS, '!Z(305c,3060,306d)' [I randomly chose Unicode values 305c, 3060, 306d in this example. Replace these with the Unicode values for the glyphs you want to display.) Note that Object Graphics may also be used to display your new TrueType font. Be sure to set the ENABLE_FORMATTING property on your IDLgrText object in this case.
    You are not authorized to post a reply.