an option to replace letters when foreign letters are not available

This commit is contained in:
Zeno Rogue 2021-06-25 15:14:50 +02:00
parent 59ea009521
commit b6a6b1b442
1 changed files with 11 additions and 1 deletions

View File

@ -113,8 +113,18 @@ EX int getnext(const char* s, int& i) {
if(eqs(s+i, natchars[k])) {
i += siz; return 128+k;
}
#ifdef REPLACE_LETTERS
for(int i=0; i<isize(dialog::latin_letters); i++)
if(s[i] == dialog::foreign_letters[2*i] && s[i+1] == dialog::foreign_letters[2*i+1]) {
i += 2;
return int(dialog::latin_letters[i]);
break;
}
#endif
printf("Unknown character in: '%s' at position %d\n", s, i);
i ++; return '?';
i += siz; return '?';
}
#if CAP_SDLTTF