Smal tweak to allow the user set a kerning value.

This commit add two option to the blenfont library:

1) BLF_FONT_KERNING

 This enable the kerning information that come with the
font, by default this option is disable and still don't
have a UI for change.

2) BLF USER_KERNING
 This allow the user set a kerning value to by apply for
every character, by default this option is enable but all
the font have a kerning value of zero.

Ton I add this option to the style with a default value of 1.

Access from:
 Outliner -> User Preferences -> Style -> FontStyle -> Kerning
This commit is contained in:
2009-06-11 21:43:59 +00:00
parent a054f3ccce
commit ec8b2593ec
8 changed files with 67 additions and 9 deletions

View File

@@ -91,6 +91,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->paneltitle.uifont_id= UIFONT_DEFAULT;
style->paneltitle.points= 13;
style->paneltitle.kerning= 1;
style->paneltitle.shadow= 5;
style->paneltitle.shadx= 2;
style->paneltitle.shady= -2;
@@ -99,6 +100,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->grouplabel.uifont_id= UIFONT_DEFAULT;
style->grouplabel.points= 12;
style->grouplabel.kerning= 1;
style->grouplabel.shadow= 3;
style->grouplabel.shadx= 1;
style->grouplabel.shady= -1;
@@ -106,6 +108,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->widgetlabel.uifont_id= UIFONT_DEFAULT;
style->widgetlabel.points= 11;
style->widgetlabel.kerning= 1;
style->widgetlabel.shadow= 3;
style->widgetlabel.shadx= 1;
style->widgetlabel.shady= -1;
@@ -114,6 +117,7 @@ static uiStyle *ui_style_new(ListBase *styles, const char *name)
style->widget.uifont_id= UIFONT_DEFAULT;
style->widget.points= 11;
style->widget.kerning= 1;
style->widget.shadowalpha= 0.25f;
style->columnspace= 5;
@@ -263,5 +267,6 @@ void uiStyleFontSet(uiFontStyle *fs)
BLF_set(font->blf_id);
BLF_size(fs->points, U.dpi);
BLF_kerning(fs->kerning);
}