Bug 1097499 part 7 - Add reverse function of GetFullWidth. r=emk

MozReview-Commit-ID: HRDoZPzr1GO
This commit is contained in:
Xidorn Quan
2016-04-22 09:18:41 +10:00
parent 4912a1a884
commit f4b949c3e6
4 changed files with 57 additions and 16 deletions

View File

@@ -101,6 +101,11 @@ HanVariantType GetHanVariant(uint32_t aCh);
#endif
uint32_t GetFullWidth(uint32_t aCh);
// This is the reverse function of GetFullWidth which guarantees that
// for every codepoint c, GetFullWidthInverse(GetFullWidth(c)) == c.
// Note that, this function does not guarantee to convert all wide
// form characters to their possible narrow form.
uint32_t GetFullWidthInverse(uint32_t aCh);
bool IsClusterExtender(uint32_t aCh, uint8_t aCategory);