Sun Java Solaris Communities My SDN Account Join SDN
 
Article

User Defined Characters - Handling UDC Using JDS

1. Summary

This section explains about conditions of UDC font on JDS, methods of creating UDC on JDS and precautions for some applications.

2. UDC Font Conditions Handled by JDS

GNOME/Gtk applications, StarOffice, Java, and Mozilla, etc. are main applications on JDS. All of them draw character using TrueType fonts with Unicode encoding. UDC are the characters allocated to Unicode PUA in the TrueType fonts used for drawing. Further, by enabling multiple TrueType fonts, the JDS applications can draw as many Unicode characters as possible to make the system recognize TrueType fonts with characters in PUA. At this time, TrueType fonts for UDC must satisfy the following conditions.

  • The font name must be EUDC
  • Unicode encoding
  • Glyphs should be allocated to the PUA starting from 0xE000

EUDC.TTE fonts drawn using a Windows external character editor satisfy these conditions, and so can be used in JDS.

3. Creating UDC in JDS

From Solaris 10, unique JDS tools equivalent to sdtudctool are not supplied. To define a new UDC, use an existing font editor to draw TrueType fonts in which the characters are defined by Unicode PUA.

3.1. Creating Characters

The procedure for creating UDC fonts using the open source font editor fontforge is described below.

  1. Start fontforge.

      % fontforge -new
  2. Select "Font Info..." in the "Element" menu. The "Font Information" dialog box will be displayed.
  3. Enter EUDC in "Fontname" in the "Names" tab. Edit the copyright as necessary.
  4. Select "ISO 10646-1 (Unicode, BMP)" in the "Encoding" tab.
  5. Select "2048" in "Em Size" in the "General" tab.
  6. Click the "OK" button. The "Change UniqueID" dialog box will be displayed. Click the "Change" button.
  7. Select "Goto" in the "View" menu. When "Goto" dialog box is displayed, select "Private Use" from the dropdown menu, and then click the "OK" button.
  8. When "Font View" is displayed, double-click the cell corresponding to the code you want to register (i.e., the PUA starting from 0xE000).
  9. Create the character.
  10. Select "Save" in the "File" menu to save the data.
    Repeat steps 8 to 10 as necessary.
  11.  
  12. Select "Generate Fonts...." in the "File" menu.
  13. Enter "eudc.ttf" in the font file name, and then select "True Type" in the font type combo box. Next, click the "Save" button.

For details of the procedure for creating character data using fontforge, refer to the fontforge reference manual.

The TrueType font drawn in this way can also be used from the CDE/Motif application using the same procedure as "Migrating User-Defined Characters Used by Windows" in "B. Font Migration" in the "Japanese Environment User Guide" in the Solaris 10 User Collection (http://docs.sun.com/app/docs/doc/819-0364).

3.2. Installation

To use the drawn eudc.ttf file throughout the system, copy the file in a directory under /usr, which is described in between <dir> and </dir> in the /etc/fonts/fonts.conf file. (e.g., /usr/openwin/lib/X11/fonts, etc.) Further, if you would like to use it on per-user basis, copy the eudc.ttf file to the $HOME/.fonts directory. If eudc.ttf is replaced, to enable the changes, you must run /bin/fc-cache -f, and log in again afterwards.

3.3. Inputs

To input UDC, enter the Unicode code point using the input method in use, or register UDC to the dictionary. For details, refer to either "ATOK12 User's Guide" or "Wnn6 User's Guide".

4. Precautions

This section explains the precautions for the individual application environments.

4.1. Using External Fonts Created Using Windows

External fonts drawn using Windows are saved by the file name "EUDC.TTE" in the "Fonts" folder.If installed on JDS (refer to 3.2. Installation), it is necessary to change the extension from TTE to TTF.

4.2. Using UDC in StarOffice

Use StarOffice 8.
UDC cannot be displayed using StarOffice 7. Refer to Bug Report.

4.3. Using UDC in Java

With J2SE5.0, UDC TrueType fonts can be used by editing the JRE fontconfig.properties file. An example of an entry added when using UDC in Japanese UTF-8 locale is described below.

    allfonts.japanese-EUDC=-misc-EUDC-medium-r-normal--*-%d-*-*-p-*-iso10646-1
    sequence.allfonts.UTF-8.ja=japanese-EUDC,latin-1,latin-2,....
    filename.-misc-EUDC-medium-r-normal--*-%d-*-*-p-*-iso10646-1=UDC_TrueType_font_file_fullpath

For details of the Java1.5 fontconfig file, refer to http://java.sun.com/j2se/1.5.0/docs/guide/intl/fontconfig.html.

For the UDC font settings on J2SE1.4, refer to http://java.sun.com/j2se/1.3/docs/guide/intl/fontprop.html.

4.4. Printing Using the GNOME Application

UDC cannot be printed from applications that print using the gnome-print library, such as gedit, etc. Display and print text files containing UDC using Mozilla.

Note 1: Sun Microsystems does not provide support for open source font editor fontforge and scripts included in the downloads.
Note 2: For fontforge licenses and copyright, refer to License and Copyright.