gs_font_dir * gslt_new_font_cache(gs_memory_t *mem) { gs_font_dir *fontdir; int smax = 50; /* number of scaled fonts */ int bmax = 500000; /* space for cached chars */ int mmax = 200; /* number of cached font/matrix pairs */ int cmax = 5000; /* number of cached chars */ int upper = 32000; /* max size of a single cached char */ fontdir = gs_font_dir_alloc2_limits(mem, mem, smax, bmax, mmax, cmax, upper); if (!fontdir) { gs_throw(-1, "cannot gs_font_dir_alloc2_limits()"); return NULL; } gs_setaligntopixels(fontdir, 1); /* no subpixels */ gs_setgridfittt(fontdir, 3); /* see gx_ttf_outline for values */ return fontdir; }
static int set_AlignToPixels(i_ctx_t *i_ctx_p, long val) { gs_setaligntopixels(ifont_dir, (uint)val); return 0; }