diff options
author | CastagnaIT <gottardo.stefano.83@gmail.com> | 2024-05-08 13:07:39 +0200 |
---|---|---|
committer | CastagnaIT <gottardo.stefano.83@gmail.com> | 2024-05-08 13:22:08 +0200 |
commit | 24f73e21d67482f80cc2e350e29b77a1937c02f1 (patch) | |
tree | 5586602dd1749c962a1f0b8f395ab72a9a462931 | |
parent | 4b17fe69fc4b767d8979e7617dedd40675554a7d (diff) | |
download | xbmc-24f73e21d67482f80cc2e350e29b77a1937c02f1.tar.xz |
[GUIFontTTF] Dont take in account max width of 0
maxPixelWidth when 0 means disabled
-rw-r--r-- | xbmc/guilib/GUIFontTTF.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xbmc/guilib/GUIFontTTF.cpp b/xbmc/guilib/GUIFontTTF.cpp index ff11db14f8..8da0252861 100644 --- a/xbmc/guilib/GUIFontTTF.cpp +++ b/xbmc/guilib/GUIFontTTF.cpp @@ -518,7 +518,7 @@ void CGUIFontTTF::DrawTextInternal(CGraphicContext& context, else nextWidth = textWidth + c->m_advance; - if (nextWidth > maxPixelWidth) + if (maxPixelWidth > 0 && nextWidth > maxPixelWidth) { // Start rendering from the glyph that does not exceed the maximum width startPosGlyph = std::distance(itRGlyph, glyphs.crend()); @@ -546,7 +546,7 @@ void CGUIFontTTF::DrawTextInternal(CGraphicContext& context, else nextWidth = textWidth + c->m_advance; - if (nextWidth > maxPixelWidth) + if (maxPixelWidth > 0 && nextWidth > maxPixelWidth) break; textWidth = nextWidth; |