QNX RTOS v4 Knowledge Base
  
QNX RTOS v4 Knowledge Base
  
    
      | 
          
            | Title | Translating and displaying Chinese Fonts under QNX 4.23 |  
            | Ref. No. | QNX.000010483 |  
            | Category(ies) | Development |  
            | Issue | When I try to view Chinese fonts they don't appear correctly. Is there a bug? 
 
 |  
            | Solution | The first thing you'll need is the Photon Chinese Language Supplement which you can download from http://qdn.qnx.com/download/updates/archive_index.html 
 Then copy over /usr/photon/translations/zh_TW_big5.tab file from QNX 6 to your QNX 4 machine.
 
 Modify the fontdir and fontext files in the /usr/photon/font directory as follows:
 In the 'fontdir' file:
 Change "hei,0@dfst-b5.pfr" into "heis,0@dfst-b5.pfr" --> add 's' to 'hei'.
 Change "hei,0@hei.pfr" into "heimediums,0@hei.pfr" --> add 'mediums' to the FIRST 'hei'.
 
 In the 'fonttext' file:
 On the line where "+normal=" change first instance of "hei" into "heis"
 On the line where "+normal=" change second instance of "hei" into "heimediums"
 
 Note: If the fonts still don't appear correctly you may need a more recent version of the phfont.pfr file.
 
 Below is a sample of how to translate the fonts inside your photon application:
 ================================================
 trans = PxTranslateSet(NULL, "Big5");
 dstlen = PxTranslateStateToUTF(trans, buffer, amount_read, NULL, dest, MYMAX);
 PtSetArg(&args[0], Pt_ARG_TEXT_STRING, dest, 0);
 PtSetResources(ABW_DisplayFileText, 1, args);
 ================================================
 |  |