Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2013-01-23 20:01:35 +0400
committerTon Roosendaal <ton@blender.org>2013-01-23 20:01:35 +0400
commit17b1c19054f992699384708e194147a905ee9739 (patch)
treef3241650bdb493bd7b320929fceeebdb17c07668 /source/blender/blenfont/intern/blf_glyph.c
parent36641078f875c1bf12b37a39112a03a3adfc79fe (diff)
UI todo:
Added "Panel Title" style to Theme settings. Allows to make these nice larger or draw differently. Also tried to put hinting in Style, but this needs to be a per-font setting. uiFont data is still not being saved (also not allowing to set own font files for UI). That's a todo for 267 then.
Diffstat (limited to 'source/blender/blenfont/intern/blf_glyph.c')
-rw-r--r--source/blender/blenfont/intern/blf_glyph.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_glyph.c b/source/blender/blenfont/intern/blf_glyph.c
index 12c0088e93e..a6b04b24399 100644
--- a/source/blender/blenfont/intern/blf_glyph.c
+++ b/source/blender/blenfont/intern/blf_glyph.c
@@ -213,6 +213,7 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
FT_Error err;
FT_Bitmap bitmap, tempbitmap;
int sharp = (U.text_render & USER_TEXT_DISABLE_AA);
+ int flags = FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP;
FT_BBox bbox;
unsigned int key;
@@ -220,10 +221,13 @@ GlyphBLF *blf_glyph_add(FontBLF *font, unsigned int index, unsigned int c)
if (g)
return g;
+ if (font->flags & BLF_HINTING)
+ flags &= ~FT_LOAD_NO_HINTING;
+
if (sharp)
err = FT_Load_Glyph(font->face, (FT_UInt)index, FT_LOAD_TARGET_MONO);
else
- err = FT_Load_Glyph(font->face, (FT_UInt)index, FT_LOAD_TARGET_NORMAL | FT_LOAD_NO_HINTING | FT_LOAD_NO_BITMAP); /* Sure about NO_* flags? */
+ err = FT_Load_Glyph(font->face, (FT_UInt)index, flags);
if (err)
return NULL;