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:
@@ -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 ************************ */
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user