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

 
 

bug #33288: FT_Render_Glyph gives incorrect result on some glyphs

Submitted by:  None
Submitted on:  Wed 11 May 2011 11:05:33 AM UTC  
Votes:  100  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: InvalidPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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!

(file #23428, file #23429, file #23430)

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
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.)

Attach File(s):
   
   
Comment:
   

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
  • -unavailable- added by wl (Updated the item)
  • -unavailable- added by sphair (Voted in favor of this item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 100 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 19 May 2011 01:14:08 PM UTCwlAttached 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
    Wed 11 May 2011 11:50:07 AM UTCsphairCarbon-Copy-=>Added sphair
    Wed 11 May 2011 11:05:33 AM UTCNoneAttached 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.1-cleanup1