On Tue, 6 Apr 1999, Matt Stupple wrote:
>>>>> "DF" == David Funk
<david(a)jna.com.au> writes:
DF> Hi. I am using Xemacs 21.0.67 under NT, and had a problem using
DF> my favourite fonts (e.g. the 6x13 font that comes with Reflection
DF> X).
DF>
DF> I traced this to 2 problems in objects-msw.c:
...snip...
DF> Having made these 2 changes, my favourite fonts now work.
As I don't have CVS access (don't you just love firewalls?) I'm stuck
on 21.0.66 for the moment. I applied the changes David suggested (for
the moment, I'm happy if I can get 6x13 even if it screws up other
charset-related stuff). Unfortunately after a rebuild I still can't
get 6x13 - are there any changes in .67 which would affect this?
I originally applied my changes to .66, and they worked fine. (Actually, I'm
still having trouble applying 6x13b to the bold face, but all others seem ok).
The file in question - objects-msw.c - didn't change from .66 to .67.
Any
suggestions on how to diagnose/fix (David?)
For starters:
1. Check the changes. The diff between the two files is thus:
$ diff objects-msw.c.modified objects-msw.c.orig
756d755
< {"Default" , DEFAULT_CHARSET},
986c985
< strcat (fontname, charset_map[0].name);
---
strcpy (fontname, charset_map[0].name);
2. Evaluate (list-fonts "")
Do you see the 6x13 fonts listed in the result? Are you using the
exact string lists there to specify the font?
3. Try running the attached program (ntfonts.c) to see if NT knows about
the font. I compile it with Visual C++ using: cl ntfonts.c gdi32.lib
It gives me the following results for 6x13:
Font: 6x13_0
Style:
Script: Unknown
lfHeight: 13
lfWidth: 6
lfEscapement: 0
lfOrientation: 0
lfWeight: 400
lfItalic: 0
lfUnderline: 0
lfStrikeOut: 0
lfCharSet: 44
lfOutPrecision: 1
lfClipPrecision: 2
lfQuality: 1
lfPitchAndFamily: 81
lfFaceName: 6x13_0
Font: 6x13b_0
Style:
Script: Unknown
lfHeight: 13
lfWidth: 6
lfEscapement: 0
lfOrientation: 0
lfWeight: 400
lfItalic: 0
lfUnderline: 0
lfStrikeOut: 0
lfCharSet: 44
lfOutPrecision: 1
lfClipPrecision: 2
lfQuality: 1
lfPitchAndFamily: 81
lfFaceName: 6x13b_0
How does that compare with yours?
4. Try running the attached program (ntpixels.c). I compile it with
Visual C++ using: cl ntpixels.c gdi32.lib
It gives me:
Horizontal pixels per inch: 96
Vertical pixels per inch: 96
There's a coincidence here that makes this work. The 6x13 font is
height 13 (see above). At 96 pixels/inch, this is a point size of
13x72/96, which gives 10 when rounded to the nearest integer. 10
happens to be the default point size chosen by
mswindows_initialize_font_instance() if it can't determine the real
one.
If you get different results, try using these strings to specify the
fonts:
"6x13_0:Regular:10::Default"
"6x13b_0:Regular:10::Default"
5. Is the 6x13 font you're using the Reflection X one? If not, mail me
the file you use and I'll poke around.
David