diff options
author | Campbell Barton <campbell@blender.org> | 2022-04-05 13:10:55 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-04-13 04:58:42 +0300 |
commit | ae43872ad572eb3e6ad1ebfd02921fc2403059bc (patch) | |
tree | a223c292c2bc07b8f5b980b25f434e9fcc1b7163 /source/blender/blenfont/intern/blf_internal.h | |
parent | d0a70adf8f2e8977fb27f8987488bded33e82106 (diff) |
BLF: sub-pixel positioning support
Support sub-pixel kerning and hinting for future support for improved
character placement. No user visible changes have been made.
- Calculate sub-pixel offsets, using integer maths.
- Use convenience functions to perform the conversions and hide the
underlying values.
- Use `ft_pix` type to distinguish values that use sub-pixel integer
values from freetype and values rounded to pixels.
This was originally based on D12999 by @harley with the user visible
changes removed so they can be applied separately.
Diffstat (limited to 'source/blender/blenfont/intern/blf_internal.h')
-rw-r--r-- | source/blender/blenfont/intern/blf_internal.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_internal.h b/source/blender/blenfont/intern/blf_internal.h index 1018dc09ff8..c38b1654d8e 100644 --- a/source/blender/blenfont/intern/blf_internal.h +++ b/source/blender/blenfont/intern/blf_internal.h @@ -133,7 +133,7 @@ struct GlyphBLF *blf_glyph_ensure(struct FontBLF *font, struct GlyphCacheBLF *gc void blf_glyph_free(struct GlyphBLF *g); void blf_glyph_draw( - struct FontBLF *font, struct GlyphCacheBLF *gc, struct GlyphBLF *g, float x, float y); + struct FontBLF *font, struct GlyphCacheBLF *gc, struct GlyphBLF *g, int x, int y); #ifdef WIN32 /* blf_font_win32_compat.c */ |