Last active
January 4, 2016 07:59
-
-
Save fjolnir/8592432 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
BOOL CYCharacterIsFullWidth(unichar const aChar) | |
{ | |
// Reference: http://www.unicode.org/Public/UCD/latest/ucd/EastAsianWidth.txt | |
return INRANGE(aChar, 0x4e00, 0x9faf) | |
|| INRANGE(aChar, 0x1100, 0x115f) | |
|| INRANGE(aChar, 0x2329, 0x232a) | |
|| INRANGE(aChar, 0x2e80, 0x2e99) | |
|| INRANGE(aChar, 0x2e9b, 0x2ef3) | |
|| INRANGE(aChar, 0x2f00, 0x2fd5) | |
|| INRANGE(aChar, 0x2ff0, 0x2ffb) | |
|| INRANGE(aChar, 0x3000, 0x303e) | |
|| INRANGE(aChar, 0x3041, 0x3096) | |
|| INRANGE(aChar, 0x3099, 0x30ff) | |
|| INRANGE(aChar, 0x3105, 0x312d) | |
|| INRANGE(aChar, 0x3131, 0x318e) | |
|| INRANGE(aChar, 0x3190, 0x31ba) | |
|| INRANGE(aChar, 0x31c0, 0x31e3) | |
|| INRANGE(aChar, 0x31f0, 0x321e) | |
|| INRANGE(aChar, 0x3220, 0x3247) | |
|| INRANGE(aChar, 0x3250, 0x32fe) | |
|| INRANGE(aChar, 0x3300, 0x33ff) | |
|| INRANGE(aChar, 0xa000, 0xa48c) | |
|| INRANGE(aChar, 0xa490, 0xa4c6) | |
|| INRANGE(aChar, 0xa960, 0xa97c) | |
|| INRANGE(aChar, 0xf900, 0xfa6d) | |
|| INRANGE(aChar, 0xfa70, 0xfad9) | |
|| INRANGE(aChar, 0xfe10, 0xfe19) | |
|| INRANGE(aChar, 0xfe30, 0xfe52) | |
|| INRANGE(aChar, 0xfe54, 0xfe66) | |
|| INRANGE(aChar, 0xfe68, 0xfe6b) | |
|| INRANGE(aChar, 0xff01, 0xff60) | |
|| INRANGE(aChar, 0xffe0, 0xffe6); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment