JDK-6428762 : RHEL5: Sazanami Mincho Font rendering quality is poor
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 1.4.2_18,5.0u6,5.0u15-rev
  • Priority: P2
  • Status: Resolved
  • Resolution: Fixed
  • OS:
    linux,linux_redhat_5.0,solaris_2.5.1 linux,linux_redhat_5.0,solaris_2.5.1
  • CPU: generic,x86,sparc
  • Submitted: 2006-05-22
  • Updated: 2010-04-04
  • Resolved: 2006-07-17
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b92Fixed
Related Reports
Duplicate :  
Duplicate :  
Description
OPERATING SYSTEM(S):
Red Hat Enterprise Linux AS release 3 (Taroon Update 5)

FULL JDK VERSION(S):
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)

DESCRIPTION:
When I use Java 5 with Sazanami Mincho font (it's one of free Japanese True Type font),
some of large size Japanese characters are unreadable.

This test requires Sazanami True Type fonts.
You can download them from following URL:
  http://sourceforge.jp/projects/efont/files/
  http://prdownloads.sourceforge.jp/efont/10087/sazanami-20040629.tar.bz2

Restore this file, put sazanami-gothic.ttf and sazanami-mincho.ttf into
$HOME/.fonts directory.
(If $HOME/.fonts is not available, create this directory)

Type following command to check sazanami fonts are available or not:
  $ fc-list | grep -i sazanami
  Sazanami Gothic:style=Gothic-Regular
  Sazanami Mincho:style=Mincho-Regular

Test instruction is as follows:

1. Compile and run SazanamiFontTest
2. Left-side is Sazanami Gothic, right-side is Sazanami Mincho.
   Over 21pt for Sazanami Mincho, some of characters are unreadable.

====================================================================
import java.awt.*;
import javax.swing.*;

class SazanamiFontTest extends JFrame {
  String test_string = "\u8868\u793a";
  SazanamiFontTest() {
    Container c = getContentPane();
    c.setLayout(new GridLayout(0,2));
    for(int i=12; i<=30; i++) {
      JLabel lbl_g = new JLabel(i+test_string);
      JLabel lbl_m = new JLabel(i+test_string);
      lbl_g.setFont(new Font("Sazanami Gothic", Font.PLAIN, i));
      lbl_m.setFont(new Font("Sazanami Mincho", Font.PLAIN, i));
      c.add(lbl_g);
      c.add(lbl_m);
    }
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    pack();
    setVisible(true);
  }
  public static void main(String[] args) {
    SazanamiFontTest f = new SazanamiFontTest();
  }
}
====================================================================

I checked Sazanami Mincho's font quality by using following scripts.

====================================================================
#!/bin/sh
SIZE=12
while test "$SIZE" -le "30"
do
  # HYOU (U+8868)
  xfd -fa "Sazanami Mincho:pixelsize=${SIZE}.0:antialias=false " -start 34920 -rows 1 -columns 1 -xrm "*title: ${SIZE}pt" &
  # JI (U+793A)
  #xfd -fa "Sazanami Mincho:pixelsize=${SIZE}.0:antialias=false " -start 31034 -rows 1 -columns 1 -xrm "*title: ${SIZE}pt" &
  SIZE=`expr $SIZE + 1`
done
====================================================================

xfd is using XFreeType library and all characters are readable.
Please check font rendering quality.

Comments
EVALUATION Enabling dropout by default does not seem to introduce any new artefacts and it significantly improves quality on some fonts. Vast majority of affected fonts are not widely used and risk to introduce regression is low.
10-07-2006

EVALUATION Interestingly 168 out of 2762 fonts examined do not use SCANCTRL instruction explicitly. None of these fonts seems to be widely used but still it is higher then one might expect. In many cases enabling dropout by default helps to noticeably improve quality at small sizes. On some fonts quality stays the same. No degradations were spoted at first glance. On other hand Windows rasterizer seems to have dropout disabled by default. E.g. 18 pt "e" (Sazanami Mincho, 96 dpi screen, cleartype/antialiasing disabled in desktop properties) looks like "c" in Windows Font Viewer. See attached screenshot.
03-07-2006

EVALUATION This font does not explicitly use flags to define dropout behavior and at the moment we treat this as "disable dropout".
22-05-2006