From a664fdc017e30dc490c013e55f049b72c5096863 Mon Sep 17 00:00:00 2001 From: jcdr428 <56721609+jcdr428@users.noreply.github.com> Date: Fri, 21 Feb 2020 19:23:41 +0200 Subject: [PATCH] Fix garbled subtitles when using Freetype Fixes #190 --- tsMuxer/osdep/textSubtitlesRenderFT.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tsMuxer/osdep/textSubtitlesRenderFT.cpp b/tsMuxer/osdep/textSubtitlesRenderFT.cpp index aba082d1..01d3fb97 100644 --- a/tsMuxer/osdep/textSubtitlesRenderFT.cpp +++ b/tsMuxer/osdep/textSubtitlesRenderFT.cpp @@ -452,7 +452,7 @@ void RenderGlyph(FT_Library& library, wchar_t ch, FT_Face& face, int size, const for (int w = 0; w < s->width; ++w) { int y = imgHeight - 1 - (s->y - rect.ymin) + top; - int x = s->x + w; + int x = s->x + w + left; if (y >= 0 && y < height && x >= 0 && x < width) { Pixel32* dst = (Pixel32*)dstData + y * width + x; @@ -469,7 +469,7 @@ void RenderGlyph(FT_Library& library, wchar_t ch, FT_Face& face, int size, const for (int w = 0; w < s->width; ++w) { int y = imgHeight - 1 - (s->y - rect.ymin) + top; - int x = s->x + w; + int x = s->x + w + left; if (y >= 0 && y < height && x >= 0 && x < width) { Pixel32* dst = (Pixel32*)dstData + y * width + x; @@ -484,7 +484,7 @@ void RenderGlyph(FT_Library& library, wchar_t ch, FT_Face& face, int size, const for (int w = 0; w < s->width; ++w) { int y = imgHeight - 1 - (s->y - rect.ymin) + top; - int x = s->x + w; + int x = s->x + w + left; if (y >= 0 && y < height && x >= 0 && x < width) {