Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Stefan Westerfeld
ffmpeg
Commits
aeff5bcb
Commit
aeff5bcb
authored
Sep 07, 2023
by
yethie
Committed by
Paul B Mahol
Sep 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_drawtext: fix text width measurement
parent
da784b81
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
3 deletions
+11
-3
vf_drawtext.c
libavfilter/vf_drawtext.c
+11
-3
No files found.
libavfilter/vf_drawtext.c
View file @
aeff5bcb
...
...
@@ -1757,9 +1757,17 @@ continue_on_failed2:
first_min_x64
=
FFMIN
(
glyph
->
bbox
.
xMin
,
first_min_x64
);
}
if
(
t
==
hb
->
glyph_count
-
1
)
{
w64
+=
glyph
->
bbox
.
xMax
;
last_max_x64
=
FFMAX
(
glyph
->
bbox
.
xMax
,
last_max_x64
);
cur_line
->
offset_right64
=
glyph
->
bbox
.
xMax
;
// The following code measures the width of the line up to the last
// character's horizontal advance
int
last_char_width
=
hb
->
glyph_pos
[
t
].
x_advance
;
// The following code measures the width of the line up to the rightmost
// visible pixel of the last character
// int last_char_width = glyph->bbox.xMax;
w64
+=
last_char_width
;
last_max_x64
=
FFMAX
(
last_char_width
,
last_max_x64
);
cur_line
->
offset_right64
=
last_char_width
;
}
else
{
if
(
is_tab
)
{
int
size
=
s
->
blank_advance64
*
s
->
tabsize
;
...
...
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