[bug-pcl] minor pcl6 bug
Rengert, Mark
mrengert at redcom.com
Thu Apr 13 11:27:28 PDT 2006
Hi -
I had a problem with Windows-Encoded OpenType fonts giving an error message:
"could not extract font file name from file %s".
Specifically, there was a font called "vrinda.ttf" that was causing this
message.
Problem was in pl/pllfont.c function get_windows_name_from_tt_file(). There
was an assumption that the 4th entry in the name table was the one for the
NameID. This is not always true, you should search all the entries for the
one with ID 0x0004. Once I made this change all was well.
I am running Cygwin (with X11) under WinXP.
mrengert:vegas[659]% main/obj/pcl6
Usage: main/obj/pcl6 [option* file]+...
Options: -dNOPAUSE -E[#] -h -C -L<PCL|PCLXL> -n -K<maxK> -P<PCL5C|PCL5E|RTL>
-Z...
-sDEVICE=<dev> -g<W>x<H> -r<X>[x<Y>] -d{First|Last}Page=<#>
-sOutputFile=<file> (-s<option>=<string> | -d<option>[=<value>])*
-J<PJL commands>Version: 1.41
Build date: Thu Apr 13 09:32:02 2006
Devices: x11 x11alpha x11mono x11cmyk ljet4 djet500 cljet5pr cljet5c
bitcmyk bitrgb bitrgbtags tr_rgb pcxmono pcxgray pcxcmyk pswrite pdfwrite
pxlmono pxlcolor bmpmono bmpsep8 pbmraw pgmraw ppmraw jpeg bmpamono
bmpa16m bbox nullpage
mrengert:vegas[660]%
mrengert:vegas[661]% diff -bw pl/pllfont.c pl/pllfont.c.orig
116d115
< int rec;
118,122c117,120
< for ( rec = 0; rec < pl_get_uint16( name_table + 2 ); rec++
) {
< /* find NameID entry in name table - the complete name
*/
< if ( pl_get_uint16( name_recs + (12 * rec) + 6 ) ==
0x0004 ) {
< unsigned short length = pl_get_uint16( name_recs +
(12 * rec) + 8 );
< unsigned short offset = pl_get_uint16( name_recs +
(12 * rec) + 10 );
---
> {
> /* 4th entry in the name table - the complete name */
> unsigned short length = pl_get_uint16( name_recs + (12 *
4) + 8 );
> unsigned short offset = pl_get_uint16( name_recs + (12 *
4) + 10 );
130,131d127
< break;
< }
152a149
>
Also of note -- I was able to build under Cygwin with -lpthreads and X11
devices (no CYGWIN=TRUE), the only issue was that there is no libdl for the
-ldl option. Once that was removed it built OK.
Very cool program by the way - I find it extremely helpful.
--
Mark D. Rengert
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ghostscript.com/pipermail/bug-pcl/attachments/20060413/ab0783e1/attachment.htm
More information about the bug-pcl
mailing list