mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
CoreGraphics: Fix incorrect behaviour of non-solid-colour text fills
Previously, filling a string containing a space or other non-rendered character with a gradient would end up filling the entire clip region. The correct behaviour is to completely skip filling any empty paths.
This commit is contained in:
parent
5737c42ccf
commit
01bfa98827
1 changed files with 4 additions and 0 deletions
|
|
@ -867,6 +867,10 @@ void CoreGraphicsContext::drawGlyphs (Span<const uint16_t> glyphs,
|
|||
Path p;
|
||||
auto& f = state->font;
|
||||
f.getTypefacePtr()->getOutlineForGlyph (f.getMetricsKind(), glyph, p);
|
||||
|
||||
if (p.isEmpty())
|
||||
continue;
|
||||
|
||||
const auto scale = f.getHeight();
|
||||
fillPath (p, AffineTransform::scale (scale * f.getHorizontalScale(), scale).translated (positions[index]).followedBy (transform));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue