From 82080f9372ab2c22a399bd97988d465896bfad9a Mon Sep 17 00:00:00 2001 From: attila Date: Tue, 15 Oct 2024 14:45:45 +0200 Subject: [PATCH] ShapedText: Apply the horizontal scaling to the extra kerning This fixes an undesired behaviour where squashing the text using GlyphArrangement::addFittedText would only squash the visible glyphs but not the additional kerning space between them. --- modules/juce_graphics/fonts/juce_SimpleShapedText.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_graphics/fonts/juce_SimpleShapedText.cpp b/modules/juce_graphics/fonts/juce_SimpleShapedText.cpp index d4d8ea3be8..51bd2a8208 100644 --- a/modules/juce_graphics/fonts/juce_SimpleShapedText.cpp +++ b/modules/juce_graphics/fonts/juce_SimpleShapedText.cpp @@ -497,7 +497,7 @@ static std::vector lowLevelShape (const String& string, jassert (unknownGlyph == infos.end()); [[maybe_unused]] const auto trackingAmount = ! trackingIsDefault - ? font.getHeight() * tracking + ? font.getHeight() * font.getHorizontalScale() * tracking : 0; std::vector clusterLookup;