Commit 20ac65ab authored by Keith Packard's avatar Keith Packard

Change FcCharSet datastructure, add FcFontSort API

parent bc9469ba
/*
* $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.11 2002/05/24 05:20:02 keithp Exp $
* $XFree86: xc/lib/fontconfig/fontconfig/fontconfig.h,v 1.12 2002/05/29 08:21:33 keithp Exp $
*
* Copyright 2001 Keith Packard, member of The XFree86 Project, Inc.
*
......@@ -516,6 +516,13 @@ FcFontSetSort (FcConfig *config,
FcCharSet **csp,
FcResult *result);
FcFontSet *
FcFontSort (FcConfig *config,
FcPattern *p,
FcBool trim,
FcCharSet **csp,
FcResult *result);
void
FcFontSetSortDestroy (FcFontSet *fs);
......
This diff is collapsed.
/*
* $XFree86: xc/lib/fontconfig/src/fcint.h,v 1.8 2002/05/21 17:06:22 keithp Exp $
* $XFree86: xc/lib/fontconfig/src/fcint.h,v 1.10 2002/05/29 22:07:33 keithp Exp $
*
* Copyright 2000 Keith Packard, member of The XFree86 Project, Inc.
*
......@@ -157,29 +157,16 @@ typedef struct _FcSubst {
FcEdit *edit;
} FcSubst;
typedef struct _FcCharLeaf FcCharLeaf;
typedef struct _FcCharBranch FcCharBranch;
typedef union _FcCharNode FcCharNode;
struct _FcCharLeaf {
typedef struct _FcCharLeaf {
FcChar32 map[256/32];
};
union _FcCharNode {
FcCharBranch *branch;
FcCharLeaf *leaf;
};
struct _FcCharBranch {
FcCharNode nodes[256];
FcChar8 next[256];
};
} FcCharLeaf;
struct _FcCharSet {
int levels;
int ref; /* reference count */
FcBool constant; /* shared constant */
FcCharNode node;
FcBool constant; /* in hash table constant */
int num; /* size of leaves and numbers arrays */
FcCharLeaf **leaves;
FcChar16 *numbers;
};
struct _FcStrSet {
......
/*
* $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.6 2002/05/29 08:21:33 keithp Exp $
* $XFree86: xc/lib/fontconfig/src/fcmatch.c,v 1.7 2002/05/29 22:07:33 keithp Exp $
*
* Copyright 2000 Keith Packard, member of The XFree86 Project, Inc.
*
......@@ -613,3 +613,27 @@ bail1:
bail0:
return 0;
}
FcFontSet *
FcFontSort (FcConfig *config,
FcPattern *p,
FcBool trim,
FcCharSet **csp,
FcResult *result)
{
FcFontSet *sets[2];
int nsets;
if (!config)
{
config = FcConfigGetCurrent ();
if (!config)
return 0;
}
nsets = 0;
if (config->fonts[FcSetSystem])
sets[nsets++] = config->fonts[FcSetSystem];
if (config->fonts[FcSetApplication])
sets[nsets++] = config->fonts[FcSetApplication];
return FcFontSetSort (config, sets, nsets, p, trim, csp, result);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment