freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ft] Off by one error in freetype (or in programmer?)


From: Werner LEMBERG
Subject: Re: [ft] Off by one error in freetype (or in programmer?)
Date: Thu, 05 Apr 2018 12:44:42 +0200 (CEST)

>> So, I may be about to embarrass myself, because fencepost errors
>> are like that, but here goes.  If I look at the glyph /H in Source
>> Sans Pro in a font editor, the top right bound is a point at
>> (562,656) and the bottom left point is at (90,0).
>
> You compute correctly width (472) and height (656) of bitmap.  So
> addressable rows are 0 to 655 (included) - row 0 is 1st line, row 1
> is 2nd line and so on.  So you cannot access row 656 which is 657th
> line.

Just for completeness: Bitmap cell 0 is from coordinate 0 to 1, bitmap
cell 1 is from 1 to 2, ..., bitmap cell 655 is from 655 to 656.


    Werner

reply via email to

[Prev in Thread] Current Thread [Next in Thread]