Hi again Anuj,

> I have made the relevant changes in both freetype and freetype-demos.
> Please check the patches below. I have trimmed the 16bit 6.10 value to
> normalized 8 bit values.

Using signed char is a bit problematic because the FT_Bitmap buffer is
unsigned char. Going from signed to unsigned is well-defined, but
backwards is implementation-defined. Can we simply map distances like
this?

SDF = 128 * ( distance - spread ) / spread;

assuming positive values outside and clamping to [0,255]. Perhaps I am
worried too much and we should just warn about "signed 8 bit values".

Thanks,
Alexei

Reply via email to