You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1234567891011121314151617181920212223242526272829303132333435363738
  1. using System;
  2. namespace Novacode
  3. {
  4. /// <summary>
  5. /// Represents a font family
  6. /// </summary>
  7. public sealed class Font
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of <see cref="Font" />
  11. /// </summary>
  12. /// <param name="name">The name of the font family</param>
  13. public Font(string name)
  14. {
  15. if (string.IsNullOrEmpty(name))
  16. {
  17. throw new ArgumentNullException(nameof(name));
  18. }
  19. Name = name;
  20. }
  21. /// <summary>
  22. /// The name of the font family
  23. /// </summary>
  24. public string Name { get; private set; }
  25. /// <summary>
  26. /// Returns a string representation of an object
  27. /// </summary>
  28. /// <returns>The name of the font family</returns>
  29. public override string ToString()
  30. {
  31. return Name;
  32. }
  33. }
  34. }