Exemplo n.º 1
0
        public override SKTypeface GetTypeface(FontStyle fontStyle, int weight)
        {
            if (!(cachedTypeface != null && cachedTypeface.FontSlant == fontStyle.ToSKFontStyleSlant() && cachedTypeface.FontWeight == weight))
            {
                cachedTypeface = SKTypeface.FromFamilyName(_fontFamily, weight, 0, fontStyle.ToSKFontStyleSlant());
            }

            return(cachedTypeface);
        }
Exemplo n.º 2
0
        public override SKTypeface GetTypeface(FontStyle fontStyle, int weight)
        {
            if (!(cachedTypeface != null && cachedTypeface.FontSlant == fontStyle.ToSKFontStyleSlant() && cachedTypeface.FontWeight == weight))
            {
                var stream = _assembly.GetManifestResourceStream(_resource);
                cachedTypeface = SKTypeface.FromStream(stream);
            }

            return(cachedTypeface);
        }