JDK-4100565 : JDK1.2 's java.awt.Font does not support Not-8859-1 character set
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.1.4,1.2.0
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • OS:
    generic,solaris_2.5.1,windows_95,windows_nt generic,solaris_2.5.1,windows_95,windows_nt
  • CPU: generic,x86,sparc
  • Submitted: 1997-12-19
  • Updated: 1998-05-06
  • Resolved: 1998-05-06
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Duplicate :  
Relates :  
Relates :  
Relates :  
Description
JDK1.2 's java.awt.Font does not support Not-8859-1 character set when
sun.awt.font.FontObject font is used. It causes not-8859-1 characters
never be able to be displayed on the screen when 2D classes are used to
do rendering. 

Comments
WORK AROUND set your environment variable, JAVA_FONTS, to cyberbit.ttf (this font can be downloaded).
11-06-2004

PUBLIC COMMENTS Non-roman text wasn't drawing properly. <jeetk> need composite font support see #4133485 paul.charlton@eng 1998-05-06
06-05-1998

EVALUATION Jeet fixed this today. michael.peirce@eng 1998-02-13 xueming.shen@Japan 1998-02-17 [old evaluation deleted...] xueming.shen@Japan 1998-02-19 Great, truetype font Japanese works, on Solaris platform it works without any modification, but on Windows, it needs following fix, the platform and script are read from font file by our read_16() which reads date from file in bigedian format, so the platform and script are already correct, don't need "swap" both on sparc and x8086. *** /tmp/geta22953 Thu Feb 19 16:40:53 1998 --- fontObject.cpp Thu Feb 19 16:49:09 1998 *************** *** 812,819 **** gxFontPlatform platform; gxFontScript script; ! platform = SWAPW(platformID) + 1; ! script = SWAPW(scriptID) + 1; if (platform == gxUnicodePlatform || platform == gxMicrosoftPlatform || platform == gxCustomPlatform && script == gxCustom16BitScript) { --- 812,819 ---- gxFontPlatform platform; gxFontScript script; ! platform = (platformID) + 1; ! script = (scriptID) + 1; if (platform == gxUnicodePlatform || platform == gxMicrosoftPlatform || platform == gxCustomPlatform && script == gxCustom16BitScript) { However, I think we still need to take care the following problems (1)TTC font format problem, on Fareast win32 version, kanji font files are almost in ttc format, without this fix, we still can't say this bug is fixed on win32 platform, as in default win32 envirenment 2d still fails to display Japanese/Chinese characters. (2)When the scriptID is ShiftJIS, Big5, PRC Johab... it is happened for some third-party font vender's tt font files, the character is cast by 0xff... (3)Solaris 2.5.1 will not support new 2D drawing feature as there is no outline font for Japanese/Chinese on the default environment, user have to setup their own outline font somewhere. (4)need code cleanup... I will continue the evalution and give more comments later... ============================================================= This bug happens again when I run SwingSet with JDK-1.2beta3-K on Japanese Win95 All not-8859-1 chars displayed as squares. cindy.jao@eng 1998-03-05
05-03-1998