diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-05-03 09:51:34 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-05-03 09:51:34 +0300 |
commit | 0d65520f05ec5474e62d453aa62eb06efa3981d7 (patch) | |
tree | 2436b0d13a234c474f3bd2cf55bec6014603f886 /source/blender/blenfont/BLF_api.h | |
parent | d388c1c524948df17d6c74c3830f2803ac4933b4 (diff) |
BLF: add new arguments to BLF_GlyphBoundsFn
- glyph_bounds: to get the character width.
- glyph_bearing: lower left character starting point.
These values are needed for more precise glyph calculations.
Diffstat (limited to 'source/blender/blenfont/BLF_api.h')
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index f6f1393bd21..2158596745a 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -117,9 +117,11 @@ void BLF_draw_ascii(int fontid, const char *str, size_t len) ATTR_NONNULL(2); int BLF_draw_mono(int fontid, const char *str, size_t len, int cwidth) ATTR_NONNULL(2); typedef bool (*BLF_GlyphBoundsFn)(const char *str, - const size_t str_ofs, - const struct rcti *glyph_bounds, + const size_t str_step_ofs, + const struct rcti *glyph_step_bounds, const int glyph_advance_x, + const struct rctf *glyph_bounds, + const float glyph_bearing[2], void *user_data); void BLF_boundbox_foreach_glyph_ex(int fontid, |