anchorFormat 2 not supported. Should be '1'.
See original GitHub issuePrerequisites
- I have written a descriptive issue title
- I have verified that I am running the latest version of Fonts
- I have verified if the problem exist in both
DEBUG
andRELEASE
mode - I have searched open and closed issues to ensure it has not already been reported
Description
After upgrading from beta15 to beta16 (via SixLabors.ImageSharp.Drawing), I often see this error in my log files. For now I have rolled back to beta15. I noticed that the font API has changed slightly in beta16, so maybe this is now intended but my code is no longer using fonts correctly?
Any pointers as to what I might be doing wrong or what I can do to work around it would be appreciated.
anchorFormat 2 not supported. Should be ‘1’.
System.NotSupportedException:
at SixLabors.Fonts.Tables.AdvancedTypographic.GPos.AnchorTable.Load (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.Tables.AdvancedTypographic.GPos.MarkArrayTable..ctor (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.Tables.AdvancedTypographic.GPos.LookupType4SubTable+LookupType4Format1SubTable.Load (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.Tables.AdvancedTypographic.GPos.LookupType4SubTable.Load (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.Tables.AdvancedTypographic.GPos.LookupTable.LoadLookupSubTable (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.Tables.AdvancedTypographic.GPos.LookupTable.Load (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.Tables.AdvancedTypographic.GPos.LookupListTable.Load (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.Tables.AdvancedTypographic.GPosTable.Load (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.Tables.AdvancedTypographic.GPosTable.Load (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.Tables.TableLoader.Load (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.FontReader.TryGetTable (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.StreamFontMetrics.LoadFont (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.StreamFontMetrics.LoadFont (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.StreamFontMetrics.LoadFont (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.FileFontMetrics+<>c__DisplayClass3_0.<.ctor>b__0 (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at System.Lazy`1.ViaFactory (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at System.Lazy`1.CreateValue (System.Private.CoreLib, Version=6.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e)
at SixLabors.Fonts.FileFontMetrics.TryGetGlyphId (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.TextLayout.DoFontRun (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.TextLayout.ProcessText (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at SixLabors.Fonts.TextLayout.GenerateLayout (SixLabors.Fonts, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d998eea7b14cab13)
at ...userland...
Steps to Reproduce
var fontFamily = default(FontFamily);
if (!SystemFonts.TryGet("DejaVu Sans", out fontFamily))
{
throw new Exception($"Unable to find a suitable font. Available options are: {String.Join(", ", SystemFonts.Families.Select(x => x.Name))}");
}
var badgeFont = new Font(fontFamily, 12, FontStyle.Regular);
var badgeTextSize = TextMeasurer.Measure("100", new TextOptions(badgeFont));
System Configuration
- Fonts version: beta16
- Other Six Labors packages and versions: ImageSharp 2.0, ImageSharp.Drawing 2.0
- Environment (Operating system, version and so on): Linux
- .NET Framework version: 6.0
- Additional information: Azure App Service
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (7 by maintainers)
Top Results From Across the Web
SixLabors ImageSharp.Drawing · Discussions
After installing 1.0.0-beta14, I get an "anchorFormat 2 not supported" exception when using some fonts with IImageProcessingContext.DrawText().
Read more >Unable to load font for use with ImageSharp in Xamarin ...
Fonts NuGet package, I'm trying to load this font to use it for watermarking. However, trying to install the font using the asset...
Read more >Font can be selected in MS Word, but text does not change
Someone is having trouble with a font I made. They are using Windows 10 with Microsoft Office 16. In Word, my font name...
Read more >[Solved] Footnote Anchor Format - (View topic)
In Open Office 4.1.7 on Windows 10. How does one change the format of the footnote anchor from default font (style and size)...
Read more >GPOS — Glyph Positioning Table (OpenType 1.9)
This is done so that the default instance of a variable font can be compatible with applications that do not support Font Variations....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@JimBobSquarePants maybe we should consider skipping over the data of Anchor Type 3, which we can not handle yet instead of throwing an exception? I think in most cases rendering of the font will be fine.
I’ve met a similar exception,
NotSupportedException: anchorFormat 3 not supported. Should be '1'
.OS: Win10 Font: Microsoft Sans Serif
Maybe the stacks below makes sense.