1a32e9e42Smrg/* 2a32e9e42Smrg * fontconfig/test/test-bz89617.c 3a32e9e42Smrg * 4a32e9e42Smrg * Copyright © 2000 Keith Packard 5a32e9e42Smrg * 6a32e9e42Smrg * Permission to use, copy, modify, distribute, and sell this software and its 7a32e9e42Smrg * documentation for any purpose is hereby granted without fee, provided that 8a32e9e42Smrg * the above copyright notice appear in all copies and that both that 9a32e9e42Smrg * copyright notice and this permission notice appear in supporting 10a32e9e42Smrg * documentation, and that the name of the author(s) not be used in 11a32e9e42Smrg * advertising or publicity pertaining to distribution of the software without 12a32e9e42Smrg * specific, written prior permission. The authors make no 13a32e9e42Smrg * representations about the suitability of this software for any purpose. It 14a32e9e42Smrg * is provided "as is" without express or implied warranty. 15a32e9e42Smrg * 16a32e9e42Smrg * THE AUTHOR(S) DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 17a32e9e42Smrg * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 18a32e9e42Smrg * EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY SPECIAL, INDIRECT OR 19a32e9e42Smrg * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 20a32e9e42Smrg * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 21a32e9e42Smrg * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 22a32e9e42Smrg * PERFORMANCE OF THIS SOFTWARE. 23a32e9e42Smrg */ 24a32e9e42Smrg#include <stdio.h> 25a32e9e42Smrg#include <fontconfig/fontconfig.h> 26a32e9e42Smrg 27a32e9e42Smrgint 28a32e9e42Smrgmain (int argc, char **argv) 29a32e9e42Smrg{ 30a32e9e42Smrg FcFontSet *fs = FcConfigGetFonts (NULL, FcSetSystem); 31a32e9e42Smrg int i; 32a32e9e42Smrg 33a32e9e42Smrg if (!fs) 34a32e9e42Smrg return 1; 35a32e9e42Smrg for (i = 0; i < fs->nfont; i++) 36a32e9e42Smrg { 37a32e9e42Smrg FcPattern *p = fs->fonts[i]; 38a32e9e42Smrg FcChar8 *file; 39a32e9e42Smrg 40a32e9e42Smrg if (FcPatternGetString (p, FC_FILE, 0, &file) != FcResultMatch) 41a32e9e42Smrg return 1; 42a32e9e42Smrg printf ("%s\n", file); 43a32e9e42Smrg } 44a32e9e42Smrg FcFontSetDestroy (fs); 45a32e9e42Smrg 46a32e9e42Smrg return 0; 47a32e9e42Smrg} 48