MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / psl_def_font_encoding

Function psl_def_font_encoding

src/postscriptlight.c:3121–3137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3119#endif
3120
3121static void psl_def_font_encoding (struct PSL_CTRL *PSL) {
3122 /* Initialize book-keeping for font encoding and write font macros */
3123
3124 int i;
3125
3126 /* Initialize T/F array for font reencoding so that we only do it once
3127 * for each font that is used */
3128
3129 PSL_command (PSL, "/PSL_font_encode ");
3130 for (i = 0; i < PSL->internal.N_FONTS; i++) PSL_command (PSL, "0 ");
3131 PSL_command (PSL, "%d array astore def", PSL->internal.N_FONTS);
3132 (PSL->internal.comments) ? PSL_command (PSL, "\t%% Initially zero\n") : PSL_command (PSL, "\n");
3133
3134 /* Define font macros (see postscriptlight.h for details on how to add fonts) */
3135
3136 for (i = 0; i < PSL->internal.N_FONTS; i++) PSL_command (PSL, "/F%d {/%s Y}!\n", i, PSL->internal.font[i].name);
3137}
3138
3139static int psl_bitreduce (struct PSL_CTRL *PSL, unsigned char *buffer, int nx, int ny, size_t ncolors) {
3140 /* Reduce an 8-bit stream to 1-, 2- or 4-bit stream */

Callers 1

PSL_beginplotFunction · 0.85

Calls 1

PSL_commandFunction · 0.85

Tested by

no test coverage detected