Date: Sat, 26 Oct 2002 12:57:57 -0700 From: Terry Lambert <tlambert2@mindspring.com> To: Wesley Morgan <morganw@chemikals.org> Cc: Ollivier Robert <roberto@keltia.freenix.fr>, freebsd-current@FreeBSD.ORG, ports@FreeBSD.ORG Subject: Re: Type1 font problem (Was: Re: mozilla-devel problems) Message-ID: <3DBAF3C5.2EAA5CDA@mindspring.com> References: <20021026125528.O93068-100000@volatile.chemikals.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3DBAF3C5.2EAA5CDA>