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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to