| 3119 | #endif |
| 3120 | |
| 3121 | static 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 | |
| 3139 | static 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 */ |
no test coverage detected