freetype-devel
[Top][All Lists]
Advanced

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

Re: [ft-devel] comments on GF driver


From: Werner LEMBERG
Subject: Re: [ft-devel] comments on GF driver
Date: Sun, 12 Aug 2018 19:36:44 +0200 (CEST)

[Now testing `wip' branch, commit b064189c9]

> while debugging your code I've observed some issues.

Here the next bunch of comments.  There is so much still to do...

* The code to compute `encoding' in function `gf_set_encodings' looks
  overly complicated.  I don't think you need two nested loops for
  that.

* The test in gfdrivr.c:455 is completely wrong.  First of all, the
  values `code_min' and `code_max' don't reflect the real values in
  the GF font; right now they are hard-coded.  Please fix that.

  Second, you must not compare glyph indices with `code_{min,max}' at
  all, since the latter reflect *encoding* values, not glyph indices!
  Glyph indices always start with value 0 and would normally go up to
  the number of glyphs - 1.  However, as discussed earlier, there
  should be two artifical characters added, namely a bitmap shape for
  the `.notdef' character at index 0, and a `space' glyph at index 1.
  This is still missing...

* gfdrivr.c:463: `metric' should be a pointer!  Right now, you are
  uselessly copying the whole structure.

* And most important: Where do you (re)allocate the bitmap for the
  current glyph?  `slot->bitmap' is always NULL, and `gf_read_glyph'
  has no buffer to store the data it is reading...

  No wonder that no glyphs get displayed.

Sigh.  Giving up right now.  Hopefully, you can quickly fix the most
glaring bugs.


    Werner

reply via email to

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