From e667e65c85f22e87d2f4c54599b59bc608a80ceb Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Thu, 28 Aug 2014 16:00:03 +0100 Subject: [PATCH] bug 1057330 pt 3 - provide character property accessor for Vertical_Orientation. r=smontagu --- intl/unicharutil/util/nsUnicodeProperties.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/intl/unicharutil/util/nsUnicodeProperties.h b/intl/unicharutil/util/nsUnicodeProperties.h index 15a62a5e21f3..3c5605fae05d 100644 --- a/intl/unicharutil/util/nsUnicodeProperties.h +++ b/intl/unicharutil/util/nsUnicodeProperties.h @@ -49,6 +49,18 @@ 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,