Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarley Acheson <harley.acheson@gmail.com>2020-06-06 01:39:17 +0300
committerHarley Acheson <harley.acheson@gmail.com>2020-06-06 01:39:17 +0300
commitb74cc23dc478f2c4260e2e4269c8450e3d5c450e (patch)
treee540058bab2816422cff19043ffb1766a804f6e8 /source/blender/editors/interface/interface_style.c
parentfc672ce8e24e5fc62a42010dad790324f2b99a2d (diff)
UI: Ability to Print Bold and Italics
Adds the ability to print text in bold or italics style, synthesized from a single base UI font. Differential Revision: https://developer.blender.org/D7893 Reviewed by Brecht Van Lommel
Diffstat (limited to 'source/blender/editors/interface/interface_style.c')
-rw-r--r--source/blender/editors/interface/interface_style.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index e481ec08d72..64070725f2b 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -169,6 +169,12 @@ void UI_fontstyle_draw_ex(const uiFontStyle *fs,
if (fs_params->word_wrap == 1) {
font_flag |= BLF_WORD_WRAP;
}
+ if (fs->bold) {
+ font_flag |= BLF_BOLD;
+ }
+ if (fs->italic) {
+ font_flag |= BLF_ITALIC;
+ }
BLF_enable(fs->uifont_id, font_flag);