From owner-freebsd-current Sat Oct 26 12:59:43 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE0A437B401; Sat, 26 Oct 2002 12:59:41 -0700 (PDT) Received: from gull.mail.pas.earthlink.net (gull.mail.pas.earthlink.net [207.217.120.84]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6AFDC43E3B; Sat, 26 Oct 2002 12:59:41 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0235.cvx22-bradley.dialup.earthlink.net ([209.179.198.235] helo=mindspring.com) by gull.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 185X5S-0005W4-00; Sat, 26 Oct 2002 12:59:10 -0700 Message-ID: <3DBAF3C5.2EAA5CDA@mindspring.com> Date: Sat, 26 Oct 2002 12:57:57 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Wesley Morgan Cc: Ollivier Robert , freebsd-current@FreeBSD.ORG, ports@FreeBSD.ORG Subject: Re: Type1 font problem (Was: Re: mozilla-devel problems) References: <20021026125528.O93068-100000@volatile.chemikals.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Wesley Morgan wrote: > Im my many hours of playing with fonts, I seem to recall that the Freetype > / XFT module is perfectly capable of rendering the Type1 fonts. Make sure > you take the PATH out of your XftConfig in addition to the XF86Config Some fonts have characters with a zero width, and you have to calculate from the left and right bearing, instead. One of the original NCD fonts had this problem, e.g.: XFontStruct *fontp; int w1, w2; ... w1 = fontp->per_char[ charnum].width; w2 = fontp->per_char[ charnum].lbearing + fontp->per_char[ charnum].rbearing; if( w1 != w2) printf( "This is a problem font!\n"); The problem only appears if you do the output a character at a time and take care of spacing yourself, instead of letting the Xlib XText functions deal with it. I had the problem on a terminal emulation program, where the text needed to be rendered fixed cell, in all cases, in order to line up properly, regardless of the font. So I used the "em" of the font, and rendered all characters manually, rather than using the XLib routine, which "did the right thing". What it looks like to me is that someone has made some assumptions about the font fields relationship to cell size, and these are not correct for the font in question. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message