ANSI font or extended character set

The Dot Matrix Display (DMD) is a 32x16 array of high-brightness LEDs for visually striking effects. [Product Page]
Post Reply
multigrade
Posts: 7
Joined: Tue Sep 16, 2014 4:33 pm

ANSI font or extended character set

Post by multigrade » Sat Sep 20, 2014 9:19 pm

Hello,

is it possible to make an ANSI font to use with the DMD? I need to display German umlauts ÜÄÖ and ß. I tried to extend one of the fonts from the DMD2 library but its only an ASCII set.

"Schön" is displayed "Schn". This is an important issue for my project. It has to work with the German language because I can't force the people to text only in english.

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: ANSI font or extended character set

Post by angusgr » Tue Sep 23, 2014 3:20 am

Hi multigrade,

There's a tool called GLCDFontCreator2 that creates fonts which are compatible with the DMD library (also FTOLED and DMD2, same font format for all of them). It's part of the glcd-arduino tool.

You can download it from here:
https://code.google.com/p/glcd-arduino/ ... eator2.zip

(This isn't the original tool used for the DMD fonts, that tool is no longer available, but it creates compatible fonts.)

That should allow you to make a font with a larger character set.

If that doesn't work for some reason, a possible alternative (although probably not desirable) - could you search and replace umlauts for their ASCII-ified representations? ie Ü -> ue, ß -> ss, etc.


Angus

angusgr
Freetronics Staff
Freetronics Staff
Posts: 853
Joined: Tue Apr 09, 2013 11:19 pm
Location: Melbourne, Australia
Contact:

Re: ANSI font or extended character set

Post by angusgr » Tue Oct 21, 2014 11:12 pm

Hi multigrade,

Thanks to Xavier Seignard there is now a font with the ISO 8859-1 Latin-1 encodings included in the DMD library.

If you download the latest DMD library then there is a demo "dmd_latin_chars" that displays a marquee with some Latin-1 characters, and explains how to enter them into constant strings in the sketch. It's a bit fiddly but it does work.

The DMD library code is hosted here on github:
http://github.com/freetronics/dmd
(You can use the "Download ZIP" button at the bottom right to get the latest code)

Regards,


Angus

multigrade
Posts: 7
Joined: Tue Sep 16, 2014 4:33 pm

Re: ANSI font or extended character set

Post by multigrade » Sat Sep 10, 2016 2:05 pm

Thanks angusgr,

I tried to use the Latin-1 font from the DMD library to work with the DMD2 library but I cant display characters above 127. As I can't use DMD library, is there any chance for me to have Arial_Black_16_ISO_8859_1.h runing with DMD2?

Best,

multigrade
Posts: 7
Joined: Tue Sep 16, 2014 4:33 pm

Re: ANSI font or extended character set

Post by multigrade » Sat Sep 10, 2016 2:54 pm

I found this solution, but I'm not sure how to apply it to the DMD2 library:

https://github.com/freetronics/DMD/issues/6

multigrade
Posts: 7
Joined: Tue Sep 16, 2014 4:33 pm

Re: ANSI font or extended character set

Post by multigrade » Sat Sep 10, 2016 7:25 pm

I got it now.

As berni-v mentioned,
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.
For DMD2 that means changing DMD2-Text.cpp in the library folder.
Line 41:

Code: Select all

  char c = letter;
into:

Code: Select all

  unsigned char c = letter;
That worked for me.

Post Reply