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
8ea8e3aa
Commit
8ea8e3aa
authored
Mar 23, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Freetype renderer: cosmetics
parent
d610defd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
25 deletions
+28
-25
modules/misc/freetype.c
modules/misc/freetype.c
+28
-25
No files found.
modules/misc/freetype.c
View file @
8ea8e3aa
...
...
@@ -283,7 +283,6 @@ struct filter_sys_t
input_attachment_t
**
pp_font_attachments
;
int
i_font_attachments
;
};
#define UCHAR uint32_t
...
...
@@ -301,14 +300,15 @@ static int Create( vlc_object_t *p_this )
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
;
char
*
psz_fontfile
=
NULL
;
char
*
psz_fontfamily
=
NULL
;
int
i_error
,
fontindex
;
char
*
psz_fontfile
=
NULL
;
char
*
psz_fontfamily
=
NULL
;
int
i_error
,
fontindex
;
/* Allocate structure */
p_filter
->
p_sys
=
p_sys
=
malloc
(
sizeof
(
filter_sys_t
)
);
if
(
!
p_sys
)
return
VLC_ENOMEM
;
#ifdef HAVE_STYLES
p_sys
->
psz_fontfamily
=
NULL
;
p_sys
->
p_xml
=
NULL
;
...
...
@@ -329,7 +329,7 @@ static int Create( vlc_object_t *p_this )
p_sys
->
i_font_color
=
var_InheritInteger
(
p_filter
,
"freetype-color"
);
p_sys
->
i_font_color
=
__MAX
(
__MIN
(
p_sys
->
i_font_color
,
0xFFFFFF
),
0
);
fontindex
=
0
;
/* Set default psz_fontfamily */
if
(
!
psz_fontfamily
||
!*
psz_fontfamily
)
{
free
(
psz_fontfamily
);
...
...
@@ -340,7 +340,7 @@ static int Create( vlc_object_t *p_this )
if
(
!
psz_fontfamily
)
goto
error
;
# ifdef WIN32
GetWindowsDirectory
(
psz_fontfamily
,
PATH_MAX
+
1
);
GetWindowsDirectory
(
psz_fontfamily
,
PATH_MAX
+
1
);
strcat
(
psz_fontfamily
,
"
\\
fonts
\\
arial.ttf"
);
# else
strcpy
(
psz_fontfamily
,
DEFAULT_FONT
);
...
...
@@ -349,6 +349,8 @@ static int Create( vlc_object_t *p_this )
#endif
}
/* Set the font file */
fontindex
=
0
;
#ifdef HAVE_FONTCONFIG
if
(
FontConfig_FindFont
(
p_filter
,
psz_fontfamily
,
&
psz_fontfile
,
&
fontindex
)
!=
VLC_SUCCESS
)
...
...
@@ -357,6 +359,7 @@ static int Create( vlc_object_t *p_this )
psz_fontfile
=
psz_fontfamily
;
#endif
/* */
i_error
=
FT_Init_FreeType
(
&
p_sys
->
p_library
);
if
(
i_error
)
{
...
...
@@ -2138,7 +2141,7 @@ static int RenderHtml( filter_t *p_filter, subpicture_region_t *p_region_out,
uint32_t
*
pi_k_run_lengths
=
NULL
;
uint32_t
*
pi_k_durations
=
NULL
;
ft_style_t
**
pp_styles
=
NULL
;
FT_Vector
result
;
FT_Vector
result
=
{
0
,
0
}
;
line_desc_t
*
p_lines
=
NULL
;
psz_text
=
(
uint32_t
*
)
malloc
(
strlen
(
p_region_in
->
psz_html
)
*
...
...
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