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:
Created attachment 313895 [details] Screenshot with LiberationSans 2007
Created attachment 313896 [details] Screenshot with LiberationSans 2008 1.0.4
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.
> 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.
Created attachment 313987 [details] 1. hinting on
Created attachment 313988 [details] 2. hinting off
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.
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?
Sylvain, are you able to reproduce the problem on debian or gentoo for other apps?
Caius, actually I think attachment 313987 [details] is quite clear - so you should be able to reproduce on Debian with that.
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?
> 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> 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'
Thanks! Easily reproduced on Ubuntu-8.04 too.
Trying to fix with patched fontforge.
Created attachment 314902 [details] Sample patched 1.04, with 'y' glyph points and hinting instructions 're-cloned' from 1.03.
Here is the fontforge upstream thread for reference: http://sourceforge.net/mailarchive/forum.php?thread_name=10325386.371219216710950.JavaMail.cchance%40sashimi.bne.redhat.com&forum_name=fontforge-devel
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
Built in rawhide: http://koji.fedoraproject.org/koji/taskinfo?taskID=785966
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).