Page 1 of 1

Creating digits that fill an entire graphical display

Posted: Sun Jan 23, 2022 4:48 pm
by Ariko
Is there a way to display digits that fill the entire display area on a graphical display, e.g. any of the colour display models that are available within flowcode?
Using the print string function and the extended font size (i.e. parameter 31) it is possible to increase the display font by 6 times in width and height. But I have an application where I need to display 4 digits at the full height of the display so they can be read from a distance. The digits are the results of a measured value and therefore are likely to change with each measurement sample.

The particular display I wish to use has a ILI9341 driver and is operated via SPI.

Can anyone explain how do to create digits that fill the entire display area?

Many thanks
Ari

Re: Creating digits that fill an entire graphical display

Posted: Mon Jan 24, 2022 5:14 pm
by Benj
Hello Ari,

The font on the gLCD in v8 is 6 pixels wide and 8 pixels high and so you could do something like this.

scaler = display_height / 8

if (scaler * 6 * num_characters) > display_width

then scaler = display_width / (num_characters * 6)

This way the full height of the display will be used unless this would mean you can't fit everything on horizontally. It should scale so you always get the biggest font scaling without stretching the characters.

Re: Creating digits that fill an entire graphical display

Posted: Wed Jan 26, 2022 8:38 am
by Ariko
Ben,

Thank you for your quick reply. My question was perhaps a little more fundamental. Using the graphical display components in flowcode how do I increase the size of the font beyond the preset options provided?

Is there a scaler parameter that can be exposed within the display component or do I need to forget the dedicated display component and write pixel data to the display via the SPI Comms component to create large size digits? E.g. like sending a bitmap image of each digit to the display.

I have searched the forum for an example to point me in right direction but I as yet I have not found anything similar to what I need.

No doubt your advice to dynamically change the scale will be useful once I get the basic idea of how to write the large digits to the display.

Thanks

Ari

Re: Creating digits that fill an entire graphical display

Posted: Wed Jan 26, 2022 11:46 am
by Benj
Hello Ari,

In Flowcode v8 the font sizes are fixed. In Flowcode v9 we have a fully dynamic font scaler and also a range of different fonts so very large text can look very nice.

Unfortunatley there was a lot of work done to make this happen behind the scenes and so the v9 components are not compatible with v8. You could maybe try the 30-day trial of v9 and see if it improves things for you.