8 months, 2 weeks ago.

Can't set fonts since updating.

Previously (a while ago) I could select one of my fonts with:

lcd.set_font(Arial24x23i);

I hit the 'dreaded button of destruction' formally known as 'update' and now that no longer works but found this:

lcd.SelectUserFont(Arial24x23i);

But now I get no text.

If I do this:

lcd.SelectUserFont();

The system font returns.

How can I get my fonts back?

Question relating to:

Comment on this question

1 Answer

8 months, 2 weeks ago.

Hi Paul, I did make some updates recently, but could not imagine an impact like this. So, I just now imported and tried the example in the "Soft Fonts" example on the RA8875 Library page.

The example is configured in main for an 800x480 display. It installed and ran as expected, then saved a bitmap on the localfilesystem (that was quite a slow process).

/media/uploads/WiredHome/file.png

The mbed site would not let me upload the 'bmp' file, so I converted it to .png with Paint.net. It is otherwise exactly as intended.

So, for you - do you know what version you had before the update?

  • Does everything but the fonts work? A really long time ago, (v97 and prior), I supported an export from GLCD that created a "larger" memory footprint. But also a very long time ago I revised the font engine to use the alternate format that produces a much smaller memory footprint - v98 in December 2015. There were other Soft Font changes a little more recently related to Window() constraints.
  • I have definitely found sensitivity to the MBED OS version. I usually use OS2. This specific demo has OS2 v137. Did you also update the OS? What version? I found that some versions after about v128 started declining - SPI, or microSD, or USB, or some other essential services to my apps suddenly failed in mysterious ways, so most of my OS2 is between v118 and low v13x.
  • Backlight setting - if you mbed and the display are powered from your PC port, and the first backlight commnand it too high, the PC port might not provide enough power and shutdown.

Hi David, you're not gonna believe this but I'm using steam driven rev.85 of you library that works fine I only updated to try and help the white screen guy when I hit that problem. I still had a copy of the old one so put that back for now.

I'm sure OS5 is good for some users but I prefer a 'bare-metal' system. I only use OS2 mainly Mbed-dev , some versions going back 3 years although the current rev.187 seems quite stable.

I didn't notice any other problems but did not go into it too far. I have quite a few font files that I use with my displays so I do need to be able to use these like I could in rev. 85. I'll look into it a bit more tomorrow. I'll also run some tests on this white screen issue, it smells of data noise during initialization and we really could use a higher SPI data rate to the RA8875, read back is not an issue. Problem with Bust SPI is its target specific and there are just too many on Mbed now.

posted by Paul Staron 08 Mar 2019

ok, so it was the change in the font engine at v98 that is causing your font issue.

And I certainly understand staying on a known stable version. If you do find the mood to experiment, I'd of course encourage an update - If you have the original TTF files, the procedure to generate the new format is reasonably well documented and goes pretty fast after the 2nd or 3rd one. And in the font folder of my library is a "FontMods.h" file that is a perl script to post-process the glcd font files to force a few constraints - even with proportional fonts, I like the digits to be fixed width - just seems to fit the screen better for my apps (clocks and other numeric information that stays "fixed" in position.

posted by David Smart 08 Mar 2019

You need to log in to post a question