kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #24197
Re: Bitmap fonts
-
To:
Maciej Sumiński <maciej.suminski@xxxxxxx>, "KiCad Developers" <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
From:
Mário Luzeiro <mrluzeiro@xxxxx>
-
Date:
Thu, 14 Apr 2016 10:25:16 +0000
-
Accept-language:
en-GB, en-US
-
Authentication-results:
cern.ch; dkim=none (message not signed) header.d=none;cern.ch; dmarc=none action=none header.from=ua.pt;
-
In-reply-to:
<570F6D00.1090601@cern.ch>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:23
-
Thread-index:
AQHRljDKSZfQH9Jxz0OnrWJyErhIHJ+JOPvngAAG4QCAAAGxSQ==
-
Thread-topic:
[Kicad-developers] 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