Hello,

I have some troubles with Misaki Mincho font (misakimn.ttf) [1], regarding embedded bitmaps metrics.

Looking at EBLC data, there's only one strike available, metrics are:

---
Horizontal Line Metrics
               Ascender:    8
              Descender:    8
---
                 ppem X:     8
                 ppem Y:     8
---

What freetype does in tt_face_load_strike_metrics():

---
metrics->ascender  = (FT_Char)strike[16] * 64;  /* hori.ascender  */
metrics->descender = (FT_Char)strike[17] * 64;  /* hori.descender */
metrics->height    = metrics->ascender - metrics->descender;
---

So resulting 'height' is set to zero, and this eventually leads to division by zero in our code.

The question is mostly if it's reasonable to have some kind of workaround for that in freetype itself, like ignoring descender entirely in such cases or something else?


[1] https://packages.debian.org/jessie/all/fonts-misaki/download

_______________________________________________
Freetype mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to