SvgKern.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. #pragma warning disable
  6. namespace Svg
  7. {
  8. public abstract class SvgKern : SvgElement
  9. {
  10. [SvgAttribute("g1")]
  11. public string Glyph1
  12. {
  13. get { return this.Attributes["g1"] as string; }
  14. set { this.Attributes["g1"] = value; }
  15. }
  16. [SvgAttribute("g2")]
  17. public string Glyph2
  18. {
  19. get { return this.Attributes["g2"] as string; }
  20. set { this.Attributes["g2"] = value; }
  21. }
  22. [SvgAttribute("u1")]
  23. public string Unicode1
  24. {
  25. get { return this.Attributes["u1"] as string; }
  26. set { this.Attributes["u1"] = value; }
  27. }
  28. [SvgAttribute("u2")]
  29. public string Unicode2
  30. {
  31. get { return this.Attributes["u2"] as string; }
  32. set { this.Attributes["u2"] = value; }
  33. }
  34. [SvgAttribute("k")]
  35. public float Kerning
  36. {
  37. get { return (this.Attributes["k"] == null ? 0 : (float)this.Attributes["k"]); }
  38. set { this.Attributes["k"] = value; }
  39. }
  40. }
  41. [SvgElement("vkern")]
  42. public class SvgVerticalKern : SvgKern
  43. {
  44. public override SvgElement DeepCopy()
  45. {
  46. return base.DeepCopy<SvgVerticalKern>();
  47. }
  48. }
  49. [SvgElement("hkern")]
  50. public class SvgHorizontalKern : SvgKern
  51. {
  52. public override SvgElement DeepCopy()
  53. {
  54. return base.DeepCopy<SvgHorizontalKern>();
  55. }
  56. }
  57. }
  58. #pragma warning restore