Digole
Digital Solutions
iDigole Buyer ProtectioniDigole Buyer
Protection
My shopping cart
0 Items:
Secure Checkout
Top Rated Plus
Visit Our Live Auctions
99.9% Customer's Satisfaction
 
Forum : Digole Serial Display :

 Search Forum.. 
 Creat New Topic   Reply 

Problem with setPrintPos() and custom font

I am using a Universal Serial Adapter with a 128x64 monochrome GLCD. This was purchased directly from you through eBay back on Dec 30, 2015, but I'm not sure of the Digole firmwar/version number.

I have created a small custom font set of symbols that I'm using for a menu - it consists of 6 characters only. I created the characters in Fony, then exported to .bdf format, and then ran the bdf2u8g_101.exe converter on it, to produce the needed u8g array for the font. I loaded the font to the Digole adapter, and use it, but am having some strangeness with the setPrintPos() method. My custom font is in font 201 (user font 1). Another font, an existing u8g font that I use for the menu text is loaded to the adapter, is defined as font 200. (User font zero) My custom fonts are numbered 0 through 5. (I have also tried defining these as characters 65 - 70, but have had no luck with that, either.)

When I try:

mydisp.setFont(200);
mydisp.setPrintPos(0,0);
mydisp.print('\x01');

Nothing shows up on the screen. If I instead call:

mydisp.setFont(201);
mydisp.drawStr(0,0,"");
mydisp.setFont(200);
mydisp.print('\x01');

Then the custom character displays on the screen just fine.

I have also specifically tried calling setFont(), setPrintPos(), preprint() and then print(), but this is not working, either - I only have success if I first call drawStr() with the pre-built font, then switch to the custom font, and then call print(). Clearly, I suspect there is something amiss with my custom font, but I have no idea what.

Any thoughts or suggestions on this?

Thanks!

Jim

 

RE:Problem with setPrintPos() and custom font

Hi Jim,

Please noticed, the value: 0, 10 and 13 can't be used to refer a characters, 0 used as a terminater to "TT" command, 10 used to move cursor to next line, 13 used to move cursor to the begin of the line.

To determine the function of setPrintPos(), please try it with the pre-loaded internal fonts, if it's work with other fonts but not with your user fonts, there supposed be some data problem in your user fonts.

Copyright Digole Digital Solutions, 2008-2017. All rights reserved.
Powered by Victor Sun