Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

Commit

Permalink
bug 724826 pt 2 - replace the use of cattable.h with nsUnicodePropert…
Browse files Browse the repository at this point in the history
…yData for more accurate (and faster) category lookup. r=smontagu
  • Loading branch information
jfkthame committed Feb 24, 2012
1 parent c61fa71 commit 1a6e616
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 4,808 deletions.
9 changes: 9 additions & 0 deletions intl/unicharutil/public/nsUnicodeProperties.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,26 @@
#define NS_UNICODEPROPERTIES_H

#include "prtypes.h"
#include "nsIUGenCategory.h"

namespace mozilla {

namespace unicode {

extern nsIUGenCategory::nsUGenCategory sDetailedToGeneralCategory[];

PRUint32 GetMirroredChar(PRUint32 aCh);

PRUint8 GetCombiningClass(PRUint32 aCh);

// returns the detailed General Category in terms of HB_UNICODE_* values
PRUint8 GetGeneralCategory(PRUint32 aCh);

// returns the simplified Gen Category as defined in nsIUGenCategory
inline nsIUGenCategory::nsUGenCategory GetGenCategory(PRUint32 aCh) {
return sDetailedToGeneralCategory[GetGeneralCategory(aCh)];
}

PRUint8 GetEastAsianWidth(PRUint32 aCh);

PRInt32 GetScriptCode(PRUint32 aCh);
Expand Down
Loading

0 comments on commit 1a6e616

Please sign in to comment.