private IFontFamily LookupFamily(Uri locationUri) { if (!locationUri.IsFile) { throw new NotSupportedException("Uri scheme is not supported."); } return(_familyCache.GetOrAdd(locationUri.LocalPath, k => new FileFontFamily(k))); }
public GlyphFace GetGlyph(uint code) { return(_glyphCache.GetOrAdd(code, k => { GlyphMetrics metrics; var res = _face.CreateGlyphGeometry(MediaResourceManager.Current.Handle, k, out metrics); return new GlyphFace(Geometry.FromResource(res), this, metrics); })); }
public static FamilyCollection FromUri(Uri locationUri) { return(_familyCollectionCache.GetOrAdd(locationUri, k => FamilyCollection.FromUri(k))); }
private BitmapFrame GetAt(int index) { return(_frames.GetOrAdd(index, k => new PlatformBitmapFrame(_decoder.GetFrame((uint)k)))); }