LineBreakClass.cs 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // RichTextKit
  2. // Copyright © 2019-2020 Topten Software. All Rights Reserved.
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License"), you may
  5. // not use this product except in compliance with the License. You may obtain
  6. // a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. // License for the specific language governing permissions and limitations
  14. // under the License.
  15. namespace Topten.RichTextKit
  16. {
  17. /// <summary>
  18. /// Unicode line break classes
  19. /// </summary>
  20. /// <remarks>
  21. /// Note, these need to match those used by the JavaScript script that
  22. /// generates the .trie resources
  23. /// </remarks>
  24. enum LineBreakClass
  25. {
  26. // The following break classes are handled by the pair table
  27. OP = 0, // Opening punctuation
  28. CL = 1, // Closing punctuation
  29. CP = 2, // Closing parenthesis
  30. QU = 3, // Ambiguous quotation
  31. GL = 4, // Glue
  32. NS = 5, // Non-starters
  33. EX = 6, // Exclamation/Interrogation
  34. SY = 7, // Symbols allowing break after
  35. IS = 8, // Infix separator
  36. PR = 9, // Prefix
  37. PO = 10, // Postfix
  38. NU = 11, // Numeric
  39. AL = 12, // Alphabetic
  40. HL = 13, // Hebrew Letter
  41. ID = 14, // Ideographic
  42. IN = 15, // Inseparable characters
  43. HY = 16, // Hyphen
  44. BA = 17, // Break after
  45. BB = 18, // Break before
  46. B2 = 19, // Break on either side (but not pair)
  47. ZW = 20, // Zero-width space
  48. CM = 21, // Combining marks
  49. WJ = 22, // Word joiner
  50. H2 = 23, // Hangul LV
  51. H3 = 24, // Hangul LVT
  52. JL = 25, // Hangul L Jamo
  53. JV = 26, // Hangul V Jamo
  54. JT = 27, // Hangul T Jamo
  55. RI = 28, // Regional Indicator
  56. EB = 29, // Emoji Base
  57. EM = 30, // Emoji Modifier
  58. ZWJ = 31, // Zero Width Joiner
  59. CB = 32, // Contingent break
  60. // The following break classes are not handled by the pair table
  61. AI = 33, // Ambiguous (Alphabetic or Ideograph)
  62. BK = 34, // Break (mandatory)
  63. CJ = 35, // Conditional Japanese Starter
  64. CR = 36, // Carriage return
  65. LF = 37, // Line feed
  66. NL = 38, // Next line
  67. SA = 39, // South-East Asian
  68. SG = 40, // Surrogates
  69. SP = 41, // Space
  70. XX = 42, // Unknown
  71. }
  72. }