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

 
 

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

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

Submitter:  Alexander Shaduri <alex_sh>
Submitted:  Mon 12 Feb 2007 06:37:17 PM UTC
Votes: 50
 
Severity:  3 - Normal Item Group:  Incorrect behaviour
Status:  Fixed Privacy:  Public
Assigned to:  wl Open/Closed:  Closed
Planned Release:  2.7.1

Jump to the original submission

Thu 17 Nov 2016 07:11:17 AM UTC, 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.



Werner LEMBERG <wl>
Group administrator
Wed 02 Nov 2016 02:29:52 PM UTC, 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>
Group Member
Tue 12 Jun 2007 09:14:55 AM UTC, 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 12 Apr 2007 03:13:43 PM UTC, 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 09 Apr 2007 08:18:50 PM UTC, comment #4: 

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

Werner LEMBERG <wl>
Group administrator
Wed 21 Feb 2007 07:22:29 PM UTC, 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 17 Feb 2007 01:13:59 PM UTC, 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.


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

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

David Turner <freetype>
Group administrator
Mon 12 Feb 2007 06:37:17 PM UTC, 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.)

Attached Files
file #38997:  without-delta.png added by wl (5KiB - image/png)
file #38998:  with-delta.png added by wl (6KiB - image/png)
file #11994:  ft_compare_2110_cvs2007-02-14_hintfull_autohint_size8.png added by alex_sh (191KiB - 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
  • -email is unavailable- added by podtelez (Posted a comment)
  • -email is unavailable- added by pmw
  • -email is unavailable- added by freetype (Posted a comment)
  • -email is unavailable- added by wl (Updated the item)
  • -email is unavailable- added by alex_sh (Submitted the item)
  •  

    There are 50 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 14 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-11-17 wl Attached 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
    2009-08-18 pmw Carbon-Copy- Added -email is unavailable-
    2007-06-12 wl Open/ClosedClosed Open
    2007-02-17 alex_sh Attached File- Added ft_compare_2110_cvs2007-02-14_hintfull_autohint_size8.png, #11994
        Carbon-Copy- Added alex_sh
    2007-02-16 wl Open/ClosedOpen Closed
        Planned ReleaseNone 2.3.2
    2007-02-12 wl StatusNone Confirmed
        Assigned toNone freetype

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code