[comp.windows.x] bdftosnf doesn't like non-square pixels

mouse@LARRY.MCRCIM.MCGILL.EDU (09/29/90)

                     [being sent to xpert and xbugs both]

			  X Window System Bug Report
			    xbugs@expo.lcs.mit.edu


VERSION:
    R4

CLIENT MACHINE and OPERATING SYSTEM:
    N/A

DISPLAY TYPE:
    N/A

WINDOW MANAGER:
    N/A

AREA:
    bdftosnf

SYNOPSIS:
    bdftosnf gets upset over bdf files designed for non-square pixels.

DESCRIPTION:
    When bdftosnf is fed a bdf file whose SIZE line indicates that the
    font was designed for non-square pixels, it produces a complaint
    and dies isntead of doing anything sensible.

REPEAT BY:
    Try to run this through bdftosnf, or just look at the code:

	STARTFONT 2.1
	FONT testfont
	SIZE 10 75 100
	FONTBOUNDINGBOX 4 4 0 0
	STARTPROPERTIES 3
	DEFAULT_CHAR 0
	FONT_DESCENT 3
	FONT_ASCENT 10
	ENDPROPERTIES
	CHARS 1
	STARTCHAR testchar
	ENCODING 0
	SWIDTH 384 0
	DWIDTH 4 0
	BBX 4 4 0 0
	BITMAP
	f0
	f0
	f0
	f0
	ENDCHAR
	ENDFONT

SAMPLE FIX:

    I'm not confident this is the correct fix.  Only xRes is ever
    actually used, and then only if a RESOLUTION property is not
    provided.  I can't see what the check is doing there in the first
    place, but presumably whoever wrote it thought it was a good idea.

	*** /local/src/bin/X11R4/mit/fonts/bdftosnf/bdftosnf.c	Thu Jan 11 13:25:41 1990
	--- /tmp/bdftosnf.c	Fri Sep 28 15:06:07 1990
	***************
	*** 453,460 ****
	  	fatal("bad 'SIZE'");
	      if ((pointSize < 1) || (xRes < 1) || (yRes < 1))
	  	fatal("SIZE values must be > 0");
	-     if (xRes != yRes)
	-         fatal("x and y resolution must be equal");
	      getline(linebuf);
	  
	      if (!prefix(linebuf, "FONTBOUNDINGBOX"))
	--- 453,458 ----

					der Mouse

			old: mcgill-vision!mouse
			new: mouse@larry.mcrcim.mcgill.edu