24#ifndef VLC_TEXT_STYLE_H
25#define VLC_TEXT_STYLE_H 1
42 char * psz_monofontname;
45 uint16_t i_style_flags;
57 uint8_t i_outline_alpha;
62 uint8_t i_shadow_alpha;
66 int i_background_color;
67 uint8_t i_background_alpha;
72 STYLE_WRAP_DEFAULT = 0,
78#define STYLE_ALPHA_OPAQUE 0xFF
79#define STYLE_ALPHA_TRANSPARENT 0x00
82#define STYLE_NO_DEFAULTS 0x0
83#define STYLE_FULLY_SET 0xFFFF
84#define STYLE_HAS_FONT_COLOR (1 << 0)
85#define STYLE_HAS_FONT_ALPHA (1 << 1)
86#define STYLE_HAS_FLAGS (1 << 2)
87#define STYLE_HAS_OUTLINE_COLOR (1 << 3)
88#define STYLE_HAS_OUTLINE_ALPHA (1 << 4)
89#define STYLE_HAS_SHADOW_COLOR (1 << 5)
90#define STYLE_HAS_SHADOW_ALPHA (1 << 6)
91#define STYLE_HAS_BACKGROUND_COLOR (1 << 7)
92#define STYLE_HAS_BACKGROUND_ALPHA (1 << 8)
93#define STYLE_HAS_WRAP_INFO (1 << 9)
96#define STYLE_BOLD (1 << 0)
97#define STYLE_ITALIC (1 << 1)
98#define STYLE_OUTLINE (1 << 2)
99#define STYLE_SHADOW (1 << 3)
100#define STYLE_BACKGROUND (1 << 4)
101#define STYLE_UNDERLINE (1 << 5)
102#define STYLE_STRIKEOUT (1 << 6)
103#define STYLE_HALFWIDTH (1 << 7)
104#define STYLE_MONOSPACED (1 << 8)
105#define STYLE_DOUBLEWIDTH (1 << 9)
106#define STYLE_BLINK_FOREGROUND (1 << 10)
107#define STYLE_BLINK_BACKGROUND (1 << 11)
109#define STYLE_DEFAULT_FONT_SIZE 20
110#define STYLE_DEFAULT_REL_FONT_SIZE 6.25
231 const char *psz_rt );
#define VLC_API
Definition: fourcc_gen.c:31
Text segment ruby for subtitles Each ruby has an anchor to the segment char.
Definition: vlc_text_style.h:122
char * psz_base
Definition: vlc_text_style.h:123
text_segment_ruby_t * p_next
Definition: vlc_text_style.h:125
char * psz_rt
Definition: vlc_text_style.h:124
Text segment for subtitles.
Definition: vlc_text_style.h:140
text_segment_ruby_t * p_ruby
ruby descriptions
Definition: vlc_text_style.h:144
text_segment_t * p_next
next segment
Definition: vlc_text_style.h:143
char * psz_text
text string of the segment
Definition: vlc_text_style.h:141
text_style_t * style
style applied to this segment
Definition: vlc_text_style.h:142
Text style.
Definition: vlc_text_style.h:40
@ STYLE_WRAP_CHAR
Breaks at character level only.
Definition: vlc_text_style.h:74
@ STYLE_WRAP_NONE
No line breaks (except explicit ones)
Definition: vlc_text_style.h:75
uint8_t i_outline_alpha
The transparency of the outline.
Definition: vlc_text_style.h:58
uint16_t i_features
Feature flags (means non default)
Definition: vlc_text_style.h:45
int i_spacing
The spaceing between glyphs in pixels.
Definition: vlc_text_style.h:54
int i_outline_color
The color of the outline 0xRRGGBB.
Definition: vlc_text_style.h:57
int i_shadow_color
The color of the shadow 0xRRGGBB.
Definition: vlc_text_style.h:62
uint16_t i_style_flags
Formatting style flags.
Definition: vlc_text_style.h:46
int i_font_color
The color of the text 0xRRGGBB (native endianness)
Definition: vlc_text_style.h:51
uint8_t i_shadow_alpha
The transparency of the shadow.
Definition: vlc_text_style.h:63
char * psz_fontname
The name of the font.
Definition: vlc_text_style.h:42
int i_outline_width
The width of the outline in pixels.
Definition: vlc_text_style.h:59
float f_font_relsize
The font size in video height %.
Definition: vlc_text_style.h:49
int i_shadow_width
The width of the shadow in pixels.
Definition: vlc_text_style.h:64
char * psz_monofontname
The name of the mono font.
Definition: vlc_text_style.h:43
int i_font_size
The font size in pixels.
Definition: vlc_text_style.h:50
uint8_t i_background_alpha
The transparency of the background.
Definition: vlc_text_style.h:68
int i_background_color
The color of the background 0xRRGGBB.
Definition: vlc_text_style.h:67
uint8_t i_font_alpha
The transparency of the text.
Definition: vlc_text_style.h:53
This file is a collection of common definitions and types.
text_style_t * text_style_New(void)
Create a default text style.
Definition: text_style.c:208
text_style_t * text_style_Duplicate(const text_style_t *)
Duplicate a text style.
Definition: text_style.c:309
text_style_t * text_style_Create(int)
Create a text style.
Definition: text_style.c:213
text_segment_t * text_segment_New(const char *)
This function will create a new text segment.
Definition: text_style.c:372
text_segment_t * text_segment_Copy(text_segment_t *)
This function will copy a text_segment and its chain into a new one.
Definition: text_style.c:444
void text_style_Delete(text_style_t *)
Delete a text style created by text_style_New or text_style_Duplicate.
Definition: text_style.c:320
void text_segment_Delete(text_segment_t *)
Delete a text segment and its content.
Definition: text_style.c:421
text_segment_ruby_t * text_segment_ruby_New(const char *psz_base, const char *psz_rt)
This function will create a ruby section for a text_segment.
Definition: text_style.c:341
void text_segment_ChainDelete(text_segment_t *)
This function will destroy a list of text segments allocated by text_segment_New.
Definition: text_style.c:432
text_segment_t * text_segment_FromRuby(text_segment_ruby_t *p_ruby)
This function creates a text segment from a ruby section, and creates fallback string.
Definition: text_style.c:400
text_style_t * text_style_Copy(text_style_t *, const text_style_t *)
Copy a text style into another.
Definition: text_style.c:245
unsigned int vlc_html_color(const char *psz_value, bool *ok)
Returns an integer representation of an HTML color.
Definition: text_style.c:473
void text_segment_ruby_ChainDelete(text_segment_ruby_t *p_ruby)
Deletes a ruby sections chain.
Definition: text_style.c:329
text_segment_t * text_segment_NewInheritStyle(const text_style_t *p_style)
This function will create a new text segment and duplicates the style passed as argument.
Definition: text_style.c:384
void text_style_Merge(text_style_t *, const text_style_t *, bool b_override)
Merge two styles using non default values.
Definition: text_style.c:270
char psz_value[8]
Definition: vout_intf.c:99