This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 458592 - Incorrect glyph points and missing hinting instructions for U+0079, U+03BC, U+0431, U+2010..2012.
Incorrect glyph points and missing hinting instructions for U+0079, U+03BC, U...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: liberation-fonts (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Caius Chance
Fedora Extras Quality Assurance
: i18n
Depends On: 459451
Blocks:
  Show dependency treegraph
 
Reported: 2008-08-10 12:53 EDT by Sylvain Beucler
Modified: 2008-08-26 15:58 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-08-26 00:30:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
Screenshot with LiberationSans 2007 (520.90 KB, image/png)
2008-08-10 12:54 EDT, Sylvain Beucler
no flags Details
Screenshot with LiberationSans 2008 1.0.4 (521.01 KB, image/png)
2008-08-10 12:55 EDT, Sylvain Beucler
no flags Details
1. hinting on (32.68 KB, image/png)
2008-08-11 13:45 EDT, Sylvain Beucler
no flags Details
2. hinting off (89.88 KB, image/png)
2008-08-11 13:46 EDT, Sylvain Beucler
no flags Details
Sample patched 1.04, with 'y' glyph points and hinting instructions 're-cloned' from 1.03. (135.92 KB, application/octet-stream)
2008-08-25 01:22 EDT, Caius Chance
no flags Details

  None (edit)
Description Sylvain Beucler 2008-08-10 12:53:27 EDT
Description of problem:
I was using the LiberationSans version from the original announcement at https://www.redhat.com/f/fonts/liberation-fonts-ttf-3.tar.gz (now 404). I replaced it with 1.0.4 from https://fedorahosted.org/liberation-fonts/ . I use this fonts in a game engine that is ported from Windows, and that was using Arial originally. The font rendering is done through SDL_ttf (with style TTF_STYLE_BOLD) which itself called libfreetype6.

The new version of the font has a decreased quality. I attach 2 screenshots with the 2 different versions. Check for example the "y": the top of the letter isn't aligned with the top of the other letters.

Note that the screenshots are taken from Debian Lenny, whose libfreetype6 has  TT_CONFIG_OPTION_BYTECODE_INTERPRETER activated.

Version-Release number of selected component (if applicable):
1.0.4

How reproducible:
Always

Steps to Reproduce:
The game is in development, I don't have a short procedure to install the game right now, but let me know if you're interested in that.

Actual results:
Irregular letters. Apparent regression in font quality.

Expected results:
Improved quality ;)

Additional info:
Comment 1 Sylvain Beucler 2008-08-10 12:54:50 EDT
Created attachment 313895 [details]
Screenshot with LiberationSans 2007
Comment 2 Sylvain Beucler 2008-08-10 12:55:32 EDT
Created attachment 313896 [details]
Screenshot with LiberationSans 2008 1.0.4
Comment 3 Caius Chance 2008-08-11 02:51:10 EDT
Are two results generated on same environment? I don't use libfreetype6 so I couldn't comment if there are any effects from that.

I have used fontforge to compare all points of both 'y' glyphs, tested their interactions with other alphabets in metrics window, also all settings in 'glyph info' but couldn't found any difference on data side.

The 1.03 binaries was produced by original manufacturer WIN32 software. Then the ttfs have been converted into .sfd format by fontforge. FYI, .sfd is fontforge main font format which is open sourced.

Since the conversion, we kept such .sfd files as "original sources" of Liberation Fonts and hosted on public website. However, in fact the original .ttf files from manufacturer contained some proprietary tables or tables that fontforge doesn't read. This might be the factor of losing data. Therefore, we kept the 1.03 binary available on the hosting for those people who preferred 1.03.

It is not feasible for a loss free conversion solution at the moment due to limitation of fontforge and lack of project commitments from the public.

Besides the fonts themselves, the change of rendering engines might be also another reason of this situation.

I have no quick solution right now but suggest you include ver 1.03 as static font in the game package until someone worked out a better solution. BTW, you could test this again on the rawhide (development version Fedora) to keep an eye on if latest changes of the OS fixed this in other ways.
Comment 4 Sylvain Beucler 2008-08-11 13:45:06 EDT
> Are two results generated on same environment?

Yes, exactly the same, except for the font.

> I don't use libfreetype6 so I couldn't
> comment if there are any effects from that.

Note that Fedora has TT_CONFIG_OPTION_BYTECODE_INTERPRETER disabled because of patents treats (while it is activated in Debian and Gentoo, for example).

This prevents the hinting bytecode interpreter to work, and changes the rendering and size quite a bit. However, I only get enabling compatible size when the hinting bytecode interpreter is enabled: under Fedora I couldn't get the same text size than under Windows for the game engine.

