[vlc-commits] text_renderer: freetype: fix left alignment offset
Francois Cartegnie
git at videolan.org
Tue Nov 14 18:54:05 CET 2017
vlc | branch: master | Francois Cartegnie <fcvlcdev at free.fr> | Tue Nov 14 13:40:32 2017 +0100| [d25307e48240a97b4cca1fe89894997304429739] | committer: Francois Cartegnie
text_renderer: freetype: fix left alignment offset
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=d25307e48240a97b4cca1fe89894997304429739
---
modules/text_renderer/freetype/freetype.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/modules/text_renderer/freetype/freetype.c b/modules/text_renderer/freetype/freetype.c
index bc55b9bcdd..33f661fa1f 100644
--- a/modules/text_renderer/freetype/freetype.c
+++ b/modules/text_renderer/freetype/freetype.c
@@ -283,6 +283,10 @@ static FT_Vector GetAlignedOffset( const line_desc_t *p_line,
else /* center */
offsets.x = ( i_text_width - p_line->i_width ) / 2;
}
+ else
+ {
+ offsets.x = p_textbbox->xMin - p_line->bbox.xMin;
+ }
return offsets;
}
More information about the vlc-commits
mailing list