bugThe FreeType Project - Bugs: bug #20476, linearHoriAdvance is snapped to...

 
 

bug #20476: linearHoriAdvance is snapped to some integer value with monospaced fonts

Submitted by:  None
Submitted on:  Fri Jul 13 15:05:52 2007  
 
Severity: 3 - NormalItem Group: Incorrect behaviour
Status: Wont FixPrivacy: Public
Assigned to: David Turner <freetype>Open/Closed: Closed
Planned Release: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Fri Jan 13 07:29:39 2017, comment #2:

To be more precise: It was a bug that the `linearHoriAdvance' values of proportional fonts were strictly proportional to the `char_height' (or `char_width') parameter of `FT_Set_Char_Size'.

This has been fixed meanwhile (already a few years ago, I no longer remember).

The `char_height' parameter gives a size in fractional points, not pixels. The resulting pixel size is always an integer value.

Werner LEMBERG <wl>
Project Administrator
Fri Jan 13 04:16:55 2017, comment #1:

This is not a bug. The outlines are scaled and rendered properly without any rounding. The rounding of advances happens because you cannot render bitmaps at fractional pixels. Accounting for the accumulating rounding errors by adding/removing pixels won't work, because the font won't look fixed. It is what it is.

Alexei Podtelezhnikov <podtelez>
Project Member
Fri Jul 13 15:05:52 2007, original submission:

In TT font Courier New (windows file cour.ttf) linearHoriAdvance, should be accurate and strictly proportional to the sub-pixel height you set. However, it is snapped to some value.

Font: cour.ttf from WinXP
Hinting: FT_LOAD_NO_HINTING
Then you set:
FT_Set_Char_Size(face, 0, height, 72, 72);
where "heights" are:
7.02, 7.80, 8.58, 9.36, 10.14, 10.92, 11.70, 12.48,
13.26, 14.04, 14.82, 15.60
(in the corresponding 26.6 units of course)

It results in the following picture using linearHoriAdvance:
http://antigrain.com/stuff/12cour.png
With any proportional font there's no such effect and the text width is proportional to the given height.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #13329:  12cour.png added by None (38kB - image/png)

 

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 wl (Updated 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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri Jan 13 04:16:55 2017podtelezStatusNone=>Wont Fix
      Open/ClosedOpen=>Closed
    Fri Jul 13 21:23:41 2007wlAssigned toNone=>freetype
    Fri Jul 13 15:05:53 2007NoneAttached File-=>Added 12cour.png, #13329

    Back to the top


    Powered by Savane 3.1-cleanup1