[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft] Getting accurate metrics width and height for glyphs
From: |
Stephan B. |
Subject: |
[ft] Getting accurate metrics width and height for glyphs |
Date: |
Fri, 14 Sep 2018 13:54:15 -0700 |
Hi!
Currently when I try to retrieve the metrics of a given scaled glyph using
FT_LOAD_COMPUTE_METRICS, the width and height returned vs. the width and
rows of the bitmap produced using FT_LOAD_RENDER, are the same. However,
when performing the same operation using FT_LOAD_COMPUTE_METRICS |
FT_LOAD_NO_HINTING, the metrics are usually off by potentially 1 pixel
compared to the bitmap.
I can obviously use FT_LOAD_RENDER, and use the width and rows of the bitmap
to determine the width and height of the glyph and not rely on those metrics
but that comes at a performance cost. So is it possible to get accurate
width and height of (width and rows) of what the bitmap will be without
having to use FT_LOAD_RENDER and if so how?
P.S. I would have expected this behavior with hinting but not when not using
hinting. I must be overlooking something here.
Currently using version 2.8.0.
Regards,
- [ft] Getting accurate metrics width and height for glyphs,
Stephan B. <=