/// <summary> /// Initializes a new instance of the <see cref="FontReference"/> struct. /// </summary> /// <param name="font">The font.</param> public FontReference(Font font) { if (font) { _font = font.Asset; _size = font.Size; } else { _font = null; _size = 30; } _cachedFont = font; }
/// <summary> /// Initializes a new instance of the <see cref="FontReference"/> struct. /// </summary> public FontReference() { _font = null; _size = 30; _cachedFont = null; }
/// <summary> /// Initializes a new instance of the <see cref="FontReference"/> struct. /// </summary> /// <param name="font">The font.</param> /// <param name="size">The font size.</param> public FontReference(FontAsset font, int size) { _font = font; _size = size; _cachedFont = null; }
/// <summary> /// Initializes a new instance of the <see cref="FontReference"/> struct. /// </summary> /// <param name="font">The font.</param> public FontReference(Font font) { _font = font?.Asset; _size = font?.Size ?? 30; _cachedFont = font; }