Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
b7167cb3
Commit
b7167cb3
authored
Aug 05, 2015
by
Francois Cartegnie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
text_style: use monospace flag instead of boolean
parent
cb2293a5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
include/vlc_text_style.h
include/vlc_text_style.h
+2
-2
modules/codec/cc.c
modules/codec/cc.c
+2
-2
modules/text_renderer/freetype.c
modules/text_renderer/freetype.c
+2
-1
src/misc/text_style.c
src/misc/text_style.c
+0
-1
No files found.
include/vlc_text_style.h
View file @
b7167cb3
...
...
@@ -49,9 +49,8 @@ typedef struct
uint8_t
i_font_alpha
;
/**< The transparency of the text.
0x00 is fully opaque,
0xFF fully transparent */
int
i_style_flags
;
/**< Formatting style flags */
uint16_t
i_style_flags
;
/**< Formatting style flags */
int
i_spacing
;
/**< The spaceing between glyphs in pixels */
bool
b_monospaced
;
/**< If font should be default monospaced font */
/* Outline */
int
i_outline_color
;
/**< The color of the outline 0xRRGGBB */
...
...
@@ -87,6 +86,7 @@ typedef struct
#define STYLE_UNDERLINE 32
#define STYLE_STRIKEOUT 64
#define STYLE_HALFWIDTH 128
#define STYLE_MONOSPACED 256
#define STYLE_DEFAULT_FONT_SIZE 22
...
...
modules/codec/cc.c
View file @
b7167cb3
...
...
@@ -942,7 +942,7 @@ static text_segment_t * Eia608TextLine( struct eia608_screen *screen, int i_row,
return
NULL
;
}
/* Ensure we get a monospaced font (required for accurate positioning */
p_segment
->
style
->
b_monospaced
=
true
;
p_segment
->
style
->
i_style_flags
|=
STYLE_MONOSPACED
;
/* Search the start */
i_start
=
0
;
...
...
@@ -983,7 +983,7 @@ static text_segment_t * Eia608TextLine( struct eia608_screen *screen, int i_row,
text_segment_Delete
(
p_segment
);
return
p_segments_head
;
}
p_segment
->
style
->
b_monospaced
=
true
;
p_segment
->
style
->
i_style_flags
|=
STYLE_MONOSPACED
;
/* start segment with new style */
if
(
font
&
EIA608_FONT_ITALICS
)
...
...
modules/text_renderer/freetype.c
View file @
b7167cb3
...
...
@@ -1368,7 +1368,8 @@ FT_Face LoadFace( filter_t *p_filter,
&&
!
(
(
p_cache
->
p_styles
[
i
].
i_style_flags
^
p_style
->
i_style_flags
)
&
STYLE_HALFWIDTH
)
)
return
p_cache
->
p_faces
[
i
];
const
char
*
psz_fontname
=
(
p_style
->
b_monospaced
)
?
p_style
->
psz_monofontname
:
p_style
->
psz_fontname
;
const
char
*
psz_fontname
=
(
p_style
->
i_style_flags
&
STYLE_MONOSPACED
)
?
p_style
->
psz_monofontname
:
p_style
->
psz_fontname
;
/* Look for a match amongst our attachments first */
FT_Face
p_face
=
LoadEmbeddedFace
(
p_sys
,
psz_fontname
,
p_style
);
...
...
src/misc/text_style.c
View file @
b7167cb3
...
...
@@ -53,7 +53,6 @@ text_style_t *text_style_New( void )
p_style
->
i_outline_width
=
1
;
p_style
->
i_shadow_width
=
0
;
p_style
->
i_spacing
=
-
1
;
p_style
->
b_monospaced
=
false
;
return
p_style
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment