You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The string width from Font::getStringWidth with a text containing non-latin characters is short by a few pixels.
When drawing the text with the calculated width, the text is displayed truncated with ellipses at the end.
String text = CharPointer_UTF8("Test Label中文測試"); // A string containing Chinese charactersauto font = Font(FontOptions( "Arial", 24.0, Font::plain));
int width = font.getStringWidth( text );
g.drawText( text, 0, 0, width, height, Justification::left ); // The text is rendered as "Test Label中文..."
Note that the returned width is correct when using Chinese fonts such as "PingFang TC".
What is the expected behaviour?
Font::getStringWidth should give a correct width for strings containing non-latin characters.
Hence, the rendered text should not be truncated.
Operating systems
macOS
What versions of the operating systems?
Sonoma 14.5
Architectures
ARM
Stacktrace
No response
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the develop branch
The bug is present on the develop branch
Code of Conduct
I agree to follow the Code of Conduct
The text was updated successfully, but these errors were encountered:
Detailed steps on how to reproduce the bug
The string width from
Font::getStringWidth
with a text containing non-latin characters is short by a few pixels.When drawing the text with the calculated width, the text is displayed truncated with ellipses at the end.
Note that the returned width is correct when using Chinese fonts such as "PingFang TC".
What is the expected behaviour?
Font::getStringWidth
should give a correct width for strings containing non-latin characters.Hence, the rendered text should not be truncated.
Operating systems
macOS
What versions of the operating systems?
Sonoma 14.5
Architectures
ARM
Stacktrace
No response
Plug-in formats (if applicable)
No response
Plug-in host applications (DAWs) (if applicable)
No response
Testing on the
develop
branchThe bug is present on the
develop
branchCode of Conduct
The text was updated successfully, but these errors were encountered: