mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-05 03:50:07 +00:00
TextLayout: Fix getStringBounds of empty strings
This commit is contained in:
parent
3c38adcc03
commit
a784d5776b
1 changed files with 4 additions and 0 deletions
|
|
@ -275,6 +275,10 @@ public:
|
|||
{
|
||||
TextLayout layout;
|
||||
layout.createLayout (string, std::numeric_limits<float>::max());
|
||||
|
||||
if (layout.getNumLines() == 0)
|
||||
return {};
|
||||
|
||||
return layout.getLine (0).getLineBounds();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue