Aside
I’m not sure if this is a Java or a Font question, however, I’m using the java.awt.Font class.
Context
I am using the java.awt.Font class to draw glyphs to the screen. There are functions that allow me to pass it a character to draw. There are functions that allow me to pass it a code point to draw.
Question
What is the relation between (char ch) and (int codepoint) for characters that are a-z, A-Z, 0-9? Does some standard guarantee that for these alphanumeric characters, the code point value is just the char’s ascii value?
Thanks!
Codepoint is the new lingo equivalent to your old “ASCII value”. Since modern encodings go way beyond ASCII’s 7 bits, another word had to be coined. But most encodings have the same first 127 characters/codepoints as ASCII – so you’re safe here, unless you’re dealing with exotic IBM encodings 😉