TextLayout.ProcessText throws an unhandled exception while using Style Script font with specific text
Kizuto3 opened this issue · 7 comments
Kizuto3 commented
Description
I found a weird bug that occurs while using Style Script font and a specific text. An ArgumentOutOfRangeException is thrown.
Steps to Reproduce
var content = "Please enter the text";
var fontFamilies = new FontCollection();
var fontFamily = fontFamilies.Add(@"<full path>\Style Script.ttf");
var font = fontFamily.CreateFont(16, FontStyle.Regular);
var renderOptions = new TextOptions(font)
{
Dpi = 96,
WrappingLength = 0f,
VerticalAlignment = VerticalAlignment.Top,
HorizontalAlignment = HorizontalAlignment.Left,
KerningMode = KerningMode.Auto
};
var textBox = TextLayout.ProcessText(content.AsSpan(), renderOptions);
However, no exception is thrown if content = "enter the text"
System Configuration
- Fonts version: 1.0.0-beta18.2
- Other Six Labors packages and versions: none
- Environment (Operating system, version and so on): Win10
- .NET Framework version: .Net 6.0
I attached the font that I am using:
Style Script.zip
JimBobSquarePants commented
Can you please fill in the issue form properly specifying version numbers etc?
Kizuto3 commented
I updated the issue form
JimBobSquarePants commented
Thanks!
Kizuto3 commented
JimBobSquarePants commented
I’m not seeing that on my machine. See the output from #303
Scratch that. I'll have a look, but I can't promise a result any time soon.
Kizuto3 commented
That's OK, thank you!
JimBobSquarePants commented