Uploading Fonts to GLK24064

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
TedG
LCD!
Posts: 11
Joined: Fri Apr 23, 2010 1:08 pm

Uploading Fonts to GLK24064

Post by TedG »

I am attempting to upload a custom font to a GLK24064-16-U1 but I am having difficulty. The font is being taken but it is about 3 times as wide and skewed.
The documentation says to sent the command with the data length, then send the font height then width. when I send the confirmation on the width it just stops and doesn't confirm the next byte sent, which of course stops all communication on my part. If I skip the one confirmation it then takes off. It seems it doesn't like something about the width. The documentation is not quite clear on the some of this and has you jumping around and counting bytes in their example to figure out what how to send things. I have triple checked every byte and it seems to be good.
Does anyone know of some good documentation or someone that has had luck downloading fonts?
Stwo Corp

Raquel
Matrix Orbital
Matrix Orbital
Posts: 796
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hi Ted,

Thank you for posting on the forum.

Hopefully there is not really a need for you to upload the font files during run time. If you have your defined fonts, you can upload them using mogd#.

If you DO need to have your fonts uploaded during run time, first we need to make sure that the font file is correct, then we can go over the protocol on how to upload them.

Once you play with mogd#, you will realize that there is not really a font file, but a font folder that has all the different glyphs as bitmaps. There is also a header file that describes the font. If you have your custom font glyphs drawn, I can help you with making a graphic font file for it.

I hope this helps.
Raquel Malinis
Design and Development
Matrix Orbital

TedG
LCD!
Posts: 11
Joined: Fri Apr 23, 2010 1:08 pm

Post by TedG »

Raquel wrote:Hi Ted,

Thank you for posting on the forum.

Hopefully there is not really a need for you to upload the font files during run time. If you have your defined fonts, you can upload them using mogd#.

If you DO need to have your fonts uploaded during run time, first we need to make sure that the font file is correct, then we can go over the protocol on how to upload them.

Once you play with mogd#, you will realize that there is not really a font file, but a font folder that has all the different glyphs as bitmaps. There is also a header file that describes the font. If you have your custom font glyphs drawn, I can help you with making a graphic font file for it.

I hope this helps.
Thank you for your quick reply. The problem is I do need to upload them at run time. We buy many displays and we have quite a few of them in the field. We normally load them up when new and the unit is open with the fonts needed but I have taken over development and I am trying to get the thing looking better and we can't recall the units.
That being said, I have used the mogd program to create the font bitmaps and a program to create the type of bitmaps needed.
So the latest developments are, I found out why the chars were skewed, because in the char table I had the number of bytes that the char consisted of in the third byte and not the char width, it isn't clear in the documentation, and the example you have the number of bytes matches the width so finally figured out that it is the actual width in pixels.
Now for some reason the chars are flipped vertically...oh joy. so now I need to go back and read the bitmaps backward. But at least I have font that is downloaded.
Stwo Corp

Raquel
Matrix Orbital
Matrix Orbital
Posts: 796
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Glad to hear that you have figured out what was wrong.
We will take a look at the manual and make sure that it describes the character table more clearly.
Raquel Malinis
Design and Development
Matrix Orbital

TedG
LCD!
Posts: 11
Joined: Fri Apr 23, 2010 1:08 pm

Post by TedG »

Raquel wrote:Glad to hear that you have figured out what was wrong.
We will take a look at the manual and make sure that it describes the character table more clearly.
I still don't understand why it barfs on the first confirmation byte.
I wrote a quick c# program to iron out the download and make the bitmaps before I put the routines in an embedded system using c++ and because the system is linux, it is almost impossible to debug so I wanted to get the procedure down pat. I have a feeling that confirmation byte is going to cause me grief. Is the documentation wrong? See page 44 of the http://www.lcdforums.com/forums/posting ... 4633d85894 width byte confirmation.
Stwo Corp

Raquel
Matrix Orbital
Matrix Orbital
Posts: 796
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post by Raquel »

Hi,

Sorry about the documentation, I confirmed that it is incorrect. There should be no need for the first confirmation byte (the one before the font width is sent by the host); as laid out in the table on page 44 of the manual.

I have told the technical writer and he said he will look into this matter.

Thank you,
Raquel Malinis
Design and Development
Matrix Orbital

TedG
LCD!
Posts: 11
Joined: Fri Apr 23, 2010 1:08 pm

Post by TedG »

Raquel wrote:Hi,

Sorry about the documentation, I confirmed that it is incorrect. There should be no need for the first confirmation byte (the one before the font width is sent by the host); as laid out in the table on page 44 of the manual.

I have told the technical writer and he said he will look into this matter.

Thank you,
Thank you for the response. I was able to get the font working in the embedded device and I did have to leave out that confirmation byte. But I knew that was going to be an issue.
Stwo Corp

Post Reply