|
Packit |
b749da |
/*
|
|
Packit |
b749da |
* Copyright © 2000 Keith Packard
|
|
Packit |
b749da |
*
|
|
Packit |
b749da |
* Permission to use, copy, modify, distribute, and sell this software and its
|
|
Packit |
b749da |
* documentation for any purpose is hereby granted without fee, provided that
|
|
Packit |
b749da |
* the above copyright notice appear in all copies and that both that
|
|
Packit |
b749da |
* copyright notice and this permission notice appear in supporting
|
|
Packit |
b749da |
* documentation, and that the name of Keith Packard not be used in
|
|
Packit |
b749da |
* advertising or publicity pertaining to distribution of the software without
|
|
Packit |
b749da |
* specific, written prior permission. Keith Packard makes no
|
|
Packit |
b749da |
* representations about the suitability of this software for any purpose. It
|
|
Packit |
b749da |
* is provided "as is" without express or implied warranty.
|
|
Packit |
b749da |
*
|
|
Packit |
b749da |
* KEITH PACKARD DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
|
Packit |
b749da |
* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
|
Packit |
b749da |
* EVENT SHALL KEITH PACKARD BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
|
Packit |
b749da |
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
|
|
Packit |
b749da |
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
Packit |
b749da |
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
Packit |
b749da |
* PERFORMANCE OF THIS SOFTWARE.
|
|
Packit |
b749da |
*/
|
|
Packit |
b749da |
|
|
Packit |
b749da |
#include "xftint.h"
|
|
Packit |
b749da |
|
|
Packit |
b749da |
_X_HIDDEN FcFontSet *
|
|
Packit |
b749da |
XftListFontsPatternObjects (Display *dpy,
|
|
Packit |
b749da |
int screen,
|
|
Packit |
b749da |
FcPattern *pattern,
|
|
Packit |
b749da |
FcObjectSet *os)
|
|
Packit |
b749da |
{
|
|
Packit |
b749da |
return FcFontList (NULL, pattern, os);
|
|
Packit |
b749da |
}
|
|
Packit |
b749da |
|
|
Packit |
b749da |
_X_EXPORT FcFontSet *
|
|
Packit |
b749da |
XftListFonts (Display *dpy,
|
|
Packit |
b749da |
int screen,
|
|
Packit |
b749da |
...)
|
|
Packit |
b749da |
{
|
|
Packit |
b749da |
va_list va;
|
|
Packit |
b749da |
FcFontSet *fs;
|
|
Packit |
b749da |
FcObjectSet *os;
|
|
Packit |
b749da |
FcPattern *pattern;
|
|
Packit |
b749da |
const char *first;
|
|
Packit |
b749da |
|
|
Packit |
b749da |
va_start (va, screen);
|
|
Packit |
b749da |
|
|
Packit |
b749da |
FcPatternVapBuild (pattern, NULL, va);
|
|
Packit |
b749da |
|
|
Packit |
b749da |
first = va_arg (va, const char *);
|
|
Packit |
b749da |
FcObjectSetVapBuild (os, first, va);
|
|
Packit |
b749da |
|
|
Packit |
b749da |
va_end (va);
|
|
Packit |
b749da |
|
|
Packit |
b749da |
fs = XftListFontsPatternObjects (dpy, screen, pattern, os);
|
|
Packit |
b749da |
FcPatternDestroy (pattern);
|
|
Packit |
b749da |
FcObjectSetDestroy (os);
|
|
Packit |
b749da |
return fs;
|
|
Packit |
b749da |
}
|