Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
09e36329
Commit
09e36329
authored
Aug 03, 2009
by
Ilkka Ollakka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
freetype: use selected fontfamily to render also subtitles
parent
766a63a8
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
modules/misc/freetype.c
modules/misc/freetype.c
+8
-1
No files found.
modules/misc/freetype.c
View file @
09e36329
...
@@ -267,6 +267,7 @@ struct filter_sys_t
...
@@ -267,6 +267,7 @@ struct filter_sys_t
int
i_default_font_size
;
int
i_default_font_size
;
int
i_display_height
;
int
i_display_height
;
#ifdef HAVE_FONTCONFIG
#ifdef HAVE_FONTCONFIG
char
*
psz_fontfamily
;
bool
b_fontconfig_ok
;
bool
b_fontconfig_ok
;
FcConfig
*
p_fontconfig
;
FcConfig
*
p_fontconfig
;
#endif
#endif
...
@@ -278,7 +279,7 @@ struct filter_sys_t
...
@@ -278,7 +279,7 @@ struct filter_sys_t
};
};
#define UCHAR uint32_t
#define UCHAR uint32_t
#define TR_DEFAULT_FONT
FC_DEFAULT_FONT
#define TR_DEFAULT_FONT
p_sys->psz_fontfamily
#define TR_FONT_STYLE_PTR ft_style_t *
#define TR_FONT_STYLE_PTR ft_style_t *
#include "text_renderer.h"
#include "text_renderer.h"
...
@@ -308,6 +309,9 @@ static int Create( vlc_object_t *p_this )
...
@@ -308,6 +309,9 @@ static int Create( vlc_object_t *p_this )
p_filter
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
filter_sys_t
)
);
p_filter
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
filter_sys_t
)
);
if
(
!
p_sys
)
if
(
!
p_sys
)
return
VLC_ENOMEM
;
return
VLC_ENOMEM
;
#ifdef HAVE_FONTCONFIG
p_sys
->
psz_fontfamily
=
NULL
;
#endif
p_sys
->
p_face
=
0
;
p_sys
->
p_face
=
0
;
p_sys
->
p_library
=
0
;
p_sys
->
p_library
=
0
;
p_sys
->
i_font_size
=
0
;
p_sys
->
i_font_size
=
0
;
...
@@ -376,7 +380,9 @@ static int Create( vlc_object_t *p_this )
...
@@ -376,7 +380,9 @@ static int Create( vlc_object_t *p_this )
if
(
!
psz_fontfile
)
if
(
!
psz_fontfile
)
goto
error
;
goto
error
;
msg_Dbg
(
p_filter
,
"Using %s as font from file %s"
,
psz_fontfamily
,
psz_fontfile
);
msg_Dbg
(
p_filter
,
"Using %s as font from file %s"
,
psz_fontfamily
,
psz_fontfile
);
p_sys
->
psz_fontfamily
=
strdup
(
psz_fontfamily
);
#else
#else
p_sys
->
psz_fontfamily
=
strdup
(
DEFAULT_FONT
)
psz_fontfile
=
psz_fontfamily
;
psz_fontfile
=
psz_fontfamily
;
#endif
#endif
...
@@ -470,6 +476,7 @@ static void Destroy( vlc_object_t *p_this )
...
@@ -470,6 +476,7 @@ static void Destroy( vlc_object_t *p_this )
#ifdef HAVE_FONTCONFIG
#ifdef HAVE_FONTCONFIG
FontBuilderDetach
(
p_filter
,
p_sys
->
p_fontbuilder
);
FontBuilderDetach
(
p_filter
,
p_sys
->
p_fontbuilder
);
free
(
p_sys
->
psz_fontfamily
);
#endif
#endif
/* FcFini asserts calling the subfunction FcCacheFini()
/* FcFini asserts calling the subfunction FcCacheFini()
...
...
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