diff options
Diffstat (limited to 'source/blender/blenfont/intern/blf_internal.h')
-rw-r--r-- | source/blender/blenfont/intern/blf_internal.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_internal.h b/source/blender/blenfont/intern/blf_internal.h index 39d3af22562..e1001cfc1ba 100644 --- a/source/blender/blenfont/intern/blf_internal.h +++ b/source/blender/blenfont/intern/blf_internal.h @@ -25,6 +25,13 @@ struct rcti; /* Maximum number of bytes to use for cached data nodes. 0 is default of 200,000. */ #define BLF_CACHE_BYTES 400000 +/* We assume square pixels at a fixed DPI of 72, scaling only the size. Therefore + * font size = points = pixels, i.e. a size of 20 will result in a 20-pixel EM square. + * Although we could use the actual monitor DPI instead, we would then have to scale + * the size to cancel that out. Other libraries like Skia use this same fixed value. + */ +#define BLF_DPI 72 + extern struct FontBLF *global_font[BLF_MAX_FONT]; void blf_batch_draw_begin(struct FontBLF *font); @@ -70,7 +77,7 @@ void blf_font_attach_from_mem(struct FontBLF *font, const unsigned char *mem, si /** * Change font's output size. Returns true if successful in changing the size. */ -bool blf_font_size(struct FontBLF *font, float size, unsigned int dpi); +bool blf_font_size(struct FontBLF *font, float size); void blf_font_draw(struct FontBLF *font, const char *str, |