public static StbTrueTypeSharpFontSource FromMemory(byte[] data)
        {
            var font = new StbTrueTypeSharpFontSource(data);

            byte *dataPtr = (byte *)font.dataPtr.Value.AddrOfPinnedObject();

            if (stbtt_InitFont(font._font, dataPtr, 0) == 0)
            {
                throw new Exception("stbtt_InitFont failed");
            }

            int ascent, descent, lineGap;

            stbtt_GetFontVMetrics(font._font, &ascent, &descent, &lineGap);

            var fh = ascent - descent;

            font.AscentBase     = ascent / (float)fh;
            font.DescentBase    = descent / (float)fh;
            font.LineHeightBase = (fh + lineGap) / (float)fh;

            return(font);
        }
 public IFontSource Load(byte[] data)
 {
     return(StbTrueTypeSharpFontSource.FromMemory(data));
 }