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
3b396a3d
Commit
3b396a3d
authored
Aug 14, 2007
by
Bernie Purcell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Corrections to scaling logic in previous commit
parent
1afe5120
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
31 deletions
+37
-31
modules/misc/freetype.c
modules/misc/freetype.c
+37
-31
No files found.
modules/misc/freetype.c
View file @
3b396a3d
...
@@ -98,6 +98,7 @@ static char *FontConfig_Select( FcConfig *, const char *,
...
@@ -98,6 +98,7 @@ static char *FontConfig_Select( FcConfig *, const char *,
#endif
#endif
static
line_desc_t
*
NewLine
(
int
);
static
line_desc_t
*
NewLine
(
int
);
static
int
GetFontSize
(
filter_t
*
p_filter
);
static
int
SetFontSize
(
filter_t
*
,
int
);
static
int
SetFontSize
(
filter_t
*
,
int
);
static
void
YUVFromRGB
(
uint32_t
i_argb
,
static
void
YUVFromRGB
(
uint32_t
i_argb
,
uint8_t
*
pi_y
,
uint8_t
*
pi_u
,
uint8_t
*
pi_v
);
uint8_t
*
pi_y
,
uint8_t
*
pi_u
,
uint8_t
*
pi_v
);
...
@@ -1903,7 +1904,7 @@ static int ProcessNodes( filter_t *p_filter,
...
@@ -1903,7 +1904,7 @@ static int ProcessNodes( filter_t *p_filter,
{
{
rv
=
PushFont
(
&
p_fonts
,
rv
=
PushFont
(
&
p_fonts
,
FC_DEFAULT_FONT
,
FC_DEFAULT_FONT
,
p_sys
->
i_font_size
*
i_scale
/
1000
,
p_sys
->
i_font_size
,
0x00ffffff
,
0x00ffffff
,
0x00ffffff
);
0x00ffffff
);
}
}
...
@@ -2483,6 +2484,9 @@ static int RenderHtml( filter_t *p_filter, subpicture_region_t *p_region_out,
...
@@ -2483,6 +2484,9 @@ static int RenderHtml( filter_t *p_filter, subpicture_region_t *p_region_out,
if
(
!
p_region_in
||
!
p_region_in
->
psz_html
)
if
(
!
p_region_in
||
!
p_region_in
->
psz_html
)
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
/* Reset the default fontsize in case screen metrics have changed */
p_filter
->
p_sys
->
i_font_size
=
GetFontSize
(
p_filter
);
p_sub
=
stream_MemoryNew
(
VLC_OBJECT
(
p_filter
),
p_sub
=
stream_MemoryNew
(
VLC_OBJECT
(
p_filter
),
(
uint8_t
*
)
p_region_in
->
psz_html
,
(
uint8_t
*
)
p_region_in
->
psz_html
,
strlen
(
p_region_in
->
psz_html
),
strlen
(
p_region_in
->
psz_html
),
...
@@ -2731,19 +2735,11 @@ static line_desc_t *NewLine( int i_count )
...
@@ -2731,19 +2735,11 @@ static line_desc_t *NewLine( int i_count )
return
p_line
;
return
p_line
;
}
}
static
int
SetFontSize
(
filter_t
*
p_filter
,
int
i_size
)
static
int
GetFontSize
(
filter_t
*
p_filter
)
{
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
if
(
i_size
&&
i_size
==
p_sys
->
i_font_size
)
return
VLC_SUCCESS
;
if
(
!
i_size
)
{
vlc_value_t
val
;
vlc_value_t
val
;
int
i_size
=
0
;
if
(
!
p_sys
->
i_default_font_size
&&
p_sys
->
i_display_height
==
(
int
)
p_filter
->
fmt_out
.
video
.
i_height
)
return
VLC_SUCCESS
;
if
(
p_sys
->
i_default_font_size
)
if
(
p_sys
->
i_default_font_size
)
{
{
...
@@ -2767,6 +2763,16 @@ static int SetFontSize( filter_t *p_filter, int i_size )
...
@@ -2767,6 +2763,16 @@ static int SetFontSize( filter_t *p_filter, int i_size )
else
else
i_size
=
12
;
i_size
=
12
;
}
}
return
i_size
;
}
static
int
SetFontSize
(
filter_t
*
p_filter
,
int
i_size
)
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
if
(
!
i_size
)
{
i_size
=
GetFontSize
(
p_filter
);
msg_Dbg
(
p_filter
,
"using fontsize: %i"
,
i_size
);
msg_Dbg
(
p_filter
,
"using fontsize: %i"
,
i_size
);
}
}
...
...
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