Commit: f42664501e3beda8a0d424088a4e66345217f61e
Author: Campbell Barton
Date:   Sat Aug 29 02:48:48 2015 +1000
Branches: temp-blf-wordwrap
https://developer.blender.org/rBf42664501e3beda8a0d424088a4e66345217f61e

Support word-wrap for UI styles

===================================================================

M       source/blender/editors/interface/interface_style.c
M       source/blender/makesdna/DNA_userdef_types.h

===================================================================

diff --git a/source/blender/editors/interface/interface_style.c 
b/source/blender/editors/interface/interface_style.c
index e158b70..8b922ab 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -167,6 +167,9 @@ void UI_fontstyle_draw_ex(
        if (fs->kerning == 1) {
                font_flag |= BLF_KERNING_DEFAULT;
        }
+       if (fs->word_wrap == 1) {
+               font_flag |= BLF_WORDWRAP;
+       }
 
        BLF_enable(fs->uifont_id, font_flag);
 
diff --git a/source/blender/makesdna/DNA_userdef_types.h 
b/source/blender/makesdna/DNA_userdef_types.h
index bc2c746..00dc1c1 100644
--- a/source/blender/makesdna/DNA_userdef_types.h
+++ b/source/blender/makesdna/DNA_userdef_types.h
@@ -74,7 +74,8 @@ typedef struct uiFontStyle {
        short uifont_id;                /* saved in file, 0 is default */
        short points;                   /* actual size depends on 'global' dpi 
*/
        short kerning;                  /* unfitted or default kerning value. */
-       char pad[6];
+       char word_wrap;                 /* enable word-wrap when drawing */
+       char pad[5];
        short italic, bold;             /* style hint */
        short shadow;                   /* value is amount of pixels blur */
        short shadx, shady;             /* shadow offset in pixels */

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to