コード例 #1
0
 /// <summary>
 /// Create a new instance of the <see cref="Font"/> for the named font family with regular styling.
 /// </summary>
 /// <param name="collection">The the ont collection to retrieve the font family from.</param>
 /// <param name="fontFamily">The family.</param>
 /// <param name="culture">The culture of the retuend font family</param>
 /// <param name="size">The size.</param>
 /// <returns>The font for the representing the configured options.</returns>
 public static Font CreateFont(this IReadOnlyFontCollection collection, string fontFamily, CultureInfo culture, float size)
 => new Font(collection.Find(fontFamily, culture), size);
コード例 #2
0
 /// <summary>
 /// Create a new instance of the <see cref="Font"/> for the named font family with regular styling.
 /// </summary>
 /// <param name="collection">The the ont collection to retrieve the font family from.</param>
 /// <param name="fontFamily">The family.</param>
 /// <param name="size">The size.</param>
 public static Font CreateFont(this IReadOnlyFontCollection collection, string fontFamily, float size)
 {
     return(new Font(collection.Find(fontFamily), size));
 }
コード例 #3
0
 /// <summary>
 /// Create a new instance of the <see cref="Font"/> for the named font family.
 /// </summary>
 /// <param name="collection">The the ont collection to retrieve the font family from.</param>
 /// <param name="fontFamily">The family.</param>
 /// <param name="size">The size.</param>
 /// <param name="style">The style.</param>
 /// <returns>The font for the representing the configured options.</returns>
 public static Font CreateFont(this IReadOnlyFontCollection collection, string fontFamily, float size, FontStyle style)
 => new Font(collection.Find(fontFamily), size, style);
コード例 #4
0
 /// <summary>
 /// Create a new instance of the <see cref="Font"/> for the named font family.
 /// </summary>
 /// <param name="collection">The the ont collection to retrieve the font family from.</param>
 /// <param name="fontFamily">The family.</param>
 /// <param name="culture">The culture of the retuend font family</param>
 /// <param name="size">The size.</param>
 /// <param name="style">The style.</param>
 /// <returns>The font for the representing the configured options.</returns>
 public static Font CreateFont(this IReadOnlyFontCollection collection, string fontFamily, CultureInfo culture, float size, FontStyle style)
 {
     return(new Font(collection.Find(fontFamily, culture), size, style));
 }