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
0891ac62
Commit
0891ac62
authored
Nov 01, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Freetype: fallback to arial.ttf on Win32
When we haven't found the right font, use arial.ttf Close #4946
parent
4e27ee7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
17 deletions
+25
-17
modules/text_renderer/freetype.c
modules/text_renderer/freetype.c
+25
-17
No files found.
modules/text_renderer/freetype.c
View file @
0891ac62
...
...
@@ -592,7 +592,6 @@ static char* Win32_Select( filter_t *p_filter, const char* family,
bool
b_bold
,
bool
b_italic
,
int
i_size
,
int
*
i_idx
)
{
VLC_UNUSED
(
i_size
);
// msg_Dbg( p_filter, "Here in Win32_Select, asking for %s", family );
/* */
LOGFONT
lf
;
...
...
@@ -609,30 +608,39 @@ static char* Win32_Select( filter_t *p_filter, const char* family,
EnumFontFamiliesEx
(
hDC
,
&
lf
,
(
FONTENUMPROC
)
&
EnumFontCallback
,
(
LPARAM
)
&
psz_filename
,
0
);
ReleaseDC
(
NULL
,
hDC
);
if
(
psz_filename
==
NULL
)
return
NULL
;
/* FIXME: increase i_idx, when concatenated strings */
i_idx
=
0
;
/* */
if
(
strchr
(
psz_filename
,
DIR_SEP_CHAR
)
)
return
psz_filename
;
else
if
(
psz_filename
!=
NULL
)
{
char
*
psz_tmp
;
if
(
asprintf
(
&
psz_tmp
,
"%s
\\
%s"
,
p_filter
->
p_sys
->
psz_win_fonts_path
,
psz_filename
)
==
-
1
)
/* FIXME: increase i_idx, when concatenated strings */
i_idx
=
0
;
/* Prepend the Windows Font path, when only a filename was provided */
if
(
strchr
(
psz_filename
,
DIR_SEP_CHAR
)
)
return
psz_filename
;
else
{
char
*
psz_tmp
;
if
(
asprintf
(
&
psz_tmp
,
"%s
\\
%s"
,
p_filter
->
p_sys
->
psz_win_fonts_path
,
psz_filename
)
==
-
1
)
{
free
(
psz_filename
);
return
NULL
;
}
free
(
psz_filename
);
return
NULL
;
return
psz_tmp
;
}
free
(
psz_filename
);
return
psz_tmp
;
}
else
/* Let's take any font we can */
{
char
*
psz_tmp
;
if
(
asprintf
(
&
psz_tmp
,
"%s
\\
%s"
,
p_filter
->
p_sys
->
psz_win_fonts_path
,
"arial.ttf"
)
==
-
1
)
return
NULL
;
else
return
psz_tmp
;
}
}
#endif
#endif
/* HAVE_WIN32 */
#endif
#endif
/* HAVE_STYLES */
/*****************************************************************************
...
...
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