libacfutils
A general purpose library of utility functions designed to make it easier to develop addons for the X-Plane flight simulator.
Loading...
Searching...
No Matches
font_utils.h
Go to the documentation of this file.
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license in the file COPYING
10 * or http://www.opensource.org/licenses/CDDL-1.0.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file COPYING.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22/*
23 * Copyright 2023 Saso Kiselkov. All rights reserved.
24 */
31#ifndef _ACF_UTILS_FONT_UTILS_H_
32#define _ACF_UTILS_FONT_UTILS_H_
33
34#include <cairo.h>
35#include <cairo-ft.h>
36#include <ft2build.h>
37#include FT_FREETYPE_H
38
39#include "types.h"
40
41#ifdef __cplusplus
42extern "C" {
43#endif
44
46#define ft_err2str font_utils_ft_err2str
50API_EXPORT const char *ft_err2str(FT_Error err);
51
53#define try_load_font font_utils_try_load_font
54
72API_EXPORT bool_t font_utils_try_load_font(const char *fontdir,
73 const char *fontfile, FT_Library ft, FT_Face *font,
74 cairo_font_face_t **cr_font);
75
76#ifdef __cplusplus
77}
78#endif
79
80#endif /* _ACF_UTILS_FONT_UTILS_H_ */
#define ft_err2str
Definition font_utils.h:46
bool_t font_utils_try_load_font(const char *fontdir, const char *fontfile, FT_Library ft, FT_Face *font, cairo_font_face_t **cr_font)