If printing attached testfile lpr2test.pcl on very high resolution (600dpi), then the characters 'AB' are outlined i.s.o. rasterized. I.e. image_outline_char()is used in pluchar.c However, the points provided by UFST are mirrored with respect to Y direction, resulting in a mirrored outline. OLD code (line 196 in pluchar.c from trunk) while (numSegmts-- > 0) { int segtype = *pseg++; int ip, npts; gs_fixed_point pt[3]; if (segtype == 2 || segtype > 3) return_error(gs_error_rangecheck); npts = (segtype == 3 ? 3 : 1); for (ip = 0; ip < npts; ip++, ++pcoord) { pt[ip].x = (pcoord->x << ishift) + tx; pt[ip].y = (pcoord->y << ishift) + ty; } fixed code: while (numSegmts-- > 0) { int segtype = *pseg++; int ip, npts; gs_fixed_point pt[3]; if (segtype == 2 || segtype > 3) return_error(gs_error_rangecheck); npts = (segtype == 3 ? 3 : 1); for (ip = 0; ip < npts; ip++, ++pcoord) { pt[ip].x = (pcoord->x << ishift) + tx; pt[ip].y = (-pcoord->y << ishift) + ty; } Notice the '-' sign. ^
In order to switch to outline character for very large characters the test for this is to be extended in pl_ufst_make_char() /* if too large for a bitmap, try an outline */ #if 1 if ((status >= ERR_bm_gt_oron && status <= ERRdu_pix_range) || (status == ERR_bm_buff)) #else if (status >= ERR_bm_gt_oron && status <= ERRdu_pix_range) #endif { pfc->format = (pfc->format & ~FC_BITMAP_TYPE) | FC_CUBIC_TYPE; if ((status = CGIFfont(FSA pfc)) == 0) { CGIFchIdptr(FSA (VOID *)&chIdloc, NULL); status = CGIFchar_handle(FSA chr, &memhdl, 0); } }
Created attachment 4825 [details] lpr2test.pcl compile pcl with ufst (i.e. make udebug) ufst-debugobj/pcl6 -sDEVICE=jpeg -r600 -sOutputFile=largechar.jpg lpr2test.pcl in the resulting jpg-image the characters are vertically (y-direction) mirrored. NOTE: for this to work the ERR_bm_buff should be checked also in pl_ufst_make_char()
Is there some reason you did not concatenate the reflection on to the ctm? Other than that I'll go ahead and commit your changes.
I agree that mirroring in the CTM is indeed a better solution. But I was not sure how to do this, and if this would not interfere with other page grafics/text. And this worked for me. Is is A solution not THE solution. ;)
It looks like your solution is correct. We are just pushing the coordinates through assuming identity scaling with a translation, the low level path operators gx_path* are used which assume coordinates have already been put in device space. I haven't looked at the ufst code in a while, so bear with me. I am somewhat alarmed this is broken. I do recall it working years back, I wonder if the ufst has changed. Note the metrics in the outline case are suspect, obviously the branch has not been exercised lately. Thanks for the fix, it is in revision 9571.
Woops, this change is not complete. We note regressions in the pcl UFST configuration, pcl 5e fts pages beginning with these panel numbers have errors: 0664, 0750, 0790, 1190, 1222 and a few others. In all cases the characters are rotated and should not be.
Fixed in revision 9825. We have tested the fts visually, our full regression tests currently do not support the ufst font so let me know if you see any problems. I don't expect any problems, the change is straightforward.
Changing customer bugs that have been resolved more than a year ago to closed.