bugThe FreeType Project - Bugs: bug #33288, FT_Render_Glyph gives incorrect...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #33288: FT_Render_Glyph gives incorrect result on some glyphs

Submitter:  None
Submitted:  Wed 11 May 2011 11:05:33 AM UTC
Votes: 100
 
Severity:  3 - Normal Item Group:  Incorrect behaviour
Status:  Invalid Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  None

Fri 20 May 2011 06:45:54 AM UTC, comment #3: 

Thank you for your help. I will report the issue to the DejaVu font team.

Anonymous
Thu 19 May 2011 01:14:08 PM UTC, comment #2: 

[tested with DejaVuSans 2.32]

I'm quite sure this is a bug in the font itself.

If you debug glyph `two' with different xres and yres, you can see many artefacts.  For example, at (x-ppem,y-ppem) = (50,44), the diagonal stroke gets distorted to the right, and at (54,44), the spike to the left is eight times larger than at (55,44), which is what your original settings are equivalent.

I've attached images which demonstrate it.

Please report this issue to the DejaVu font team!


Werner LEMBERG <wl>
Group administrator
Thu 19 May 2011 09:04:53 AM UTC, comment #1: 

(From ClanLib's forum):

I have the same problem on Gentoo Linux and Windows when using DejaVuSans.ttf. So I think it's a freetype bug, not Ubuntu's one.
 
(Or maybe the glyph itself is somehow broken).
 
Anyway this error seems to appear only when the average character width is set to nonzero. Default (zero) average width works well with any font size.
 
So the simplest workaround would be to always use default average width unless the user specifies otherwise. Eventually it's the width the font has been designed for

Anonymous
Wed 11 May 2011 11:05:33 AM UTC, original submission:  

Attached is a test application (main.cpp) that demonstrates the problem.

It tries to render a "2". But the middle curve is reversed when using: FT_LOAD_TARGET_NORMAL, FT_RENDER_MODE_NORMAL

See attached text files:
  freetest.txt for unix line feeds
  freetest_crlf.txt for win32 line feeds

(Remember to use a fixed pitch font when viewing these files)

This problem only occurs on the Linux Ubuntu distribution "freetype (2.4.4-1ubuntu2) natty"

It has been there for about 3 years. Previously, we (at clanlib.org) used the FT_LOAD_TARGET_LIGHT workaround, but now we started to use sub-pixel rendering "FT_LOAD_TARGET_LCD" also has the same problems.

It works on Win32 and Linux, by compiling freetype ... so I assume that it is only triggered by specific Ubuntu build settings (That I am not aware of)

Note: Different fonts and different font sizes make the error go away.

See - http://esoteric.clanlib.org/~rombust/sub_on.png for a graphical example (note the "2" in the red box)


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #23428:  two-50-44.png added by wl (33KiB - image/png)
file #23429:  two-55-44.png added by wl (34KiB - image/png)
file #23430:  two-54-44.png added by wl (42KiB - image/png)
file #23385:  main.cpp added by None (4KiB - text/x-c++src)
file #23386:  freetest.txt added by None (2KiB - text/plain)
file #23387:  freetest_crlf.txt added by None (2KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by wl (Updated the item)
  • -email is unavailable- added by sphair (Voted in favor of this item)
  •  

    There are 100 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 10 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-05-19 wl Attached File- Added two-50-44.png, #23428
        Attached File- Added two-55-44.png, #23429
        Attached File- Added two-54-44.png, #23430
        StatusNone Invalid
        Assigned toNone wl
        Open/ClosedOpen Closed
    2011-05-11 sphair Carbon-Copy- Added sphair
    2011-05-11 None Attached File- Added main.cpp, #23385
        Attached File- Added freetest.txt, #23386
        Attached File- Added freetest_crlf.txt, #23387

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code