← Back to team overview

kicad-developers team mailing list archive

Re: Bitmap fonts

 

> But I like your idea, mipmapping could enhance the result.

I was expecting that the openGL midmapping could help.. but.. looking in your screenshots and thinking generally, It would be better to proper render the anti-aliased font in a set of textures.
"render anti-aliased font for the different sizes" != "midmapping" (I guess!)

So you have to manually select the texture font and scale to apply to the char square.
You may try to do it dynamically (probably as you are already doing it)

Btw.. this is a technique widely used in videogames, but as far as I know, most of the times they use "one font size" -> "one texture" and it is not common to have different text scales on/using the same font/texture
Thats it why you need to go more tricky here.. :)

Mario
________________________________________
From: Maciej Sumiński [maciej.suminski@xxxxxxx]
Sent: 14 April 2016 11:12
To: Mário Luzeiro; KiCad Developers
Subject: Re: [Kicad-developers] Bitmap fonts

Hi Mario,

On 04/14/2016 12:00 PM, Mário Luzeiro wrote:
> Hi Orson,
>
> If I understand correctly that would be the font for non board items.

That is right. As labels are not stored in Gerber files, it is save to
use any kind of font to display them. Contrary, board items should apply
to WYSIWYG rule.

> Textures fonts are a good fast way of implement fonts.
> But it may suffer from scaling issues, as we can see in your screenshots in the very small size (they are not render properly, C2: pin 1.. etc)
> So you may need to pre-render the font in difference sizes (to different textures) to be used the appropriate one in the final render.

The same problem applies to the original, stroked font - the net label
is just very small. But I like your idea, mipmapping could enhance the
result.

> I do believe it should be possible to also cache the board text (comments, silk..etc) but I believe that will be more challenged...
> (this may need different hierarchically caches.. and complexity raise)

True. For the moment I hope the overall performance is enough for
complex boards, so we do not have to think about more entangled solutions.

Regards,
Orson


Follow ups

References