private Font GetFont(ItemKey key, string defaultFontName) { if (key.Unit != GraphicsUnit.Pixel && key.Unit != GraphicsUnit.Point) { throw new NotSupportedException("Only Pixel and Point GraphicsUnits are supported."); } try { return(_fonts.Create(key)); } catch (Exception e) { Platform.Log(LogLevel.Error, e); return(_fonts.Create(new ItemKey(defaultFontName, key.Size, FontStyle.Regular, key.Unit))); } }
public StringFormat CreateStringFormat(CreateStringFormatArgs args) { return(_stringFormatFactory.Create(args)); }
public Brush CreateBrush(CreateBrushArgs args) { return(_brushFactory.Create(args)); }