Example #1
0
 /// <summary>
 /// Gets the specified font.
 /// </summary>
 /// <param name="fontName">The font's name</param>
 /// <param name="emSize">The font's size, in points</param>
 /// <returns></returns>
 public static Font GetFont(string fontName, float emSize)
 {
     return(FontFactory.GetFont(fontName, emSize, FontStyle.Regular, GraphicsUnit.Point));
 }
Example #2
0
 /// <summary>
 /// Gets the default font.
 /// </summary>
 /// <param name="emSize">Size of the em, in points.</param>
 /// <param name="style">The style.</param>
 /// <param name="unit">Units for the size : pixels, points, etc. Default should be point.</param>
 /// <returns></returns>
 public static Font GetDefaultFont(float emSize, FontStyle style)
 {
     return(FontFactory.GetDefaultFont(emSize, style, GraphicsUnit.Point));
 }
Example #3
0
 /// <summary>
 /// Gets the default font.
 /// </summary>
 /// <param name="emSize">Size of the em, in the given unit.</param>
 /// <param name="style">The style.</param>
 /// <param name="unit">Units for the size : pixels, points, etc. Default should be point.</param>
 /// <returns></returns>
 public static Font GetDefaultFont(float emSize, FontStyle style, GraphicsUnit unit)
 {
     return(FontFactory.GetFont(FontFactory.DefaultFont.FontFamily.Name, emSize, style, unit));
 }
Example #4
0
 /// <summary>
 /// Gets the default font.
 /// </summary>
 /// <param name="style">The style.</param>
 /// <returns></returns>
 public static Font GetDefaultFont(FontStyle style)
 {
     return(FontFactory.GetDefaultFont(SystemFonts.DefaultFont.Size, style));
 }
Example #5
0
 /// <summary>
 /// Gets the default font.
 /// </summary>
 /// <param name="emSize">Size of the em.</param>
 /// <returns></returns>
 public static Font GetDefaultFont(float emSize)
 {
     return(FontFactory.GetDefaultFont(emSize, FontStyle.Regular));
 }
Example #6
0
 /// <summary>
 /// Gets the specified font.
 /// </summary>
 /// <param name="family">The font's family</param>
 /// <param name="emSize">Size of the font, in points.</param>
 /// <param name="style">The font's style.</param>
 /// <returns></returns>
 public static Font GetFont(FontFamily family, float emSize, FontStyle style)
 {
     return(FontFactory.GetFont(family.Name, emSize, style, GraphicsUnit.Point));
 }
Example #7
0
 /// <summary>
 /// Gets the specified font.
 /// </summary>
 /// <param name="prototype">The font's prototype this font will be based on</param>
 /// <param name="style">The overriden style.</param>
 /// <returns></returns>
 public static Font GetFont(Font prototype, FontStyle style)
 {
     return(FontFactory.GetFont(prototype.FontFamily.Name, prototype.Size, style, prototype.Unit));
 }
Example #8
0
 /// <summary>
 /// Gets the specified font.
 /// </summary>
 /// <param name="fontName">The font's name</param>
 /// <param name="style">The font's style</param>
 /// <returns></returns>
 public static Font GetFont(string fontName, FontStyle style)
 {
     return(FontFactory.GetFont(fontName, FontFactory.DefaultFont.Size, style, FontFactory.DefaultFont.Unit));
 }