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
c5bf6ea1
Commit
c5bf6ea1
authored
Apr 27, 2010
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FreeType: simplify and let the p_dialog the shortest time possible.
People on mac should really check this on their machine
parent
51f7b23e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
25 deletions
+13
-25
modules/misc/freetype.c
modules/misc/freetype.c
+13
-25
No files found.
modules/misc/freetype.c
View file @
c5bf6ea1
...
@@ -346,12 +346,6 @@ static int Create( vlc_object_t *p_this )
...
@@ -346,12 +346,6 @@ static int Create( vlc_object_t *p_this )
}
}
#ifdef HAVE_FONTCONFIG
#ifdef HAVE_FONTCONFIG
/* Lets find some fontfile from freetype-font variable family */
char
*
psz_fontsize
;
if
(
asprintf
(
&
psz_fontsize
,
"%d"
,
p_sys
->
i_default_font_size
)
==
-
1
)
goto
error
;
msg_Dbg
(
p_filter
,
"Building font databases."
);
msg_Dbg
(
p_filter
,
"Building font databases."
);
mtime_t
t1
,
t2
;
mtime_t
t1
,
t2
;
t1
=
mdate
();
t1
=
mdate
();
...
@@ -367,11 +361,23 @@ static int Create( vlc_object_t *p_this )
...
@@ -367,11 +361,23 @@ static int Create( vlc_object_t *p_this )
if
(
p_dialog
)
if
(
p_dialog
)
dialog_ProgressSet
(
p_dialog
,
NULL
,
0
.
5
);
dialog_ProgressSet
(
p_dialog
,
NULL
,
0
.
5
);
#endif
FcConfigBuildFonts
(
fcConfig
);
FcConfigBuildFonts
(
fcConfig
);
t2
=
mdate
();
t2
=
mdate
();
msg_Dbg
(
p_filter
,
"Took %ld microseconds"
,
(
long
)((
t2
-
t1
))
);
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
)
goto
error
;
fontpattern
=
FcPatternCreate
();
fontpattern
=
FcPatternCreate
();
if
(
!
fontpattern
)
if
(
!
fontpattern
)
{
{
...
@@ -379,10 +385,6 @@ static int Create( vlc_object_t *p_this )
...
@@ -379,10 +385,6 @@ static int Create( vlc_object_t *p_this )
goto
error
;
goto
error
;
}
}
#ifdef WIN32
if
(
p_dialog
)
dialog_ProgressSet
(
p_dialog
,
NULL
,
0
.
7
);
#endif
FcPatternAddString
(
fontpattern
,
FC_FAMILY
,
psz_fontfamily
);
FcPatternAddString
(
fontpattern
,
FC_FAMILY
,
psz_fontfamily
);
FcPatternAddString
(
fontpattern
,
FC_SIZE
,
psz_fontsize
);
FcPatternAddString
(
fontpattern
,
FC_SIZE
,
psz_fontsize
);
free
(
psz_fontsize
);
free
(
psz_fontsize
);
...
@@ -394,10 +396,6 @@ static int Create( vlc_object_t *p_this )
...
@@ -394,10 +396,6 @@ static int Create( vlc_object_t *p_this )
}
}
FcDefaultSubstitute
(
fontpattern
);
FcDefaultSubstitute
(
fontpattern
);
#ifdef WIN32
if
(
p_dialog
)
dialog_ProgressSet
(
p_dialog
,
NULL
,
0
.
8
);
#endif
/* testing fontresult here doesn't do any good really, but maybe it will
/* testing fontresult here doesn't do any good really, but maybe it will
* in future as fontconfig code doesn't set it in all cases and just
* in future as fontconfig code doesn't set it in all cases and just
* returns NULL or doesn't set to to Match on all Match cases.*/
* returns NULL or doesn't set to to Match on all Match cases.*/
...
@@ -419,21 +417,11 @@ static int Create( vlc_object_t *p_this )
...
@@ -419,21 +417,11 @@ static int Create( vlc_object_t *p_this )
msg_Dbg
(
p_filter
,
"Using %s as font from file %s"
,
psz_fontfamily
,
msg_Dbg
(
p_filter
,
"Using %s as font from file %s"
,
psz_fontfamily
,
psz_fontfile
?
psz_fontfile
:
"(null)"
);
psz_fontfile
?
psz_fontfile
:
"(null)"
);
p_sys
->
psz_fontfamily
=
strdup
(
psz_fontfamily
);
p_sys
->
psz_fontfamily
=
strdup
(
psz_fontfamily
);
# ifdef WIN32
if
(
p_dialog
)
{
dialog_ProgressSet
(
p_dialog
,
NULL
,
1
.
0
);
dialog_ProgressDestroy
(
p_dialog
);
p_dialog
=
NULL
;
}
# endif
#else
#else
#ifdef HAVE_FONTCONFIG
p_sys
->
psz_fontfamily
=
strdup
(
DEFAULT_FONT
);
p_sys
->
psz_fontfamily
=
strdup
(
DEFAULT_FONT
);
psz_fontfile
=
psz_fontfamily
;
psz_fontfile
=
psz_fontfamily
;
#endif
#endif
#endif
...
...
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