Enabled kerning for the default UI font for the places that are using UI_DrawString still and for filebrowser.

Makes text more readable :)
This commit is contained in:
2010-11-07 18:01:32 +00:00
parent a9f96d1adc
commit 4741dd26d3
2 changed files with 11 additions and 0 deletions

View File

@@ -253,9 +253,15 @@ void UI_DrawString(float x, float y, char *str)
{
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 ************************ */

View File

@@ -306,9 +306,14 @@ static void file_draw_string(int sx, int sy, const char* string, float width, in
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)