Exemplo n.º 1
0
 /// <summary>
 /// Initialize a new instance of <see cref="DFFont"/> class.
 /// </summary>
 /// <param name="path">relative path to the font, or font-family name of system fonts.</param>
 /// <param name="size">font size by pixel unit.</param>
 /// <param name="style">font style.</param>
 public DFFont(string path, float size = 16, DFFontStyle style = DFFontStyle.Normal)
 {
     Path      = path;
     Id        = path;
     Size      = size;
     FontStyle = style;
 }
Exemplo n.º 2
0
 /// <summary>
 /// Initialize a new instance of <see cref="DFFont"/> class.
 /// </summary>
 /// <param name="stream">Stream of the font.</param>
 /// <param name="id">An ID to cache this font data.</param>
 /// <param name="size">font size by pixel unit.</param>
 /// <param name="style">font style.</param>
 public DFFont(Stream stream, string id, float size = 16, DFFontStyle style = DFFontStyle.Normal)
 {
     Id        = id;
     Stream    = stream;
     Size      = size;
     FontStyle = style;
 }
Exemplo n.º 3
0
 /// <summary>
 /// Get a default font.
 /// </summary>
 /// <param name="size">Font size.</param>
 /// <param name="style">Font style.</param>
 /// <returns>Generated defualt font.</returns>
 public static DFFont GetDefault(float size = 16, DFFontStyle style = DFFontStyle.Normal)
 {
     return(new DFFont(defaultFont, "__DOTFEATHER_SYSTEM_EMBEDDED_FONT_MPLUS__", size, style));
 }