When compiling with the UFST fontrasterizer and printing attached testfile (selecting lineprinter font) and printing the '?' character a ' ' (space) is printed instead. When using AFS it is printed correctly. Caused by this piece of code in pctext.c :: get_next_char() if (plfont->storage == pcds_internal && chr == 0x0020) { *pis_space = true; *pchr = 0xffff; return 0; } Bug appeared with revision 10645 (change in pctext.c) /* check if the character is in the font and get the character width at the same time */ I.e. pl_map_symbol(...) returned (chr = 32) the '?' has key=32 in the pl_map_m2u[] (With AFS the pl_map_symbol() skips the pl_map_Unicode_to_MSL() because of is_MSL == 0 (with UFST is_MSL == 1). pl_load_ufst_lineprinter() in plulfont.c sets the lineprinterfont to be MSL.
Created attachment 5930 [details] lineprinter_questionmark.pcl testfile selecting lineprinterfont and printing the '?' causes a ' ' (space) to be printed when using UFST i.s.o. AFS fontrasterizer.
Created attachment 5931 [details] lineprinter_questionmark.pcl testfile selecting lineprinterfont and printing the '?' causes a ' ' (space) to be printed when using UFST i.s.o. AFS fontrasterizer.
Comment on attachment 5930 [details] lineprinter_questionmark.pcl I submitted the testfile twice :( I seem to have a very slow connection, so I thought it failed.
*** Bug 691097 has been marked as a duplicate of this bug. ***
if (plfont->storage == pcds_internal && chr == 0x0020 && plfont->font_type != 10) /* not for bitmapfonts */ The above fixed it for me , but you could also look for plfont->params.typeface_family != 0 (i.e. lineprinter), so I don't know what the best fix is. Or perhaps re-order the characters in plulp.c in such a way that the space character gets key=32 i.s.o. the '?' character. ???
Sorry I checked that in to minimize regression difference between the branch pcl_font_mods and head. I wasn't expecting someone to check out head and use the ufst but I'll keep it (head) correct from here on out.
Fixed 10686. Thanks for the report Norbert.
I was just 'pre-flighting' the coming 8.71 release, to see how the memory consumption of the xps (excellent) is now (backporting that to 8.70 was too risky/much work). And as we have also automated testing in place ...