Start a new topic
Solved

Wrong font size

I created 2 fonts with the build infont generator.

Font 0 is "Calibri" as "iso-8859-1" in size 16 and font 1 is Arial also as "iso-8859-1" in size 16.


It doesnt matter what font I choose the letters "M" and "W" are always a small "m" and "w".

But not only this... the "m" and "w" are also smaller than the "normal" small letters if I write everything in small letters.


Also the spacing between the fonts are not equal and some letters are "fusioned" (look at the upper "CD" letters or even cut (look at the "O" or "Ö").


What can I do to prevent this problems?

The picture in the attachment is the font "Calibri".


Use a Fixed Width Monospace font such as

  Consolas, Terminal, Lucida Console ... and many, many more.


Fonts are height in multiples of eight.

Fonts are widths of 1/2 your selected height.

Therefore 4x8  8x16 12x24 16x32 .. 80x160


When you use a font where characters are 17x16 such as W and @

and try to squeeze them into the space of 8x16 ...

The result is too many pixels within the space allotted.

 - this triggers a scaling of the font to a smaller size until the letter fits.


Alternatively you can use a ZI Font Editor to adjust to suit your needs.

This is not a bug, embedded font is width = 1/2 of height.

Such does not occur when using a font that is suited.

For the record, look at the picture you attached.

M is not reduced to a m.

Lowercase m is curved/rounded, The Capital case M is sharp.

This is a reduction in size, not a translation to another char.


Thanks Patrick for you fast and helpful answer.

I didnt know this.
You probably answered similar questions a lot of times.... there is sadly no good documentation or a tutorial so that every beginner wont have these questions.

With Lucida Console it works perfectly ^^

 

Align thoughts to MCU one must ... the MCU must be  =)


An MCU is a much less capable device than a desktop.

Everything therefore is much less complex.

The calculations and tracking required for a Variable width ...


Fixed width is less computations

   7th character is starts at (7-1)*width and ends 7*width-1

One has to think in terms of old school Vic 20s


Not impossible to do Variable Width

  but your coding becomes very case specific and less generic

http://support.iteadstudio.com/support/discussions/topics/11000013380

Login or Signup to post a comment