Created
May 13, 2015 18:03
-
-
Save ArneS/2ecfbe4a9d7072ac56c0 to your computer and use it in GitHub Desktop.
Javascript function to return unicode superscript digits. Handy for writing on html canvas
This file contains 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
function digitToUnicodeSupercriptDigit(n) { | |
subst = [176,185,178,179,0x2074,0x2075,0x2076,0x2077,0x2078,0x2079] | |
return String.fromCharCode(subst[n] | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment