charsets.py 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. """
  2. Character sets can be used to change the font style in TEXT
  3. (:class:`alphasign.text.Text`) and STRING (:class:`alphasign.string.String`)
  4. files.
  5. The following character set constants are defined:
  6. * :const:`FIVE_HIGH_STD`
  7. * :const:`FIVE_STROKE`
  8. * :const:`SEVEN_HIGH_STD`
  9. * :const:`SEVEN_STROKE`
  10. * :const:`SEVEN_HIGH_FANCY`
  11. * :const:`TEN_HIGH_STD`
  12. * :const:`SEVEN_SHADOW`
  13. * :const:`FULL_HEIGHT_FANCY`
  14. * :const:`FULL_HEIGHT_STD`
  15. * :const:`SEVEN_SHADOW_FANCY`
  16. * :const:`FIVE_WIDE`
  17. * :const:`SEVEN_WIDE`
  18. * :const:`SEVEN_FANCY_WIDE`
  19. * :const:`WIDE_STROKE_FIVE`
  20. The following character sets are available only on Alpha 2.0 and 3.0 protocols:
  21. * :const:`FIVE_HIGH_CUST`
  22. * :const:`SEVEN_HIGH_CUST`
  23. * :const:`TEN_HIGH_CUST`
  24. * :const:`FIFTEEN_HIGH_CUST`
  25. --------
  26. Examples
  27. --------
  28. Make a text file using the :const:`FIVE_WIDE` charset::
  29. msg = alphasign.Text("%sthis is wide" % alphasign.charsets.FIVE_WIDE,
  30. label="A")
  31. """
  32. # Character sets
  33. FIVE_HIGH_STD = "\x1A1"
  34. FIVE_STROKE = "\x1A2"
  35. SEVEN_HIGH_STD = "\x1A3"
  36. SEVEN_STROKE = "\x1A4"
  37. SEVEN_HIGH_FANCY = "\x1A5"
  38. TEN_HIGH_STD = "\x1A6"
  39. SEVEN_SHADOW = "\x1A7"
  40. FULL_HEIGHT_FANCY = "\x1A8"
  41. FULL_HEIGHT_STD = "\x1A9"
  42. SEVEN_SHADOW_FANCY = "\x1A:"
  43. FIVE_WIDE = "\x1A;"
  44. SEVEN_WIDE = "\x1A<"
  45. SEVEN_FANCY_WIDE = "\x1A="
  46. WIDE_STROKE_FIVE = "\x1A>"
  47. # Alpha 2.0 and 3.0 only
  48. FIVE_HIGH_CUST = "\x1AW"
  49. SEVEN_HIGH_CUST = "\x1AX"
  50. TEN_HIGH_CUST = "\x1AY"
  51. FIFTEEN_HIGH_CUST = "\x1AZ"