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

2018-04-06 Thread Dave Arnold
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). If I were to think about this as a bitmap, I can address row 0 and row 656, so there are 657 addressable rows. But when I render it to a bitmap in

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

2018-04-06 Thread Lawrence D'Oliveiro
On Fri, 06 Apr 2018 08:40:03 +0200 (CEST), Werner LEMBERG wrote: > Of course there will be stair-stepping! Just have a look into the > additional documentation files that accompany the old TrueType > specification (both Apple and MS versions). You'll see rectangles > everywhere talking about

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

2018-04-06 Thread Werner LEMBERG
>> Nice, but completely irrelevant. For the conversion of font >> outlines to pixmaps or graymaps, pixels *are* rectangles, both by >> definition and construction. > > That cannot be true. ??? > The edges of the rectangles would give rise to aliasing, aka > stair-stepping. > >

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

2018-04-05 Thread Lawrence D'Oliveiro
On Fri, 06 Apr 2018 07:15:56 +0200 (CEST), Werner LEMBERG wrote: >>> In TrueType, for example, all glyphs are shifted by (-1/2,-1/2) >>> internally to align pixel centers with the grid. >> >> > > Nice, but completely irrelevant. For

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

2018-04-05 Thread Werner LEMBERG
>> In TrueType, for example, all glyphs are shifted by (-1/2,-1/2) >> internally to align pixel centers with the grid. > > Nice, but completely irrelevant. For the conversion of font outlines to pixmaps or graymaps, pixels *are*

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

2018-04-05 Thread Lawrence D'Oliveiro
On Thu, 05 Apr 2018 13:08:40 +0200 (CEST), Werner LEMBERG wrote: > Yes. Pixels *do* have dimensions :-) > > In TrueType, for example, all glyphs are shifted by (-1/2,-1/2) > internally to align pixel centers with the grid.

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

2018-04-05 Thread Werner LEMBERG
>> 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. > > I'm not sure I understand this - are you saying that the > rasterization goes *between* the rows, not on them? i.e., for a > glyph which hypothetically

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

2018-04-05 Thread Werner LEMBERG
>> 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

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

2018-04-05 Thread Ladislav Dudáš
Hello Simon, 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. - Laco. Dňa 5.4.2018 11:14 AM použÃvateľ Simon Cozens

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

2018-04-05 Thread Simon Cozens
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). If I were to think about this as a bitmap, I can