Re: [Fonts] freetype module sometimes gets font height (descent?) wrong

2004-02-21 Thread Chisato Yamauchi
From: Michael Lampe <[EMAIL PROTECTED]>
Subject: [Fonts] freetype module sometimes gets font height (descent?) wrong
Date: Fri, 20 Feb 2004 17:39:58 +0100

> xlsfonts lists the font in question.
> 
> Emacs bluntly says "No fonts match ..." and aborts.
> 
> xfd seems to use it, but displays "unknown font" in the first line. And 
> contrary to what I said before you can see the overall problem with xfd 
> too if you increase the font size.

  OK. That patch was broken.  I somewhat misunderstood...

> I'm still wondering if you are able to reproduce what I'm talking about. 
>   Please try
> 
> xedit
>   -fn "-monotype-courier new-medium-r-normal--12-0-100-100-m-0-iso8859-1"
> 
> Two small images of what it looks like for me are here:
> 
> http://cox.iwr.uni-heidelberg.de/~lampe/xedit-xtt.png
> http://cox.iwr.uni-heidelberg.de/~lampe/xedit-freetype.png

  I cannot reprodeuce them using xedit... Why?   How is your 
"resolution" of xdpyinfo.  100x100 dots per inch?

  I attach "fontpropdump.c".  Would you tell me the results of
"freetype" and "xtt"?

  usage:

  ./fontpropdump "-monotype-courier new-medium-r-normal--12-0-100-100-m-0-iso8859-1"

  Here are my results:

[X-TT]
PIXEL_SIZE : 12
POINT_SIZE : 87
RESOLUTION_X : 100
RESOLUTION_Y : 100
AVERAGE_WIDTH : 70
RAW_AVERAGE_WIDTH : 6001
FONT_ASCENT : 11
RAW_ASCENT : (none)
FONT_DESCENT : 4
RAW_DESCENT : (none)
SUBSCRIPT_SIZE : 8
SUBSCRIPT_X : 0
SUBSCRIPT_Y : 2
SUPERSCRIPT_SIZE : 8
SUPERSCRIPT_X : 0
SUPERSCRIPT_Y : 5
UNDERLINE_THICKNESS : 1
UNDERLINE_POSITION : 3
RAW_PIXEL_SIZE : (none)
RAW_POINT_SIZE : (none)

[FreeType]
PIXEL_SIZE : 12
POINT_SIZE : 87
RESOLUTION_X : 100
RESOLUTION_Y : 100
AVERAGE_WIDTH : 70
RAW_AVERAGE_WIDTH : 600
FONT_ASCENT : (none)
RAW_ASCENT : 832
FONT_DESCENT : (none)
RAW_DESCENT : 300
SUBSCRIPT_SIZE : (none)
SUBSCRIPT_X : (none)
SUBSCRIPT_Y : (none)
SUPERSCRIPT_SIZE : (none)
SUPERSCRIPT_X : (none)
SUPERSCRIPT_Y : (none)
UNDERLINE_THICKNESS : (none)
UNDERLINE_POSITION : (none)
RAW_PIXEL_SIZE : 1000
RAW_POINT_SIZE : 723

  The resolution of Xserver is 100x100 dots per inch.


Chisato Yamauchi
#include 
#include 

int main( int argc, char *argv[] )
{
Display *dis;
XFontStruct *fs;
Atom atom;
unsigned long val;
char *name;
Bool result;
char *props[] = {
"PIXEL_SIZE",
"POINT_SIZE",
"RESOLUTION_X",
"RESOLUTION_Y",
"AVERAGE_WIDTH",
"RAW_AVERAGE_WIDTH",
"FONT_ASCENT",
"RAW_ASCENT",
"FONT_DESCENT",
"RAW_DESCENT",
"SUBSCRIPT_SIZE",
"SUBSCRIPT_X",
"SUBSCRIPT_Y",
"SUPERSCRIPT_SIZE",
"SUPERSCRIPT_X",
"SUPERSCRIPT_Y",
"UNDERLINE_THICKNESS",
"UNDERLINE_POSITION",
"RAW_PIXEL_SIZE",
"RAW_POINT_SIZE",
NULL,
};
int i;

if( argc < 2 ) return -1;
dis=XOpenDisplay(NULL);
fs = XLoadQueryFont(dis,argv[1]);
if( fs==NULL ) return -1;

i=0;
while ( props[i] != NULL ) {
atom = XInternAtom(dis, props[i], True);
result = XGetFontProperty(fs,atom,&val);
if ( result )
printf("%s : %d\n",props[i],val);
else
printf("%s : (none)\n",props[i]);
i++;
}
return 0;
}