I attach 2 screenshots, showing FreeType's 'ftview' utility with size 16 and anti-aliasing disabled (what the game uses). Left is 1.03, right is 1.04. The first screenshot has glyph hinting on, the second has it off.

On the first one you'll see the difference on "y".

This could mean that the hinting bytecode was not or not properly imported in fontforge, which would be embarrassing.

> Therefore, we kept the 1.03 binary available on
> the hosting for those people who preferred 1.03.

Indeed 1.03 doesn't present this issue.
Comment 5 Sylvain Beucler 2008-08-11 13:45:50 EDT
Created attachment 313987 [details]
1. hinting on
Comment 6 Sylvain Beucler 2008-08-11 13:46:15 EDT
Created attachment 313988 [details]
2. hinting off
Comment 7 Caius Chance 2008-08-18 21:35:26 EDT
Possible bug #459451 is discovered in fontforge which avoid me to change glyph point settings on such char in liberation fonts, set this bz depends on that.
Comment 8 Caius Chance 2008-08-21 00:40:45 EDT
Hi Sylvain, I am going to do a triage of bug:

- Install the game on Fedora.
- Install the game on Debian.

Would you please explain the procedures of installation?
Comment 9 Jens Petersen 2008-08-21 01:40:26 EDT
Sylvain, are you able to reproduce the problem on debian or gentoo for other apps?
Comment 10 Jens Petersen 2008-08-21 01:43:18 EDT
Caius, actually I think attachment 313987 [details] is quite clear - so you should be able to
reproduce on Debian with that.
Comment 11 Jens Petersen 2008-08-21 02:35:30 EDT
It is funny how only 'y' based glyphs seem much affected in that screenshot anyway.

I tried on Ubuntu-8.04 but didn't see it there FWIW.

Sylvain, do you know when TT_CONFIG_OPTION_BYTECODE_INTERPRETER was activated:
I mean which package version of freetype?
Comment 12 Sylvain Beucler 2008-08-21 13:52:26 EDT
> Sylvain, do you know when TT_CONFIG_OPTION_BYTECODE_INTERPRETER was activated:
> I mean which package version of freetype?

Probably since 2006:

 freetype  (2.2.1-2) unstable; urgency=low

   * Enable full bytecode interpreter instead of just the
     "non-patented portions".
   * Use $(CURDIR) instead of $(PWD) to build with sudo. Closes: #367579.

 -- Keith Packard <keithp@keithp.com>  Wed, 17 May 2006 00:00:35 -0500 

http://packages.debian.org/changelogs/pool/main/f/freetype/freetype_2.3.7-1/changelog

> Sylvain, are you able to reproduce the problem on debian
> or gentoo for other apps?

With SDL_ttf and freetype2-demos, yes. I think other apps usually turn onanti-aliasing which works-around the issue.

Note that Gentoo disables it in binary packages, but enables it in recompiled packages.

> I tried on Ubuntu-8.04 but didn't see it there FWIW.

I just Tried on gNewSense (Ubuntu) LiveCD and it shows for me.

Procedure:
- 'ftview 16 liberation-fonts-1.04/LiverationSans-Regular.ttf'
- Type 'a'
Comment 13 Jens Petersen 2008-08-21 19:44:32 EDT
Thanks!  Easily reproduced on Ubuntu-8.04 too.
Comment 14 Caius Chance 2008-08-24 22:45:33 EDT
Trying to fix with patched fontforge.
Comment 15 Caius Chance 2008-08-25 01:22:42 EDT
Created attachment 314902 [details]
Sample patched 1.04, with 'y' glyph points and hinting instructions 're-cloned' from 1.03.
Comment 17 Caius Chance 2008-08-25 02:57:26 EDT
Check the whole code map, there are few other glyphs with similar problem:

Incorrect glyph points and missing hinting instructions for U+0079, U+03BC, U+0431, U+2010..2012.

Patched file is available:

https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-1.04.2.zip

https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-1.04.2.tar.gz

https://fedorahosted.org/liberation-fonts/export/877cd82cc8ef4b7f9f1b3645ad0dd54efe60e3fb/trunk/src/LiberationSans-Regular.sfd
Comment 18 Caius Chance 2008-08-26 00:30:09 EDT
Built in rawhide:

http://koji.fedoraproject.org/koji/taskinfo?taskID=785966
Comment 19 Sylvain Beucler 2008-08-26 15:58:37 EDT
Great!

By the way, I saw that this bug was also reported in the Trac instance a couple months ago:
https://fedorahosted.org/liberation-fonts/report/1
https://fedorahosted.org/liberation-fonts/ticket/2

You may want to close it (and possibly disable the bug tracker there).

Note You need to log in before you can comment on or make changes to this bug.