charsets.py 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. """
  2. Character constants can be used to change the font style in TEXT
  3. (:class:`alphasign.text.Text`) and STRING (:class:`alphasign.string.String`)
  4. files.
  5. --------------
  6. Character sets
  7. --------------
  8. The following character set constants are defined:
  9. * :const:`FIVE_HIGH_STD`
  10. * :const:`FIVE_STROKE`
  11. * :const:`SEVEN_HIGH_STD`
  12. * :const:`SEVEN_STROKE`
  13. * :const:`SEVEN_HIGH_FANCY`
  14. * :const:`TEN_HIGH_STD`
  15. * :const:`SEVEN_SHADOW`
  16. * :const:`FULL_HEIGHT_FANCY`
  17. * :const:`FULL_HEIGHT_STD`
  18. * :const:`SEVEN_SHADOW_FANCY`
  19. * :const:`FIVE_WIDE`
  20. * :const:`SEVEN_WIDE`
  21. * :const:`SEVEN_FANCY_WIDE`
  22. * :const:`WIDE_STROKE_FIVE`
  23. The following character sets are available only on Alpha 2.0 and 3.0 protocols:
  24. * :const:`FIVE_HIGH_CUST`
  25. * :const:`SEVEN_HIGH_CUST`
  26. * :const:`TEN_HIGH_CUST`
  27. * :const:`FIFTEEN_HIGH_CUST`
  28. --------------------
  29. Character attributes
  30. --------------------
  31. The following character attribute constants are defined:
  32. * :const:`WIDE_ON`
  33. * :const:`WIDE_OFF`
  34. * :const:`DOUBLE_WIDE_ON`
  35. * :const:`DOUBLE_WIDE_OFF`
  36. * :const:`DOUBLE_HIGH_ON`
  37. * :const:`DOUBLE_HIGH_OFF`
  38. * :const:`TRUE_DESCENDERS_ON`
  39. * :const:`TRUE_DESCENDERS_OFF`
  40. * :const:`FIXED_WIDTH_ON`
  41. * :const:`FIXED_WIDTH_OFF`
  42. * :const:`FANCY_ON`
  43. * :const:`FANCY_OFF`
  44. * :const:`AUXILIARY_PORT_ON` -- Series 4000 & 7000 signs only.
  45. * :const:`AUXILIARY_PORT_OFF`
  46. * :const:`SHADOW_CHARACTERS_ON` -- Betabrite model 1036 and AlphaPriemere 9000 signs only.
  47. * :const:`SHADOW_CHARACTERS_OFF`
  48. -----------------
  49. Character spacing
  50. -----------------
  51. The following character spacing constants are defined:
  52. * :const:`PROPORTIONAL` -- default
  53. * :const:`FIXED_WIDTH` -- fixed width left justified
  54. --------
  55. Examples
  56. --------
  57. Make a text file using the :const:`FIVE_WIDE` charset::
  58. msg = alphasign.Text("%sthis is wide" % alphasign.charsets.FIVE_WIDE,
  59. label="A")
  60. """
  61. # Character sets
  62. FIVE_HIGH_STD = "\x1A1"
  63. FIVE_STROKE = "\x1A2"
  64. SEVEN_HIGH_STD = "\x1A3"
  65. SEVEN_STROKE = "\x1A4"
  66. SEVEN_HIGH_FANCY = "\x1A5"
  67. TEN_HIGH_STD = "\x1A6"
  68. SEVEN_SHADOW = "\x1A7"
  69. FULL_HEIGHT_FANCY = "\x1A8"
  70. FULL_HEIGHT_STD = "\x1A9"
  71. SEVEN_SHADOW_FANCY = "\x1A:"
  72. FIVE_WIDE = "\x1A;"
  73. SEVEN_WIDE = "\x1A<"
  74. SEVEN_FANCY_WIDE = "\x1A="
  75. WIDE_STROKE_FIVE = "\x1A>"
  76. # Alpha 2.0 and 3.0 only
  77. FIVE_HIGH_CUST = "\x1AW"
  78. SEVEN_HIGH_CUST = "\x1AX"
  79. TEN_HIGH_CUST = "\x1AY"
  80. FIFTEEN_HIGH_CUST = "\x1AZ"
  81. # Character attributes
  82. WIDE_ON = "\x1D01"
  83. WIDE_OFF = "\x1D00"
  84. DOUBLE_WIDE_ON = "\x1D11"
  85. DOUBLE_WIDE_OFF = "\x1D10"
  86. DOUBLE_HIGH_ON = "\x1D21"
  87. DOUBLE_HIGH_OFF = "\x1D20"
  88. TRUE_DESCENDERS_ON = "\x1D31"
  89. TRUE_DESCENDERS_OFF = "\x1D30"
  90. FIXED_WIDTH_ON = "\x1D41"
  91. FIXED_WIDTH_OFF = "\x1D40"
  92. FANCY_ON = "\x1D51"
  93. FANCY_OFF = "\x1D50"
  94. AUXILIARY_PORT_ON = "\x1D61"
  95. AUXILIARY_PORT_OFF = "\x1D60"
  96. SHADOW_CHARACTERS_ON = "\x1D71"
  97. SHADOW_CHARACTERS_OFF = "\x1D70"
  98. # Character spacing
  99. PROPORTIONAL = "\x1E0"
  100. FIXED_WIDTH = "\x1E1"