bugThe FreeType Project - Bugs: bug #19044, Arial spacing problem with 2.3.1...

 
 

bug #19044: Arial spacing problem with 2.3.1 (regression from 2.1.10), autohinting on, AA on, 10pt.

Submitted by:  Alexander Shaduri <alex_sh>
Submitted on:  Mon Feb 12 18:37:17 2007  
Votes:  50  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: FixedPrivacy: Public
Assigned to: Werner LEMBERG <wl>Open/Closed: Closed
Planned Release: 2.7.1

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Thu Nov 17 07:11:17 2016, comment #8:

If you are going to use strong hinting, you must apply side bearing correction (i.e., the fields `lsb_delta' and `rsb_delta' in `FT_GlyphSlot') to compensate the increased side bearings that are intentionally added by the auto-hinter.

The attached ftstring images `without_delta.png' and `with_delta.png' showing `arialbd.ttf' at 10pt@96dpi neatly demonstrate this.

Note that it doesn't harm if the necessary code (as explained in the `FT_GlyphSlot' documentation) gets applied to any other hinting mode; the delta correction values are simply zero then.

This is a documentation bug. I've added a comment to the source code to explain why `pp1.x' is not needed. I've also improved the documentation of the delta values.

(file #38997, file #38998)

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed Nov 2 14:29:52 2016, comment #7:

This code there is really suspect:

pp1x_uh does not even depend on loader->pp1.x,
it is simply the movement of the left edge

whereas

pp2x_h is loader->pp1.x plus the movement of the right edge.

This is confusing.

Alexei Podtelezhnikov <podtelez>
Project Member
Tue Jun 12 09:14:55 2007, comment #6:

Could you please re-open this bug report?
It's still not fixed as of CVS 2007-06-12.

The spacing is really ugly on smaller font sizes, especially with bold fonts, so I have to patch freetype every time I download it. Having used my patched variant for several months now, I haven't noticed any problems yet (96dpi, full autohinting).

Thanks.

Alexander Shaduri <alex_sh>
Thu Apr 12 15:13:43 2007, comment #5:

>>Do you still think that this is necessary with the
>>current CVS version?


Yes, absolutely. Just tested with CVS from 2007-04-12, and I get exactly the same results as I described earlier. Patching it fixes the problem.

Alexander Shaduri <alex_sh>
Mon Apr 9 20:18:50 2007, comment #4:

Do you still think that this is necessary with the
current CVS version?

Werner LEMBERG <wl>
Project AdministratorIn charge of this item.
Wed Feb 21 19:22:29 2007, comment #3:

After about half an hour of random torturing of the freetype source code, I finally found what was causing the distance to be so large. While I have absolutely no idea why it worked or how I found it, I'm pretty sure the patch fixes the "distance too large" problem for Arial 8pt bold @ 96dpi.
If anyone would enlighten me how this code works, I would be grateful. Thanks!

All this patch does is that it comments out 4 lines in afloader.c. Commenting only the first two or the second two lines didn't lead to the same good result.

Here's the patch:

diff -urNa freetype-2007-02-21/src/autofit/afloader.c freetype-2007-02-21.patched/src/autofit/afloader.c
--- freetype-2007-02-21/src/autofit/afloader.c 2007-02-13 01:28:21.000000000 +0400
+++ freetype-2007-02-21.patched/src/autofit/afloader.c 2007-02-21 23:02:33.000000000 +0400
@@ -206,12 +206,13 @@
loader->pp1.x = FT_PIX_ROUND( pp1x_uh );
loader->pp2.x = FT_PIX_ROUND( pp2x_uh );

+/*
if ( loader->pp1.x >= new_lsb && old_lsb > 0 )
loader->pp1.x -= 64;

if ( loader->pp2.x <= edge2->pos && old_rsb > 0 )
loader->pp2.x += 64;
-
+*/
slot->lsb_delta = loader->pp1.x - pp1x_uh;
slot->rsb_delta = loader->pp2.x - pp2x_uh;
}

Alexander Shaduri <alex_sh>
Sat Feb 17 13:13:59 2007, comment #2:

Thanks, the inconsistency seems to be fixed (as of cvs 2007-02-16) - the font looks much better now.

However, I think the spacing is still too wide, especially apparent with Arial 8pt bold font.
I'm attaching the composite screenshot of 4 modes - Arial 8pt (normal and bold) @ 96dpi, both freetype 2.1.10 and cvs 2007-02-14. (the screenshot says it's 2007-02-14, but it's the same with 2007-02-16).

I think this can also be reproduced with
ftview -r 96 8 arial.ttf
pressing "f" clearly shows that autohinted font is much wider (that is, the space between the characters is too wide).

Thank you for fixing the previous regressions.

(file #11994)

Alexander Shaduri <alex_sh>
Wed Feb 14 23:41:25 2007, comment #1:

I believe that this bug is now fixed in the CVS. Please test and I'll close it

David Turner <freetype>
Project Administrator
Mon Feb 12 18:37:17 2007, original submission:

Arial rendering has suffered a regression from 2.1.10 to 2.3.1 with autohinting on.
The spacing between the glyphs is really inconsistent in 2.3.1.

This issue has been reported as a part of a bug (overall Arial font rendering regression) at Novell bugzilla and has been confirmed.

Please, see the original bugreport at http://bugzilla.novell.com/show_bug.cgi?id=243558 (which also deals with a rendering glitch of glyph '9').

The screenshot that shows it best is available at http://bugzilla.novell.com/attachment.cgi?id=118081&action=view (freetype 2.1.10, 2.2.1 and 2.3.1 compared, Arial @ 10pt, autohint on, AA on, 96 dpi). Note the uneven spacing in 2.3.1.

The screenshot was taken using kwrite, but can also be replicated using ftview. However, ftview from 2.1.10 doesn't seem to accept a custom text string to display, so it's difficult to compare the two ftview outputs (the problem is not that apparent on a character table that ftview displays by default).
I can upload some ftview screenshots too if needed.

Alexander Shaduri <alex_sh>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #38997:  without-delta.png added by wl (5kB - image/png)
file #38998:  with-delta.png added by wl (6kB - image/png)
file #11994:  ft_compare_2110_cvs2007-02-14_hintfull_autohint_size8.png added by alex_sh (191kB - image/png - Arial 8pt (normal and bold) @ 96dpi, both freetype 2.1.10 and cvs 2007-02-14)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by podtelez (Posted a comment)
  • -unavailable- added by pmw
  • -unavailable- added by freetype (Posted a comment)
  • -unavailable- added by wl (Updated the item)
  • -unavailable- added by alex_sh (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 50 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 14 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu Nov 17 07:11:17 2016wlAttached File-=>Added without-delta.png, #38997
      Attached File-=>Added with-delta.png, #38998
      StatusConfirmed=>Fixed
      Assigned tofreetype=>wl
      Open/ClosedOpen=>Closed
      Planned Release2.3.2=>2.7.1
    Tue Aug 18 10:59:27 2009pmwCarbon-Copy-=>Added -unavailable-
    Tue Jun 12 12:27:48 2007wlOpen/ClosedClosed=>Open
    Sat Feb 17 13:13:59 2007alex_shAttached File-=>Added ft_compare_2110_cvs2007-02-14_hintfull_autohint_size8.png, #11994
      Carbon-Copy-=>Added alex_sh
    Fri Feb 16 08:32:42 2007wlOpen/ClosedOpen=>Closed
      Planned ReleaseNone=>2.3.2
    Mon Feb 12 21:11:00 2007wlStatusNone=>Confirmed
      Assigned toNone=>freetype

    Back to the top


    Powered by Savane 3.1-cleanup