diff options
-rw-r--r-- | source/blender/blenfont/BLF_api.h | 2 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 2 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_font.c | 6 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_internal_types.h | 2 | ||||
-rw-r--r-- | source/blender/editors/interface/interface_style.c | 8 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 4 |
7 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/blenfont/BLF_api.h b/source/blender/blenfont/BLF_api.h index d1d802622ea..e871de490f3 100644 --- a/source/blender/blenfont/BLF_api.h +++ b/source/blender/blenfont/BLF_api.h @@ -85,7 +85,7 @@ float BLF_height_default(char *str); void BLF_rotation(float angle); void BLF_clipping(float xmin, float ymin, float xmax, float ymax); void BLF_blur(int size); -void BLF_kerning(int space); +void BLF_kerning(float space); void BLF_enable(int option); void BLF_disable(int option); diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index ffb845f7888..f06c7fb0d28 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -492,7 +492,7 @@ void BLF_mode(int mode) font->mode= mode; } -void BLF_kerning(int space) +void BLF_kerning(float space) { FontBLF *font; diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index df77aee70e8..5a3b3207e29 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -100,7 +100,7 @@ void blf_font_draw(FontBLF *font, char *str) GlyphBLF *g, *g_prev; FT_Vector delta; FT_UInt glyph_index, g_prev_index; - int pen_x, pen_y, old_pen_x; + float pen_x, pen_y, old_pen_x; int i, has_kerning; if (!font->glyph_cache) @@ -159,7 +159,7 @@ void blf_font_draw(FontBLF *font, char *str) } /* do not return this loop if clipped, we want every character tested */ - blf_glyph_render(font, g, (float)pen_x, (float)pen_y); + blf_glyph_render(font, g, pen_x, pen_y); pen_x += g->advance; g_prev= g; @@ -321,7 +321,7 @@ void blf_font_fill(FontBLF *font) font->flags= BLF_USER_KERNING; font->dpi= 0; font->size= 0; - font->kerning= 0; + font->kerning= 0.0f; font->cache.first= NULL; font->cache.last= NULL; font->glyph_cache= NULL; diff --git a/source/blender/blenfont/intern/blf_internal_types.h b/source/blender/blenfont/intern/blf_internal_types.h index d200d910020..60446aa93b2 100644 --- a/source/blender/blenfont/intern/blf_internal_types.h +++ b/source/blender/blenfont/intern/blf_internal_types.h @@ -168,7 +168,7 @@ typedef struct FontBLF { int size; /* kerning space, user setting. */ - int kerning; + float kerning; /* max texture size. */ int max_tex_size; diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c index a3959327ccd..f1d29ac8688 100644 --- a/source/blender/editors/interface/interface_style.c +++ b/source/blender/editors/interface/interface_style.c @@ -91,7 +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.kerning= 0.5; style->paneltitle.shadow= 5; style->paneltitle.shadx= 2; style->paneltitle.shady= -2; @@ -100,7 +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.kerning= 0.5; style->grouplabel.shadow= 3; style->grouplabel.shadx= 1; style->grouplabel.shady= -1; @@ -108,7 +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.kerning= 0.5; style->widgetlabel.shadow= 3; style->widgetlabel.shadx= 1; style->widgetlabel.shady= -1; @@ -117,7 +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.kerning= 0.5; style->widget.shadowalpha= 0.25f; style->columnspace= 5; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index c99992cb126..87931f8e93d 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -66,8 +66,8 @@ typedef struct uiFont { typedef struct uiFontStyle { short uifont_id; /* saved in file, 0 is default */ short points; /* actual size depends on 'global' dpi */ - short kerning; /* kerning space between characters. */ - char pad[6]; + float kerning; /* kerning space between characters. */ + float pad; short italic, bold; /* style hint */ short shadow; /* value is amount of pixels blur */ short shadx, shady; /* shadow offset in pixels */ diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 7e14f8e2f5b..082e4896d16 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -137,8 +137,8 @@ static void rna_def_userdef_theme_ui_font_style(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Points", ""); RNA_def_property_update(prop, NC_WINDOW, NULL); - prop= RNA_def_property(srna, "kerning", PROP_INT, PROP_NONE); - RNA_def_property_range(prop, -5, 5); + prop= RNA_def_property(srna, "kerning", PROP_FLOAT, PROP_NONE); + RNA_def_property_range(prop, -5.0, 5.0); RNA_def_property_ui_text(prop, "Kerning", ""); RNA_def_property_update(prop, NC_WINDOW, NULL); |