returns character equivalent in font (converts lowercase to uppercase if no lowercase version avail) similar to ddio_KeyToAscii
| 1054 | // returns character equivalent in font (converts lowercase to uppercase if no lowercase version avail) |
| 1055 | // similar to ddio_KeyToAscii |
| 1056 | int grfont_KeyToAscii(int font, int key) { |
| 1057 | key = ddio_KeyToAscii(key); |
| 1058 | |
| 1059 | if (font >= 0 && font < MAX_FONTS) { |
| 1060 | tFontInfo *ft = &Fonts[font]; |
| 1061 | |
| 1062 | // save current x and get this font |
| 1063 | if (key > ft->font.max_ascii && (ft->font.flags & FT_UPPERCASE)) { |
| 1064 | return toupper(key); |
| 1065 | } |
| 1066 | } |
| 1067 | |
| 1068 | return key; |
| 1069 | } |
| 1070 | |
| 1071 | // MTS: Unused? |
| 1072 | // returns the raw bitmap data for a character in a font, its width and height |
no test coverage detected