mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
DirectWrite: Don't include trailing whitespace when calculating text layout in CustomDirectWriteTextRenderer::DrawGlyphRun()
This commit is contained in:
parent
e1366361ed
commit
81534104fb
1 changed files with 5 additions and 0 deletions
|
|
@ -90,6 +90,11 @@ namespace DirectWriteTypeLayout
|
|||
DWRITE_GLYPH_RUN const* glyphRun, DWRITE_GLYPH_RUN_DESCRIPTION const* runDescription,
|
||||
IUnknown* clientDrawingEffect) noexcept override
|
||||
{
|
||||
const String runString (runDescription->string, runDescription->stringLength);
|
||||
|
||||
if (! runString.containsNonWhitespaceChars())
|
||||
return S_OK;
|
||||
|
||||
auto layout = static_cast<TextLayout*> (clientDrawingContext);
|
||||
|
||||
if (! (baselineOriginY >= -1.0e10f && baselineOriginY <= 1.0e10f))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue