Latin characters are not aligned in a straight line

Bug #523917 reported by Yusuke Sato
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Takao Fonts
Triaged
Low
Unassigned

Bug Description

When a font size is smaller than 12, Latin characters in TakaoGothic are not aligned correctly on screen. These characters are displayed as if they have two or more baselines.

How to reproduce the issue:

1. install the font

$ mkdir ~/.fonts
$ tar xvzf takao-fonts-otf-003.01.20100214.1.tar.gz
$ mv takao-fonts-otf-003.01.20100214.1/*.otf ~/.fonts/
$ fc-cache -fv

2. start gedit on Ubuntu 9.10

$ dpkg -l | grep gedit
ii gedit 2.28.0-0ubuntu2 official text editor of the GNOME desktop en
ii gedit-common 2.28.0-0ubuntu2 official text editor of the GNOME desktop en

$ LANG=C gedit &

3. modify preferences

Click "Edit - Preferences - Font & Colors - Editor Font," then select "TakaoGothic, Regular, 11."

4, type some texts on the editor, e.g. "font-face-weight-matching-expected.txt."

Result:

Please check the attached image.

wrt "font-face", the position of f, n, and t are higher than o, a, c, and e.
wrt "weight", the position of w and i are higher than e, g, h, and t.
wrt "matching", the position of a and c are lower than others.
wrt "expected", the position of t (and x?) are higher than others.

Note:

- When the font size is >= 12, the issue seems not to reproduce.
- TakaoPGothic/TakaoPMincho/TakaoMincho seem not to have the issue.
- We can see the same issue on Firefox 3.5.7 and Google Chrome 5.0.307.5 (Official Build 37950) dev.

Revision history for this message
Yusuke Sato (yusukes) wrote :
Revision history for this message
Jun Kobayashi (jkbys) wrote :

I can not reproduce this bug when I set "Japanese" for system-wide setting in Language dialog (System -> Administration -> Language support).

But I changed it to "Japanese" and this problem occurs.

Changed in takao-fonts:
status: New → Confirmed
Revision history for this message
Jun Kobayashi (jkbys) wrote :

Oops, I wrote wrong in #1.
I choosed *English* for the system-wide setting and this problem occured.

Revision history for this message
Jun Kobayashi (jkbys) wrote :

in #2. sorry.

Revision history for this message
Arne Goetje (arnegoetje) wrote : Re: [Bug 523917] Re: Latin characters are not aligned in a straight line

Jun Kobayashi wrote:
> Oops, I wrote wrong in #1.
> I choosed *English* for the system-wide setting and this problem occured.
>

That;s probably because fontconfig chooses another font for Latin
characters in English language setting. So, effectively two fonts get
mixed. Nothing we can do about here.

Revision history for this message
Yusuke Sato (yusukes) wrote :

>That;s probably because fontconfig chooses another font for Latin
>characters in English language setting. So, effectively two fonts get
>mixed. Nothing we can do about here.

Hmm.. /proc/pid/maps shows gedit does not load fonts other than the Takao:

$ ps auwx | grep gedit
yusukes 7788 6.3 0.6 55016 18456 pts/3 Sl 02:01 0:00 gedit
$ cat /proc/7788/maps | egrep -e '(ttf|otf)$'
b6513000-b6886000 r--p 00000000 08:05 1471579 /home/yusukes/.fonts/TakaoGothic.otf

I'm not sure but it looks like a font hinting issue in Takao or FreeType.

> I can not reproduce this bug when I set "Japanese" for system-wide setting in Language dialog (System -> Administration ->
> Language support).

Thanks, it did the trick! Out of curiosity, Kobayashi-san, can you please let me know which fontconfig(?) setting resolves the issue? I'd like to try to copy the setting to my own. (and IMHO, it would be very nice if Ubuntu could render the font correctly in UI language settings other than Japanese.)

Revision history for this message
Yusuke Sato (yusukes) wrote :

Ah, is it the following part in /etc/fonts/conf.avail/29-language-selector-ja-jp.conf?

 <match target="font">
  <test name="lang" compare="contains">
   <string>ja</string>
  </test>
  <test name="pixelsize" compare="less_eq">
   <double>18</double>
  </test>
  <edit name="hintstyle" mode="assign">
   <const>hintnone</const>
  </edit>
 </match>

Revision history for this message
Jun Kobayashi (jkbys) wrote :

Sorry for may late reply.

Yes, this problem seems to be avoidable with the part in 29-language-selector-ja-jp.conf you pasted, Sato-san.

Of cource, it's ideal that the characters are displayed correctly without such trick.

Changed in takao-fonts:
importance: Undecided → Low
status: Confirmed → Triaged
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.