Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
4a923ecc
Commit
4a923ecc
authored
Jun 03, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Freetype: split the fontcache building in a separate function
parent
165cd46a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
31 deletions
+34
-31
modules/misc/freetype.c
modules/misc/freetype.c
+34
-31
No files found.
modules/misc/freetype.c
View file @
4a923ecc
...
...
@@ -195,6 +195,7 @@ static int RenderHtml( filter_t *, subpicture_region_t *,
subpicture_region_t
*
);
#endif
#if HAVE_FONTCONFIG
static
void
FontConfig_BuildCache
(
filter_t
*
p_filter
);
static
char
*
FontConfig_Select
(
FcConfig
*
,
const
char
*
,
bool
,
bool
,
int
*
);
#endif
...
...
@@ -351,33 +352,8 @@ static int Create( vlc_object_t *p_this )
}
#ifdef HAVE_FONTCONFIG
msg_Dbg
(
p_filter
,
"Building font databases."
);
mtime_t
t1
,
t2
;
t1
=
mdate
();
#ifdef WIN32
dialog_progress_bar_t
*
p_dialog
=
NULL
;
FcConfig
*
fcConfig
=
FcInitLoadConfig
();
p_dialog
=
dialog_ProgressCreate
(
p_filter
,
_
(
"Building font cache"
),
_
(
"Please wait while your font cache is rebuilt.
\n
"
"This should take less than a few minutes."
),
NULL
);
FontConfig_BuildCache
(
p_filter
);
/* if( p_dialog )
dialog_ProgressSet( p_dialog, NULL, 0.5 ); */
FcConfigBuildFonts
(
fcConfig
);
t2
=
mdate
();
msg_Dbg
(
p_filter
,
"Took %ld microseconds"
,
(
long
)((
t2
-
t1
))
);
if
(
p_dialog
)
{
// dialog_ProgressSet( p_dialog, NULL, 1.0 );
dialog_ProgressDestroy
(
p_dialog
);
p_dialog
=
NULL
;
}
#endif
/* Lets find some fontfile from freetype-font variable family */
char
*
psz_fontsize
;
if
(
asprintf
(
&
psz_fontsize
,
"%d"
,
p_sys
->
i_default_font_size
)
==
-
1
)
...
...
@@ -487,11 +463,6 @@ error:
#ifdef HAVE_FONTCONFIG
if
(
fontmatch
)
FcPatternDestroy
(
fontmatch
);
if
(
fontpattern
)
FcPatternDestroy
(
fontpattern
);
#ifdef WIN32
if
(
p_dialog
)
dialog_ProgressDestroy
(
p_dialog
);
#endif
#endif
if
(
p_sys
->
p_face
)
FT_Done_Face
(
p_sys
->
p_face
);
...
...
@@ -2341,7 +2312,39 @@ static int RenderHtml( filter_t *p_filter, subpicture_region_t *p_region_out,
return
rv
;
}
#ifdef HAVE_FONTCONFIG
static
void
FontConfig_BuildCache
(
filter_t
*
p_filter
)
{
/* */
msg_Dbg
(
p_filter
,
"Building font databases."
);
mtime_t
t1
,
t2
;
t1
=
mdate
();
#ifdef WIN32
dialog_progress_bar_t
*
p_dialog
=
NULL
;
FcConfig
*
fcConfig
=
FcInitLoadConfig
();
p_dialog
=
dialog_ProgressCreate
(
p_filter
,
_
(
"Building font cache"
),
_
(
"Please wait while your font cache is rebuilt.
\n
"
"This should take less than a few minutes."
),
NULL
);
/* if( p_dialog )
dialog_ProgressSet( p_dialog, NULL, 0.5 ); */
FcConfigBuildFonts
(
fcConfig
);
if
(
p_dialog
)
{
// dialog_ProgressSet( p_dialog, NULL, 1.0 );
dialog_ProgressDestroy
(
p_dialog
);
p_dialog
=
NULL
;
}
#endif
t2
=
mdate
();
msg_Dbg
(
p_filter
,
"Took %ld microseconds"
,
(
long
)((
t2
-
t1
))
);
}
static
char
*
FontConfig_Select
(
FcConfig
*
priv
,
const
char
*
family
,
bool
b_bold
,
bool
b_italic
,
int
*
i_idx
)
{
...
...
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