Closed GoogleCodeExporter closed 9 years ago
Here is the demo.
Original comment by wangyong...@gmail.com
on 7 Mar 2012 at 4:52
Attachments:
Why do you want to generate high resolution bitmap glyph to get distance field
before down sampling ? The final quality depends on the actual size in the
texture atlas and the distance field would be far more faster to compute on
such "small" glyphs, no ? Another technics would be to generate distance field
inplace each time you add a glyph int the texture atlas.
Anyway, I don't think that making this (genetating distance field) the default
behavior is a good idea since the rendering quality is not the same, especially
for small sizes.
Nicolas
Original comment by Nicolas.Rougier@gmail.com
on 7 Mar 2012 at 12:17
>> Why do you want to generate high resolution bitmap glyph to get distance
field before down sampling ?
Because the quality of distance field is depend on the resolution of original
bitmap. Especialy for characters that with complicate stroke, e.g. "聪", with
small bitmap strokes would mix together.
>> Another technics would be to generate distance field inplace each time you
add a glyph int the texture atlas.
Yes. But distance field bitmap always larger than the original one. How to
compute the actual size that it will take?
>> the rendering quality is not the same, especially for small sizes
Yes. It's a trade between quality and cost. The bigger the font point size, the
more texture you must consume. With distance field, you just need a constant
point size and could scale it much bigger with acceptable quality.
Original comment by wangyong...@gmail.com
on 8 Mar 2012 at 1:25
here is the compare of edt glyph (left) and freetype glyph (right)
http://i279.photobucket.com/albums/kk132/greatsorcerer/edt.png
Original comment by wangyong...@gmail.com
on 8 Mar 2012 at 1:35
I think the distance field is not larger than the original glyph because it
goes from outside to the inside. In the distance field demo, I just pack glyphs
as usual and then compute the distance field. Results seem correct to me.
And 1024x1024 is definitely too large for computing the distance field for a
single glyph.
Original comment by Nicolas.Rougier@gmail.com
on 8 Mar 2012 at 8:28
On the screenshot, at what size did you generate the distance field ?
If you don't mind, I will close this issuer since it might be better to talk
about that in the freetype-gl users group.
Original comment by Nicolas.Rougier@gmail.com
on 8 Mar 2012 at 8:31
On the screenshot, at what size did you generate the distance field ?
If you don't mind, I will close this issuer since it might be better to talk
about that in the freetype-gl users group.
Original comment by Nicolas.Rougier@gmail.com
on 8 Mar 2012 at 8:31
>> On the screenshot, at what size did you generate the distance field ?
1024x1024, then scale to 32x32
>> If you don't mind, I will close this issuer since it might be better to
talk about that in the freetype-gl users group.
It's OK. BTW, how can I join the freetype-gl users group ?
Original comment by wangyong...@gmail.com
on 9 Mar 2012 at 12:57
The address is: https://groups.google.com/forum/?fromgroups#!forum/freetype-gl
Either post and I will allow you forever or register (it's somewhere on the
page)
Original comment by Nicolas.Rougier@gmail.com
on 9 Mar 2012 at 7:20
Original issue reported on code.google.com by
wangyong...@gmail.com
on 7 Mar 2012 at 4:49Attachments: