Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font with more than 127 characters: ignored after 127 #6

Open
berni-v opened this issue Feb 28, 2015 · 1 comment
Open

Font with more than 127 characters: ignored after 127 #6

berni-v opened this issue Feb 28, 2015 · 1 comment

Comments

@berni-v
Copy link

berni-v commented Feb 28, 2015

As french user, I need to display accented characters, such as é, ä, à, ë, ê, ...
The windows fonts have this possibility, special western characters are coded (ISO code) in the range 128..255. For example "é" is the character 233, therefore to allow using such characters, the easy way is to export any windows font, including the characters above nr. 127, using "GLCD FontCreator 2".
The DMD and DMD2 librairy is not able to display these characters because the character index used a "char" variable.
A simple change to "unsined char" corrects the limitation.

In DMD.cpp: function drawChar can be changed as below:

int DMD::drawChar(const int bX, const int bY, const unsigned char letter, byte bGraphicsMode)

@MrSmartus
Copy link

MrSmartus commented Jan 5, 2018

in library file DMD-Text.cpp need to change one string from this:
char c = letter;
to this:
unsigned char c = letter;
This way u can get charaters over 127 ASCII

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants