Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
25b52afe
Commit
25b52afe
authored
Jul 27, 2009
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
freetype.c: use var_CreateGet for variables
parent
13b524c5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
20 deletions
+8
-20
modules/misc/freetype.c
modules/misc/freetype.c
+8
-20
No files found.
modules/misc/freetype.c
View file @
25b52afe
...
@@ -301,7 +301,6 @@ static int Create( vlc_object_t *p_this )
...
@@ -301,7 +301,6 @@ static int Create( vlc_object_t *p_this )
FcResult
fontresult
;
FcResult
fontresult
;
#endif
#endif
vlc_value_t
val
;
/* Allocate structure */
/* Allocate structure */
p_filter
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
filter_sys_t
)
);
p_filter
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
filter_sys_t
)
);
...
@@ -312,29 +311,18 @@ static int Create( vlc_object_t *p_this )
...
@@ -312,29 +311,18 @@ static int Create( vlc_object_t *p_this )
p_sys
->
i_font_size
=
0
;
p_sys
->
i_font_size
=
0
;
p_sys
->
i_display_height
=
0
;
p_sys
->
i_display_height
=
0
;
var_Create
(
p_filter
,
"freetype-font"
,
VLC_VAR_STRING
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_filter
,
"freetype-fontsize"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_filter
,
"freetype-rel-fontsize"
,
var_Create
(
p_filter
,
"freetype-rel-fontsize"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
var_Create
(
p_filter
,
"freetype-opacity"
,
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
psz_fontfamily
=
var_CreateGetString
(
p_filter
,
"freetype-font"
);
var_Create
(
p_filter
,
"freetype-effect"
,
p_sys
->
i_default_font_size
=
var_CreateGetInteger
(
p_filter
,
"freetype-fontsize"
);
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
p_sys
->
i_effect
=
var_CreateGetInteger
(
p_filter
,
"freetype-effect"
);
var_Get
(
p_filter
,
"freetype-opacity"
,
&
val
);
p_sys
->
i_font_opacity
=
var_CreateGetInteger
(
p_filter
,
"freetype-opacity"
);
p_sys
->
i_font_opacity
=
__MAX
(
__MIN
(
val
.
i_int
,
255
),
0
);
p_sys
->
i_font_opacity
=
__MAX
(
__MIN
(
p_sys
->
i_font_opacity
,
255
),
0
);
var_Create
(
p_filter
,
"freetype-color"
,
p_sys
->
i_font_color
=
var_CreateGetInteger
(
p_filter
,
"freetype-color"
);
VLC_VAR_INTEGER
|
VLC_VAR_DOINHERIT
);
p_sys
->
i_font_color
=
__MAX
(
__MIN
(
p_sys
->
i_font_color
,
0xFFFFFF
),
0
);
var_Get
(
p_filter
,
"freetype-color"
,
&
val
);
p_sys
->
i_font_color
=
__MAX
(
__MIN
(
val
.
i_int
,
0xFFFFFF
),
0
);
p_sys
->
i_effect
=
var_GetInteger
(
p_filter
,
"freetype-effect"
);
var_Get
(
p_filter
,
"freetype-fontsize"
,
&
val
);
p_sys
->
i_default_font_size
=
val
.
i_int
;
fontindex
=
0
;
fontindex
=
0
;
var_Get
(
p_filter
,
"freetype-font"
,
&
val
);
psz_fontfamily
=
val
.
psz_string
;
if
(
!
psz_fontfamily
||
!*
psz_fontfamily
)
if
(
!
psz_fontfamily
||
!*
psz_fontfamily
)
{
{
#ifdef HAVE_FONTCONFIG
#ifdef HAVE_FONTCONFIG
...
...
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