FastFont.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Text;
  4. namespace FastReport.Fonts
  5. {
  6. #pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
  7. /// <summary>
  8. /// Font descriptor
  9. /// </summary>
  10. public class FastFont
  11. {
  12. private string originalFontName;
  13. private bool bold;
  14. private bool italic;
  15. public string OriginalFontName
  16. {
  17. get
  18. {
  19. return originalFontName;
  20. }
  21. set
  22. {
  23. originalFontName = value;
  24. }
  25. }
  26. public bool Bold
  27. {
  28. get
  29. {
  30. return bold;
  31. }
  32. set
  33. {
  34. bold = value;
  35. }
  36. }
  37. public bool Italic
  38. {
  39. get
  40. {
  41. return italic;
  42. }
  43. set
  44. {
  45. italic = value;
  46. }
  47. }
  48. public string FastName
  49. {
  50. get
  51. {
  52. return OriginalFontName + (Bold ? "-B" : string.Empty) + (Italic ? "-I" : string.Empty);
  53. }
  54. }
  55. public FastFont(string name, bool bold, bool italic)
  56. {
  57. OriginalFontName = name;
  58. Bold = bold;
  59. Italic = italic;
  60. }
  61. }
  62. }