On Tue, Jul 21, 2020 at 5:48 PM Andrew Tomazos <andrewtoma...@gmail.com> wrote:
> On Tue, Jul 21, 2020 at 9:59 AM Lawrence D'Oliveiro < > l...@geek-central.gen.nz> wrote: > >> On Mon, 20 Jul 2020 19:22:01 +1000, Andrew Tomazos wrote: >> >> > What I mean by "pen" is the FT_Vector translation vector that is >> > passed to FT_Set_Transform before each call to FT_Load_Glyph as each >> > glyph is rendered. >> >> That’s not meant to be used as a “pen”. >> > > In FreeType Glyph Conventions / V it says: > > <quote> > Writing simple text strings > > 1. Convert the character string into a series of glyph indices. > 2. Place the pen to the cursor position. > 3. Get or load the glyph image. > > *4. Translate the glyph so that its ‘origin’ matches the pen position.*5. > Render the glyph to the target device. > 6. Increment the pen position by the glyph's advance width (in pixels). > 7. Start over at step 3 for each of the remaining glyphs. > 8. When all glyphs are done, set the text cursor to the new pen position. > </quote> > > I believe my use of the term "pen" is the same as in the freetype > documentation, no? And I thought that FT_Set_Transform is what is intended > to implement step 4. Is that not correct? If not, then how is step 4 > supposed to be implemented? And why is FT_Set_Transform unsuitable? > And also, using FT_Set_Transform and calling the mentioned variable `pen` is exactly what the example given in the freetype tutorial does: https://www.freetype.org/freetype2/docs/tutorial/example1.c So can you please clarify your statement. What is not meant to be used as what exactly?