/var/www/restricted/ssh/stm32/www/stm32circle/ STM CircleOS forum / Unable to use a Larger Font in App

Username:     
Password:     
             

Forum

# 1   2009-06-25 14:12:26 Unable to use a Larger Font in App

hairykiwi
New member
From: Ledbury, UK
Registered: 2009-05-31
Posts: 9

Unable to use a Larger Font in App

I'm trying to use a larger font I created for my app.

I tried to #undef CHAR_WIDTH and CHAR_HEIGHT then re #define both - with no luck.

Any suggestions? I know, it's probably a basic C question - but I am a C novice, so any pointers roll really appreciated.

BTW, I have managed to use LCD_SetFont( myfont ); with an included header file containing a subset of modified characters based on the 7 x 14 characters from LCD.c.


PS (BitFontCreator 2.3.1 seems to be the best of three shareware's I've tried for auto-generating code, but each character must be drawn upside-down (or mirrored horizontally after) for the hex values to be in the correct sequence for the Primer2.) Or there's Simon's free excel spreadsheet for 7x14 chars in the CharacterGenerator-1.0 project - thanks for that.

Offline

 

# 2   2009-06-25 14:22:01 Unable to use a Larger Font in App

Mysterio
Member
From: Germany/NRW
Registered: 2009-05-22
Posts: 23

Re: Unable to use a Larger Font in App

Try that before you use the DRAW_DisplayString Command:

DRAW_SetCharMagniCoeff(2);

and don't forget to set:

DRAW_SetCharMagniCoeff(1);

after the DRAW_DisplayString Command

Last edited by Mysterio (2009-06-25 14:22:22)


The only definitly knowledge we have, is that we don't know anything. -Sokrates-

Offline

 

# 3   2009-06-25 15:24:10 Unable to use a Larger Font in App

hairykiwi
New member
From: Ledbury, UK
Registered: 2009-05-31
Posts: 9

Re: Unable to use a Larger Font in App

Hi Mysterio, Thanks for the suggestion, but I'm sure this is not a factor.

I've been using LCD_DisplayChar (u8 x, u8 y, u8 Ascii, u16 TextColor, u16 BGndColor, u16 CharMagniCoeff) to place the characters and the "CharMagniCoeff" in that function is analogous to what you're suggesting.

I'm not trying to use a larger size of the default font, I've created my own font with a larger default size (12x21) and I want to be able to call those chars onto the screen.

Cheers,
Hamish

Offline

 

# 4   2009-06-25 16:40:39 Unable to use a Larger Font in App

Francis
Administrator
From: France-Grenoble
Registered: 2007-07-09
Posts: 890

Re: Unable to use a Larger Font in App

At the moment, you can modify the font, but not the default size that is fixed in CircleOS. For a future version, you could try to modify draw.c in CircleOS to accept multiple size (and we will publish your changes). But the current SetFont has been introduced only to introduce missing characters.

Offline

 

# 5   2009-06-25 16:58:29 Unable to use a Larger Font in App

hairykiwi
New member
From: Ledbury, UK
Registered: 2009-05-31
Posts: 9

Re: Unable to use a Larger Font in App

Many thanks for the quick reply Francis!

Thanks for the starting place too.

Offline

 

Board footer