libdrawtext
diff src/drawtext.h @ 22:df6d52b36bd6
- properly supported building of no-freetype version, separately installed as libdrawtext-noft.whatever
- saving/loading glyphmaps now work correctly
- added nofreetype program in examples, to illustrate how to use libdrawtext-noft with prebuilt glyphmaps (see tools/font2glyphmap)
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Tue, 15 Apr 2014 05:10:39 +0300 |
parents | c750059a1258 |
children | 5beaab3df0cb |
line diff
1.1 --- a/src/drawtext.h Tue Apr 15 03:33:39 2014 +0300 1.2 +++ b/src/drawtext.h Tue Apr 15 05:10:39 2014 +0300 1.3 @@ -50,6 +50,11 @@ 1.4 * nothing will be rendered. 1.5 */ 1.6 struct dtx_font *dtx_open_font(const char *fname, int sz); 1.7 +/* open a font by loading a precompiled glyphmap (see: dtx_save_glyphmap) 1.8 + * this works even when compiled without freetype support 1.9 + */ 1.10 +struct dtx_font *dtx_open_font_glyphmap(const char *fname); 1.11 +/* close a font opened by either of the above */ 1.12 void dtx_close_font(struct dtx_font *fnt); 1.13 1.14 /* prepare an ASCII glyphmap for the specified font size */ 1.15 @@ -89,6 +94,8 @@ 1.16 int dtx_save_glyphmap(const char *fname, const struct dtx_glyphmap *gmap); 1.17 int dtx_save_glyphmap_stream(FILE *fp, const struct dtx_glyphmap *gmap); 1.18 1.19 +/* adds a glyphmap to a font */ 1.20 +void dtx_add_glyphmap(struct dtx_font *fnt, struct dtx_glyphmap *gmap); 1.21 1.22 /* ---- rendering ---- */ 1.23