[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32929] trunk/blender/source/blender/ editors: Enabled kerning for the default UI font for the places that are using UI_DrawString still and for filebrowser .
Andrea Weikert
elubie at gmx.net
Sun Nov 7 19:01:32 CET 2010
Revision: 32929
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32929
Author: elubie
Date: 2010-11-07 19:01:32 +0100 (Sun, 07 Nov 2010)
Log Message:
-----------
Enabled kerning for the default UI font for the places that are using UI_DrawString still and for filebrowser.
Makes text more readable :)
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface_style.c
trunk/blender/source/blender/editors/space_file/file_draw.c
Modified: trunk/blender/source/blender/editors/interface/interface_style.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_style.c 2010-11-07 17:14:10 UTC (rev 32928)
+++ trunk/blender/source/blender/editors/interface/interface_style.c 2010-11-07 18:01:32 UTC (rev 32929)
@@ -253,9 +253,15 @@
{
uiStyle *style= U.uistyles.first;
+ if (style->widget.kerning == 1)
+ BLF_enable(style->widget.uifont_id, BLF_KERNING_DEFAULT);
+
uiStyleFontSet(&style->widget);
BLF_position(style->widget.uifont_id, x, y, 0.0f);
BLF_draw(style->widget.uifont_id, str);
+
+ if (style->widget.kerning == 1)
+ BLF_disable(style->widget.uifont_id, BLF_KERNING_DEFAULT);
}
/* ************** init exit ************************ */
Modified: trunk/blender/source/blender/editors/space_file/file_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/file_draw.c 2010-11-07 17:14:10 UTC (rev 32928)
+++ trunk/blender/source/blender/editors/space_file/file_draw.c 2010-11-07 18:01:32 UTC (rev 32929)
@@ -306,9 +306,14 @@
x = (float)(sx);
y = (float)(sy-height);
+ if (style->widget.kerning == 1)
+ BLF_enable(style->widget.uifont_id, BLF_KERNING_DEFAULT);
+
uiStyleFontSet(&style->widget);
BLF_position(style->widget.uifont_id, x, y, 0);
BLF_draw(style->widget.uifont_id, fname);
+ if (style->widget.kerning == 1)
+ BLF_disable(style->widget.uifont_id, BLF_KERNING_DEFAULT);
}
void file_calc_previews(const bContext *C, ARegion *ar)
More information about the Bf-blender-cvs
mailing list