Re: [Fonts]Fontconfig + patched qt-3.0.5 doesn't allow bitmap fixedfont

2002-10-18 Thread Ian Pilcher
Paul de Vrieze wrote:
 Yesterday I installed the XFt-2 enabled QT. Now running konsole (the kde 
 terminal application) It started out with very wide characters (from arial) 
 This is caused by the fact that the font selection mechanism refuses to match 
 the -misc-fixed-medium-r-* bitmapped font. I've tried out several 
 configurations but none helped (except aliassing to a monospaced font, not 
 arial).
 

I can't tell from the log whether you have made any bitmap fonts
available to fontconfig.  On my Red Hat 8 system, I have found that I
can use PCF fonts in konsole by putting un-gzipped copies of them in
/usr/share/fonts/bitmap-fonts (or presumably any other directory listed
in fonts.conf) and running fc-cache.

As an aside, this doesn't work for the Courier fonts that ship with
XFree86.  I suspect that this is because a couple of them don't have a
spacing value.

-- 

Ian Pilcher   [EMAIL PROTECTED]


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



Re: [Fonts]Fontconfig + patched qt-3.0.5 doesn't allow bitmap fixedfont

2002-10-18 Thread Ian Pilcher
Paul de Vrieze wrote:
 On Friday 18 October 2002 05:21, Ian Pilcher wrote:
 
As an aside, this doesn't work for the Courier fonts that ship with
XFree86.  I suspect that this is because a couple of them don't have a
spacing value.
 
 
 How can I check this?
 

Here is my very first fontconfig program.  The usage is:

fcdump [-d] [pattern]

If '-d' is omitted, a single-line version of each pattern will be
printed (with FcNameUnparse); if '-d' is present, a multi-line version
will be printed (with FcPatternPrint).  If no pattern is supplied, all
fonts will be printed.

-- 

Ian Pilcher   [EMAIL PROTECTED]


#include stdlib.h
#include string.h
#include stdio.h
#include errno.h

#include fontconfig/fontconfig.h

int main(int argc, char *argv[])
{
FcFontSet   *fonts;
int i, print_detail = 0;
FcChar8 *name;
FcPattern   *pattern = NULL;
FcObjectSet *objects;

if (argc = 2  strcmp(argv[1], -d) == 0)
print_detail = 1;

if (FcInit() != FcTrue)
{
perror(FcInit);
exit(__LINE__);
}

if (argc = 2 + print_detail)
{
pattern = FcNameParse(argv[1 + print_detail]);
if (pattern == NULL)
{
perror(FcNameParse);
exit(__LINE__);
}

objects = FcObjectSetBuild(FC_FAMILY, FC_STYLE, FC_SLANT, FC_WEIGHT,
FC_SIZE, FC_ASPECT, FC_PIXEL_SIZE, FC_SPACING, FC_FOUNDRY,
FC_ANTIALIAS, FC_HINTING, FC_VERTICAL_LAYOUT, FC_AUTOHINT,
FC_GLOBAL_ADVANCE, FC_FILE, FC_INDEX, FC_FT_FACE, FC_RASTERIZER,
FC_OUTLINE, FC_SCALABLE, FC_SCALE, FC_DPI, FC_RGBA, FC_MINSPACE,
NULL);

fonts = FcFontList(NULL, pattern, objects);
if (fonts == NULL)
{
perror(FcFontList);
exit(__LINE__);
}
}
else
{
fonts = FcConfigGetFonts(NULL, FcSetSystem);
if (fonts == NULL)
{
perror(FcConfigGetFonts);
exit(__LINE__);
}
}

for (i = 0; i  fonts-nfont; ++i)
{
if (print_detail)
{
FcPatternPrint(fonts-fonts[i]);
continue;
}

name = FcNameUnparse(fonts-fonts[i]);
if (name == NULL)
{
perror(FcNameUnparse);
exit(__LINE__);
}

pattern = FcNameParse(name);
if (pattern == NULL)
{
perror(FcNameParse);
exit(__LINE__);
}

free(name);

FcPatternDel(pattern, FC_CHARSET);
FcPatternDel(pattern, FC_LANG);

name = FcNameUnparse(pattern);
if (name == NULL)
{
perror(FcNameUnparse);
exit(__LINE__);
}

puts(name);

FcPatternDestroy(pattern);
free(name);
}

return 0;
}