noto-sans-mono-bitmap-rs icon indicating copy to clipboard operation
noto-sans-mono-bitmap-rs copied to clipboard

Gamma correction

Open toothbrush7777777 opened this issue 1 year ago • 3 comments

Should the font image values be gamma-corrected for standard displays (i.e. sRGB) instead of being linear intensities? In other words, should the values be linear_to_srgb(intensity)?

It isn't very hard to filter the values when creating the font images – this can be done with a 256-byte lookup table – and would be a lot faster than doing so when using the values to create the fonts.

The characters look better and less blurry after gamma correction for sRGB displays.

toothbrush7777777 avatar Apr 27 '24 23:04 toothbrush7777777

Sounds correct, yes. TBH, I never thought about this.

phip1611 avatar Apr 28 '24 07:04 phip1611

Yeah, I messed around with gamma encoding a bit when I was writing a physically-based renderer a few months ago, and gamma correction is absolutely vital for any kind of realistic render.

Gamma correction is not such a huge deal for standard GUIs, but I noticed that the font on low-PPI displays looks a lot better with gamma correction.

Shall I create a pull request for that?

toothbrush7777777 avatar Apr 28 '24 18:04 toothbrush7777777

Shall I create a pull request for that?

Yes, I will appreciate that very much!

phip1611 avatar Aug 12 '24 13:08 phip1611