bug 1057330 pt 3 - provide character property accessor for Vertical_Orientation. r=smontagu
authorJonathan Kew <jkew@mozilla.com>
Thu, 28 Aug 2014 16:00:03 +0100
changeset 202225 7f9a9cfeabe72b789884b0047860102929353153
parent 202224 e0933bde618b7674cf245648de41754989fecaf8
child 202226 d3636970a300be806482b9b5ad00db036166c67b
push idunknown
push userunknown
push dateunknown
reviewerssmontagu
bugs1057330
milestone34.0a1
bug 1057330 pt 3 - provide character property accessor for Vertical_Orientation. r=smontagu
intl/unicharutil/util/nsUnicodeProperties.h
--- a/intl/unicharutil/util/nsUnicodeProperties.h
+++ b/intl/unicharutil/util/nsUnicodeProperties.h
@@ -44,16 +44,28 @@ inline uint8_t GetScriptCode(uint32_t aC
 }
 
 uint32_t GetScriptTagForCode(int32_t aScriptCode);
 
 inline nsCharType GetBidiCat(uint32_t aCh) {
   return nsCharType(GetCharProps2(aCh).mBidiCategory);
 }
 
+/* This MUST match the values assigned by genUnicodePropertyData.pl! */
+enum VerticalOrientation {
+  VERTICAL_ORIENTATION_U  = 0,
+  VERTICAL_ORIENTATION_R  = 1,
+  VERTICAL_ORIENTATION_Tu = 2,
+  VERTICAL_ORIENTATION_Tr = 3
+};
+
+inline VerticalOrientation GetVerticalOrientation(uint32_t aCh) {
+  return VerticalOrientation(GetCharProps2(aCh).mVertOrient);
+}
+
 enum XidmodType {
   XIDMOD_INCLUSION,
   XIDMOD_RECOMMENDED,
   XIDMOD_DEFAULT_IGNORABLE,
   XIDMOD_HISTORIC,
   XIDMOD_LIMITED_USE,
   XIDMOD_NOT_NFKC,
   XIDMOD_NOT_XID,