kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #24203
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 14:23:31 +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:
<570F9D66.4040208@cern.ch>
-
Spamdiagnosticmetadata:
NSPM
-
Spamdiagnosticoutput:
1:23
-
Thread-index:
AQHRljDKSZfQH9Jxz0OnrWJyErhIHJ+JOPvngAAG4QCAAAGxSYAAOAEAgAAKBg4=
-
Thread-topic:
[Kicad-developers] Bitmap fonts
ya I think so :)
My suggestion was:
Lets say you create that big texture with 32px
now you create a new texture (half of the size?) for 16px size
... etc
When render the text, you have to select the right size / texture
If you are rendering at size 0.5 .. to 1.0 you will use the 32px texture
but if you are rendering <0.5 you will use the 16px texture at scale 1:1
.. something like that ..
This would be like a manual "midmapping"
In another way, in my opinion, the best approach would be: you will never scale the original texture scale, and render it always on the original size, so there will be no resize artifacts. (and in this case you would need different textures sizes for different discrete sizes)
but if you manage to enable the midmapping in opengl and see that it works OKs.. so I guess that it "will work for now"
.. but mind that the openGL midmapping may be an overwriten quality option by the system configuration.
my 2 cents (of €uro)! :P
Mario
________________________________________
From: Maciej Sumiński [maciej.suminski@xxxxxxx]
Sent: 14 April 2016 14:38
To: Mário Luzeiro; KiCad Developers
Subject: Re: [Kicad-developers] 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
Follow ups
References