FontStyleItem.cs 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using System.Windows;
  7. using System.Windows.Media;
  8. namespace PDF_Office.Model.PropertyPanel.AnnotPanel
  9. {
  10. public class FontStyleItem
  11. {
  12. public string mTag { get; set; }
  13. public string mTagContent { get; set; }
  14. public int mFontSize { get; set; }
  15. public FontFamily mFontFamily { get; set; }
  16. public FontStyle mFontStyle { get; set; }
  17. public FontWeight mFontWeight { get; set; }
  18. }
  19. public class LoadFontStyle
  20. {
  21. public static List<FontStyleItem> Load()
  22. {
  23. List<FontStyleItem> fontStyleList = new List<FontStyleItem>();
  24. FontStyleItem custom = new FontStyleItem();
  25. custom.mTag = "custom";
  26. custom.mTagContent = "自定义";
  27. custom.mFontSize = 24;
  28. custom.mFontFamily = new FontFamily("Helvatica");
  29. custom.mFontStyle = FontStyles.Normal;
  30. custom.mFontWeight = FontWeights.Normal;
  31. FontStyleItem h1 = new FontStyleItem();
  32. h1.mTag = "H1";
  33. h1.mTagContent = "H1大标题";
  34. h1.mFontSize = 36;
  35. h1.mFontFamily = new FontFamily("Helvatica");
  36. h1.mFontStyle = FontStyles.Normal;
  37. h1.mFontWeight = FontWeights.Normal;
  38. FontStyleItem h2 = new FontStyleItem();
  39. h2.mTag = "H2";
  40. h2.mTagContent = "h2(标准)";
  41. h2.mFontSize = 1248;
  42. h2.mFontFamily = new FontFamily("Helvatica");
  43. h2.mFontStyle = FontStyles.Normal;
  44. h2.mFontWeight = FontWeights.Bold;
  45. FontStyleItem h3 = new FontStyleItem();
  46. h3.mTag = "H3";
  47. h3.mTagContent = "H3小标题";
  48. h3.mFontSize = 18;
  49. h3.mFontFamily = new FontFamily("Helvatica");
  50. h3.mFontStyle = FontStyles.Normal;
  51. h3.mFontWeight = FontWeights.Bold;
  52. FontStyleItem b1 = new FontStyleItem();
  53. b1.mTag = "B1";
  54. b1.mTagContent = "B1标题";
  55. b1.mFontSize = 14;
  56. b1.mFontFamily = new FontFamily("Helvatica");
  57. b1.mFontStyle = FontStyles.Normal;
  58. b1.mFontWeight = FontWeights.Normal;
  59. FontStyleItem b2 = new FontStyleItem();
  60. b2.mTag = "B2";
  61. b2.mTagContent = "B2标题";
  62. b2.mFontSize = 12;
  63. b2.mFontFamily = new FontFamily("Helvatica");
  64. b2.mFontStyle = FontStyles.Normal;
  65. b2.mFontWeight = FontWeights.Normal;
  66. FontStyleItem b3 = new FontStyleItem();
  67. b3.mTag = "B3";
  68. b3.mTagContent = "B3标题";
  69. b3.mFontSize = 11;
  70. b3.mFontFamily = new FontFamily("Helvatica");
  71. b3.mFontStyle = FontStyles.Normal;
  72. b3.mFontWeight = FontWeights.Normal;
  73. fontStyleList.Add(custom);
  74. fontStyleList.Add(h1);
  75. fontStyleList.Add(h2);
  76. fontStyleList.Add(h3);
  77. fontStyleList.Add(b1);
  78. fontStyleList.Add(b2);
  79. fontStyleList.Add(b3);
  80. return fontStyleList;
  81. }
  82. }
  83. }