mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-30 02:50:05 +00:00
More DirectWrite numeric workarounds.
This commit is contained in:
parent
042d9f22fc
commit
62b986573e
1 changed files with 3 additions and 3 deletions
|
|
@ -63,6 +63,9 @@ namespace DirectWriteTypeLayout
|
|||
{
|
||||
TextLayout* const layout = static_cast<TextLayout*> (clientDrawingContext);
|
||||
|
||||
if (! (baselineOriginY >= -1.0e10f && baselineOriginY <= 1.0e10f))
|
||||
baselineOriginY = 0; // DirectWrite sometimes sends NaNs in this parameter
|
||||
|
||||
if (baselineOriginY != lastOriginY)
|
||||
{
|
||||
lastOriginY = baselineOriginY;
|
||||
|
|
@ -74,9 +77,6 @@ namespace DirectWriteTypeLayout
|
|||
TextLayout::Line* const newLine = new TextLayout::Line();
|
||||
layout->addLine (newLine);
|
||||
|
||||
if (! (baselineOriginY >= 0 || baselineOriginY <= 0))
|
||||
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