mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-21 01:24:21 +00:00
Workaround for DirectWrite creating NaN coordinates.
This commit is contained in:
parent
5765dbe670
commit
4cd58b54c0
1 changed files with 4 additions and 0 deletions
|
|
@ -73,6 +73,10 @@ namespace DirectWriteTypeLayout
|
|||
jassert (currentLine == layout->getNumLines());
|
||||
TextLayout::Line* const newLine = new TextLayout::Line();
|
||||
layout->addLine (newLine);
|
||||
|
||||
if (! std::isnormal (baselineOriginY))
|
||||
baselineOriginY = 0; // DirectWrite sometimes sends NaNs in this parameter
|
||||
|
||||
newLine->lineOrigin = Point<float> (baselineOriginX, baselineOriginY);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue