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:
authorDiego Borghetti <bdiego@gmail.com>2009-07-11 02:16:25 +0400
committerDiego Borghetti <bdiego@gmail.com>2009-07-11 02:16:25 +0400
commitb80b581bc03b6df28bd3a10118d85b78d5ca011b (patch)
tree2294f8ee5407651014c9ce873853276277857595 /source/blender/editors
parent395025d67ec9374039703d591d6d44b664f79dcd (diff)
Allow the user set which style to use for the kerning value.
This are freetype2 options: Unfitted - Scaled but un-grid-fitted kerning distances Default - Scaled and grid-fitted kerning distances We always use Unfitted, but the "Default" style give better result here, so please test and if nobody complain we can set this style as the default.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_style.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 83eb8a32701..57f35f71927 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -93,6 +93,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->paneltitle.uifont_id= UIFONT_DEFAULT;
style->paneltitle.points= 13;
+ style->paneltitle.kerning= 0;
style->paneltitle.shadow= 5;
style->paneltitle.shadx= 2;
style->paneltitle.shady= -2;
@@ -101,6 +102,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->grouplabel.uifont_id= UIFONT_DEFAULT;
style->grouplabel.points= 12;
+ style->grouplabel.kerning= 0;
style->grouplabel.shadow= 3;
style->grouplabel.shadx= 1;
style->grouplabel.shady= -1;
@@ -108,6 +110,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->widgetlabel.uifont_id= UIFONT_DEFAULT;
style->widgetlabel.points= 11;
+ style->widgetlabel.kerning= 0;
style->widgetlabel.shadow= 3;
style->widgetlabel.shadx= 1;
style->widgetlabel.shady= -1;
@@ -116,6 +119,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->widget.uifont_id= UIFONT_DEFAULT;
style->widget.points= 11;
+ style->widget.kerning= 0;
style->widget.shadowalpha= 0.25f;
style->columnspace= 5;
@@ -169,10 +173,15 @@ void uiStyleFontDraw(uiFontStyle *fs, rcti *rect, char *str)
BLF_shadow_offset(fs->shadx, fs->shady);
}
+ if (fs->kerning == 1)
+ BLF_enable(BLF_KERNING_DEFAULT);
+
BLF_draw(str);
BLF_disable(BLF_CLIPPING);
if (fs->shadow)
BLF_disable(BLF_SHADOW);
+ if (fs->kerning == 1)
+ BLF_disable(BLF_KERNING_DEFAULT);
}
/* ************** helpers ************************ */