diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/makesdna/DNA_sequence_types.h | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sequencer.c | 10 | ||||
-rw-r--r-- | source/blender/sequencer/intern/effects.c | 8 |
3 files changed, 20 insertions, 0 deletions
diff --git a/source/blender/makesdna/DNA_sequence_types.h b/source/blender/makesdna/DNA_sequence_types.h index ef14a5c52d4..4211c913a0c 100644 --- a/source/blender/makesdna/DNA_sequence_types.h +++ b/source/blender/makesdna/DNA_sequence_types.h @@ -354,6 +354,8 @@ typedef struct TextVars { enum { SEQ_TEXT_SHADOW = (1 << 0), SEQ_TEXT_BOX = (1 << 1), + SEQ_TEXT_BOLD = (1 << 2), + SEQ_TEXT_ITALIC = (1 << 3), }; /* TextVars.align */ diff --git a/source/blender/makesrna/intern/rna_sequencer.c b/source/blender/makesrna/intern/rna_sequencer.c index 01b083dc3c8..54ac7860108 100644 --- a/source/blender/makesrna/intern/rna_sequencer.c +++ b/source/blender/makesrna/intern/rna_sequencer.c @@ -2932,6 +2932,16 @@ static void rna_def_text(StructRNA *srna) RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_TEXT_BOX); RNA_def_property_ui_text(prop, "Shadow", "Display colored box behind text"); RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update"); + + prop = RNA_def_property(srna, "use_bold", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_TEXT_BOLD); + RNA_def_property_ui_text(prop, "Bold", "Display text as bold"); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update"); + + prop = RNA_def_property(srna, "use_italic", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_TEXT_ITALIC); + RNA_def_property_ui_text(prop, "Italic", "Display text as italic"); + RNA_def_property_update(prop, NC_SCENE | ND_SEQUENCER, "rna_Sequence_invalidate_raw_update"); } static void rna_def_color_mix(StructRNA *srna) diff --git a/source/blender/sequencer/intern/effects.c b/source/blender/sequencer/intern/effects.c index fc8a5c62744..017c2ec8ec5 100644 --- a/source/blender/sequencer/intern/effects.c +++ b/source/blender/sequencer/intern/effects.c @@ -3938,6 +3938,14 @@ static ImBuf *do_text_effect(const SeqRenderData *context, proxy_size_comp = SEQ_rendersize_to_scale_factor(context->preview_render_size); } + BLF_disable(font, BLF_ITALIC | BLF_BOLD); + if (data->flag & SEQ_TEXT_BOLD) { + BLF_enable(font, BLF_BOLD); + } + if (data->flag & SEQ_TEXT_ITALIC) { + BLF_enable(font, BLF_ITALIC); + } + /* set before return */ BLF_size(font, proxy_size_comp * data->text_size, 72); |