United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6428762 RHEL5: Sazanami Mincho Font rendering quality is poor
6428762 : RHEL5: Sazanami Mincho Font rendering quality is poor

Details
Type:
Bug
Submit Date:
2006-05-22
Status:
Resolved
Updated Date:
2010-04-04
Project Name:
JDK
Resolved Date:
2006-07-17
Component:
client-libs
OS:
solaris_2.5.1,linux,linux_redhat_5.0
Sub-Component:
2d
CPU:
x86,sparc,generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
1.4.2_18,5.0u6,5.0u15-rev
Fixed Versions:
6

Related Reports
Backport:
Backport:
Duplicate:
Duplicate:

Sub Tasks

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.
                                     
2006-07-10
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.
                                     
2006-07-03
EVALUATION

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



Hardware and Software, Engineered to Work Together