jtsiomb / libdrawtext

Simple library for fast anti-aliased text rendering in OpenGL
GNU Lesser General Public License v3.0
86 stars 13 forks source link

Does greyscale make sense for dtx_save_glyphmap_stream? #5

Closed nigels-com closed 7 years ago

nigels-com commented 7 years ago

I'm interested in using libdrawtext with pre-cooked glyphmap files, perhaps gzipped.

I noticed in the implementation that P6 PPM RGB mode is being used, but that P5 PGM greyscale could be used to reduce the file size. Seems like dtx_load_glyphmap_stream could be extended to support P5 for input.

-rw-r--r--   1 nigels  staff   1.0M 25 Jun 20:15 linux-biolinum_s96_r0020-007f.glyphmap
-rw-r--r--   1 nigels  staff    48K 25 Jun 20:15 linux-biolinum_s96_r0020-007f.pgm.gz
-rw-r--r--   1 nigels  staff    82K 25 Jun 19:58 linux-biolinum_s96_r0020-007f.ppm.gz
jtsiomb commented 7 years ago

Good point :)

Implemented, commit: f7693a8 Please re-open the issue if you encounter any problems with this.