kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #24199
Re: Bitmap fonts
On 04/14/2016 12:25 PM, Mário Luzeiro wrote:
>> 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)
I am not sure if I understand correctly. Do you propose just a few font
sizes available as separate textures? E.g. there are atlases for font
sizes: 8px, 16px, 24px, 32px and we use exclusively these values?
Cheers,
Orson
> 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
>
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups
References