bugThe FreeType Project - Bugs: bug #50873, [FreeType 2.7.1] Distortion of...

 
 

bug #50873: [FreeType 2.7.1] Distortion of some glyphs with the default bytecode hinting

Submitted by:  Alexander Voitenko <tarm>
Submitted on:  Tue 25 Apr 2017 01:13:00 PM UTC  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: Wont FixPrivacy: 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.

 

Wed 26 Apr 2017 07:21:42 AM UTC, comment #4:

Well, it is unavoidable that the auto-hinter produces different results. Especially if manual hinting intentionally exaggerates some font features (which is basically a good thing if your target is, say, a computer screen) you get differences that cannot be avoided.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed 26 Apr 2017 06:31:54 AM UTC, comment #3:

Thanks for a feedback.

The goal of my initial message was to draw your attention to a fact that users of some platform usually expect to get near the same font rendering result as with native tools. Otherwise, they complain about text look and obviously think that it is my issue.

Of course, I will put a workaround in my code for such a case but I think it is good to let you know about.

Regards.

Alexander Voitenko <tarm>
Wed 26 Apr 2017 05:44:50 AM UTC, comment #2:

Please never post non-free stuff to a public place! I had to delete your font attachment.

And Alexei is right: The font's TrueType bytecode decides at 12ppem that digits have to be rendered one pixel smaller than uppercase letters – this is a manual decision, i.e., hard-coded into the bytecode by the human font hinter.

The auto-hinter doesn't have this information; instead, it aligns digits to the same height as the uppercase letters. Admittedly, this is not ideal since the height of digits is indeed a bit smaller: There are internal reasons for this, and maybe this gets fixed eventually in a later FreeType version. However, at 12ppem, the difference is far smaller than a full pixel, so even if FreeType handled digit heights separately, uppercase glyphs and digits would get the same height.

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Tue 25 Apr 2017 04:07:43 PM UTC, comment #1:

Helvetica numbers are indeed shorter than capital letters by design, see this sample. Therefore, it is a matter of taste which hinting you prefer. Both are valid at this size.

Alexei Podtelezhnikov <podtelez>
Project Member
Tue 25 Apr 2017 01:13:00 PM UTC, original submission:

Hello, I am using the latest (2.7.1) version of the FreeType library on my Mac.
I've found a problem with the Helvetica font (version 12.0d1e3) while trying to render glyphs with certain sizes.

Please see attached image with Helvetica 12pt.

There are 3 group of letters:
1) Rendered using QPainter::drawGlyphRun (system rendering)
2) FT_LOAD_FORCE_AUTOHINT
3) FT_LOAD_DEFAULT

At the 3-d group symbol '2' is obviously 1 pixel lower. The situation looks especially ugly comparing to correctly rendered glyphs like 'A'.

Alexander Voitenko <tarm>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #40500:  helvetica_12pt.png added by tarm (9KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by wl (Posted a comment)
  • -unavailable- added by podtelez (Posted a comment)
  • -unavailable- added by tarm (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 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 6 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 26 Apr 2017 05:44:50 AM UTCwlAssigned toNone=>wl
    Wed 26 Apr 2017 05:30:50 AM UTCwlAttached File#40499=>Removed
    Tue 25 Apr 2017 04:07:43 PM UTCpodtelezStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed
    Tue 25 Apr 2017 01:13:00 PM UTCtarmAttached File-=>Added Helvetica.dfont.zip, #40499
      Attached File-=>Added helvetica_12pt.png, #40500

    Back to the top


    Powered by Savane 3.1-cleanup1