Bug 215602 - IPA fonts are rendered poorly
Summary: IPA fonts are rendered poorly
Status: RESOLVED FIXED
Alias: None
Product: openSUSE 10.2
Classification: openSUSE
Component: X11 Applications (show other bugs)
Version: Beta 1
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Mike Fabian
QA Contact: Stefan Dirsch
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-27 06:22 UTC by Satoshi Niimi
Modified: 2006-11-24 14:50 UTC (History)
3 users (show)

See Also:
Found By: Other
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
a patch to fix (662 bytes, patch)
2006-10-27 06:23 UTC, Satoshi Niimi
Details | Diff
to-autohint-or-not-to-autohint.png (315.47 KB, image/png)
2006-10-27 13:05 UTC, Mike Fabian
Details
with- / without- autohinter (53.19 KB, image/png)
2006-10-27 15:26 UTC, Satoshi Niimi
Details
hiragana.png (60.21 KB, image/png)
2006-10-27 16:06 UTC, Satoshi Niimi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Satoshi Niimi 2006-10-27 06:22:53 UTC
IPA fonts are not rendered well with autohinter,
and the fonts do not have enough bitmaps.

Here is a patch to fix the problem:

--- suse-hinting.conf.bak	2006-10-23 23:54:32.000000000 +0900
+++ suse-hinting.conf	2006-10-27 15:16:47.000000000 +0900
@@ -163,5 +163,24 @@
                 </edit>
         </match>
 
+<!--
+IPA fonts are not rendered well with autohinter,
+and the fonts do not have enough bitmaps.
+-->
+	<match target="font">
+		<test name="family">
+			<string>IPAMincho</string>
+			<string>IPAGothic</string>
+			<string>IPAPMincho</string>
+			<string>IPAPGothic</string>
+			<string>IPAUIGothic</string>
+		</test>
+		<edit name="autohint">
+			<bool>false</bool>
+		</edit>
+		<edit name="embeddedbitmap">
+			<bool>false</bool>
+		</edit>
+	</match>
 
 </fontconfig>
Comment 1 Satoshi Niimi 2006-10-27 06:23:45 UTC
Created attachment 102791 [details]
a patch to fix
Comment 2 Mike Fabian 2006-10-27 13:05:28 UTC
Created attachment 102823 [details]
to-autohint-or-not-to-autohint.png

Comparison of rendering with and without autohinter.

Fonts displayed with

    xfd -fa "IPAMincho:pixelsize=15"
    xfd -fa "MS Mincho:pixelsize=15"
    xfd -fa "Sazanami Mincho:pixelsize=15"

The top row of the screen shot shows the fonts without autohinting,
the bottom row the same fonts with autohinting.
Comment 3 Mike Fabian 2006-10-27 14:29:08 UTC
When looking at the screen shot attached in comment #2, I believe that
all three fonts I used for testing look better with the autohinter than without.

Comment 4 Mike Fabian 2006-10-27 14:35:05 UTC
This is even more obvious if one makes a similar screen shot for
the "Gothic" fonts instead of the "Mincho" fonts because the
autohinter works even better for simpler font designes like "Gothic".
Comment 5 Satoshi Niimi 2006-10-27 15:26:03 UTC
Created attachment 102848 [details]
with- / without- autohinter

All numerical characters should have same width,
but "8" is wider than "0" with authohinter.
"8" also looks very bad with autohinter: it's not symmetrical.
Comment 6 Mike Fabian 2006-10-27 15:32:16 UTC
I recommend to use a good Latin font for digits and the latin alphabet.
The Latin part of most CJK fonts is not very good.
Comment 7 Mike Fabian 2006-10-27 15:34:42 UTC
I can reproduce your screen shot in comment #5 here as well.
Comment 8 Mike Fabian 2006-10-27 15:53:18 UTC
The problem that the Latin glyphs are not monospace (as they should be)
when the autohinter is used happense with IPAGothic, Sazanami Gothic, and
Meiryo. But it doesn't happen with MS Gothic.
Comment 9 Satoshi Niimi 2006-10-27 16:06:35 UTC
Created attachment 102858 [details]
hiragana.png

(In reply to comment #6)
> I recommend to use a good Latin font for digits and the latin alphabet.
> The Latin part of most CJK fonts is not very good.

Okay, compare with Japanese Hiragana. ;-)
The baseline of the characters are not stable with autohinter.
For example, "?" (NI, 2nd character of last line) is rendered
upper one pixel than other characters with autohinter.
Comment 10 Mike Fabian 2006-10-27 16:19:04 UTC
On the other hand, the に rendered with the autohinter is
"sharper" (has less gray) because it is better aligned to the pixel grid.

By aligning glyphs to the pixelgrid, one can reduce the blurredness
but this comes with the cost of a slightly distorted positioning.

For that reason, currently OpenOffice completely ignores the
system settings concerning hinting and *always* forces
no hinting at all. This has the advantage that the positioning
of all glyphs is correct, especially line lengths are correct
(no such effects as in the screen shot in comment #5). But the
obvious disadvantage is that most glyphs are a lot more blurred.
People comlain about that as well. No matter which of the the
settings one chooses, somebody will complain.
Comment 11 Satoshi Niimi 2006-10-27 17:35:46 UTC
I agree with you that someone prefer character shape and geometry than
sharpness, others prefer sharpness than character shape and geometry.
(I'm the former and you are the latter I think.)

Since settings in "suse-hinting.conf" can be overridden by ~/.fonts.conf,
the focus is which is more suitable as default.

I think autohinter should be disabled by default for IPA fonts as long as
it has an obvious disadvantage as I noted in commen #5.
Comment 12 Mike Fabian 2006-11-16 12:22:48 UTC
New fonts-config submitted to STABLE:

-------------------------------------------------------------------
Wed Nov 15 19:20:16 CET 2006 - mfabian@suse.de

- Bugzilla #215602:  don't use the embedded bitmaps in the IPA
  fonts because they are only available in 12, 14, and 16 pixels.
- Bugzilla #215602: Don't use the autohinter for fonts where it
  it distorts the metrics so badly that even the digits which
  should be monospaced are not monospaced at all anymore.
- Don't use the autohinter for good quality TrueType fonts.

-------------------------------------------------------------------

You can download the new package for testing here:

http://software.opensuse.org/download/M17N/SUSE_Factory/noarch/fonts-config-20061025-8.1.noarch.rpm

/usr/sbin/fonts-config generates /etc/fonts/suse-hinting.conf and
/etc/fonts/suse-bitmaps.conf which contain the new setup.

The autohinter is not only switched off for the IPA fonts but for all
TrueType fonts because

    - high quality TrueType fonts like Déjà Vu look much better when
      the byte code interpreter is used instead of the autohinter.
    - among the fonts which look better (i.e. sharper) when using
      the autohintern, *many* have severe problems with the distortion
      of the metrics.

I only switched the autohinter on again for a rather small list of
fonts where it really seems to help *and* where I could not find
serious metrics distortion.

Closing this bug as FIXED.


Comment 13 Satoshi Niimi 2006-11-24 14:50:15 UTC
Fixed on RC1.  Thanks!