Re: [Fonts] freetype module sometimes gets font height (descent?) wrong

2004-02-21 Thread Chisato Yamauchi
From: Chisato Yamauchi <[EMAIL PROTECTED]>
Subject: Re: [Fonts] freetype module sometimes gets font height (descent?) wrong
Date: Sat, 21 Feb 2004 20:32:28 +0900 (JST)

  Sorry,

> [X-TT]

  s/X-TT/FreeType/

> PIXEL_SIZE : 12
> POINT_SIZE : 87
> RESOLUTION_X : 100
> RESOLUTION_Y : 100
> AVERAGE_WIDTH : 70
> RAW_AVERAGE_WIDTH : 6001
> FONT_ASCENT : 11
> RAW_ASCENT : (none)
> FONT_DESCENT : 4
> RAW_DESCENT : (none)
> SUBSCRIPT_SIZE : 8
> SUBSCRIPT_X : 0
> SUBSCRIPT_Y : 2
> SUPERSCRIPT_SIZE : 8
> SUPERSCRIPT_X : 0
> SUPERSCRIPT_Y : 5
> UNDERLINE_THICKNESS : 1
> UNDERLINE_POSITION : 3
> RAW_PIXEL_SIZE : (none)
> RAW_POINT_SIZE : (none)
> 
> [FreeType]

  s/FreeType/X-TT/

> PIXEL_SIZE : 12
> POINT_SIZE : 87
> RESOLUTION_X : 100
> RESOLUTION_Y : 100
> AVERAGE_WIDTH : 70
> RAW_AVERAGE_WIDTH : 600
> FONT_ASCENT : (none)
> RAW_ASCENT : 832
> FONT_DESCENT : (none)
> RAW_DESCENT : 300
> SUBSCRIPT_SIZE : (none)
> SUBSCRIPT_X : (none)
> SUBSCRIPT_Y : (none)
> SUPERSCRIPT_SIZE : (none)
> SUPERSCRIPT_X : (none)
> SUPERSCRIPT_Y : (none)
> UNDERLINE_THICKNESS : (none)
> UNDERLINE_POSITION : (none)
> RAW_PIXEL_SIZE : 1000
> RAW_POINT_SIZE : 723


Chisato Yamauchi
___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts


Re: [Fonts] freetype module sometimes gets font height (descent?)

2004-02-21 Thread Michael Lampe
I cannot reprodeuce them using xedit... Why?   How is your 
"resolution" of xdpyinfo.  100x100 dots per inch?
Manually set to 75 dpi, real value is almost exactly 96 dpi. But this is
not the problem. If I replace '...-100-100-...' in the LFD with
'...-75-75-...' or enforce any other dpi value on the X server or let it 
choose its own, it's exactly the same.

fontpropdump with freetype:

PIXEL_SIZE : 12
POINT_SIZE : 87
RESOLUTION_X : 100
RESOLUTION_Y : 100
AVERAGE_WIDTH : 70
RAW_AVERAGE_WIDTH : 6001
FONT_ASCENT : 12  <<
RAW_ASCENT : (none)
FONT_DESCENT : 8  <<
RAW_DESCENT : (none)
SUBSCRIPT_SIZE : 8
SUBSCRIPT_X : 0
SUBSCRIPT_Y : 2
SUPERSCRIPT_SIZE : 8
SUPERSCRIPT_X : 0
SUPERSCRIPT_Y : 5
UNDERLINE_THICKNESS : 1
UNDERLINE_POSITION : 3
RAW_PIXEL_SIZE : (none)
RAW_POINT_SIZE : (none)
fontpropdump with xtt:

PIXEL_SIZE : 12
POINT_SIZE : 87
RESOLUTION_X : 100
RESOLUTION_Y : 100
AVERAGE_WIDTH : 70
RAW_AVERAGE_WIDTH : 600
FONT_ASCENT : (none)
RAW_ASCENT : 832
FONT_DESCENT : (none)
RAW_DESCENT : 300
SUBSCRIPT_SIZE : (none)
SUBSCRIPT_X : (none)
SUBSCRIPT_Y : (none)
SUPERSCRIPT_SIZE : (none)
SUPERSCRIPT_X : (none)
SUPERSCRIPT_Y : (none)
UNDERLINE_THICKNESS : (none)
UNDERLINE_POSITION : (none)
RAW_PIXEL_SIZE : 1000
RAW_POINT_SIZE : 723
Additionally, the fonts I'm using are e.g. available at 
http://openwebmail.360open.com/download/redhat/archive/webfonts/fonts/

-Michael

___
Fonts mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/fonts