| 1 |
/* Common utility code for interacting with libXfont from test utilities */ |
| 2 |
|
| 3 |
/* |
| 4 |
* Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. |
| 5 |
* |
| 6 |
* Permission is hereby granted, free of charge, to any person obtaining a |
| 7 |
* copy of this software and associated documentation files (the "Software"), |
| 8 |
* to deal in the Software without restriction, including without limitation |
| 9 |
* the rights to use, copy, modify, merge, publish, distribute, sublicense, |
| 10 |
* and/or sell copies of the Software, and to permit persons to whom the |
| 11 |
* Software is furnished to do so, subject to the following conditions: |
| 12 |
* |
| 13 |
* The above copyright notice and this permission notice (including the next |
| 14 |
* paragraph) shall be included in all copies or substantial portions of the |
| 15 |
* Software. |
| 16 |
* |
| 17 |
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
| 18 |
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
| 19 |
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL |
| 20 |
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
| 21 |
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 22 |
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
| 23 |
* DEALINGS IN THE SOFTWARE. |
| 24 |
*/ |
| 25 |
|
| 26 |
#ifdef HAVE_CONFIG_H |
| 27 |
# include "config.h" |
| 28 |
#endif |
| 29 |
|
| 30 |
#include <X11/Xfuncproto.h> |
| 31 |
#include <X11/fonts/font.h> |
| 32 |
#include <X11/fonts/fontstruct.h> |
| 33 |
#include <X11/fonts/fontmisc.h> |
| 34 |
#include <X11/fonts/libxfont2.h> |
| 35 |
|
| 36 |
/* Returns pointer to array of functions for each type of font_path_entry |
| 37 |
* handler, and puts count of entries in that array into fpe_function_count. |
| 38 |
* Must be called before init_font_paths(). |
| 39 |
*/ |
| 40 |
extern xfont2_fpe_funcs_rec const **init_font_handlers(int *fpe_function_count); |
| 41 |
|
| 42 |
/* Returns pointer to array of FontPathElement structs for each font path |
| 43 |
* entry passed in. num_fpes must be set to the number of entries in the |
| 44 |
* font_paths array when called - will be set to the number of entries in |
| 45 |
* the returned array. May be called with (NULL, 0) to use default font |
| 46 |
* path of "catalogue:/etc/X11/fontpath.d" & "built-ins". |
| 47 |
*/ |
| 48 |
extern FontPathElementPtr *init_font_paths(const char * const *font_paths, |
| 49 |
int *num_fpes); |