예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XFont"/> class from a System.Drawing.FontFamily.
 /// </summary>
 /// <param name="fontFamily">The System.Drawing.FontFamily.</param>
 /// <param name="emSize">The em size.</param>
 /// <param name="style">The font style.</param>
 /// <param name="pdfOptions">Additional PDF options.</param>
 public XFont(GdiFontFamily fontFamily, double emSize, XFontStyle style, XPdfFontOptions pdfOptions)
 {
     _familyName    = fontFamily.Name;
     _gdiFontFamily = fontFamily;
     _emSize        = emSize;
     _style         = style;
     _pdfOptions    = pdfOptions;
     InitializeFromGdi();
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="XFont"/> class from a System.Drawing.FontFamily.
 /// </summary>
 /// <param name="fontFamily">The System.Drawing.FontFamily.</param>
 /// <param name="emSize">The em size.</param>
 /// <param name="style">The font style.</param>
 public XFont(GdiFontFamily fontFamily, double emSize, XFontStyle style)
     : this(fontFamily, emSize, style, new XPdfFontOptions(GlobalFontSettings.DefaultFontEncoding))
 {
 }