TextMeasure feature for Fonts throwing error #270
Unanswered
bodamithun
asked this question in
Q&A
Replies: 0 comments 1 reply
-
Don’t pollute this repository by submitting issues in multiple locations. If you do it again you will be banned. Do you understand? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I recently upgraded my SixLabors.Fonts from 1.0.0-beta0009 to 1.0.0-beta17, also I upgraded the imagesharp and imageSharp.Drawing to latest versions and I see that some of the fonts are failing with the following exception
"Invalid value for 'subTableFormat' 7294. Should be '1'
These were working before I did the upgrade. Following code is throwing the error. And also this is not happening with all the fonts... only few fonts.
AllFontCollection = new FontCollection();
AllFontCollection.Add(@"Fonts/font1.ttf");
AllFontCollection.Add(@"Fonts/font2.ttf");
if (fontCollectionService.AllFontCollection.TryGet(layer.Font.FontName, out FontFamily family))
{
}
var textOptions = new TextOptions(font) { WrappingLength = targetWidth };
var textSize = TextMeasurer.Measure(text, textOptions ); //this line throws exception
Can somebody please guide me as what I am missing or what I need to check.
Thanks in advance...
Beta Was this translation helpful? Give feedback.
All reactions