/// <summary> /// Initializes a new instance of the <see cref="Font"/> class. /// </summary> /// <param name="device">The device.</param> /// <param name="height">The height.</param> /// <param name="width">The width.</param> /// <param name="weight">The weight.</param> /// <param name="mipLevels">The mip levels.</param> /// <param name="isItalic">if set to <c>true</c> [is italic].</param> /// <param name="characterSet">The character set.</param> /// <param name="precision">The precision.</param> /// <param name="quality">The quality.</param> /// <param name="pitchAndFamily">The pitch and family.</param> /// <param name="faceName">Name of the face.</param> public Font(Device device, int height, int width, FontWeight weight, int mipLevels, bool isItalic, FontCharacterSet characterSet, FontPrecision precision, FontQuality quality, FontPitchAndFamily pitchAndFamily, string faceName) { D3DX10.CreateFont(device, height, width, (int)weight, mipLevels, isItalic, (int)characterSet, (int)precision, (int)quality, (int)pitchAndFamily, faceName, this); }
/// <summary> /// Initializes a new instance of the <see cref="Font"/> class from a <see cref="System.Drawing.Font"/> /// </summary> /// <param name="device">The device.</param> /// <param name="font">The font.</param> public Font(Device device, System.Drawing.Font font) { D3DX10.CreateFont(device, font.Height, 0, (int)(font.Bold ? FontWeight.Bold : FontWeight.Normal), 0, font.Italic, (int)FontCharacterSet.Default, (int)FontPrecision.Default, (int)FontQuality.Default, (int)FontPitchAndFamily.Default, font.Name, this); }