1/* Pango
2 * pangofc-private.h: Private routines and declarations for generic
3 * fontconfig operation
4 *
5 * Copyright (C) 2003 Red Hat Software
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
16 *
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
21 */
22
23#ifndef __PANGOFC_PRIVATE_H__
24#define __PANGOFC_PRIVATE_H__
25
26#include <pangofc-fontmap-private.h>
27
28G_BEGIN_DECLS
29
30
31#ifndef FC_WEIGHT_DEMILIGHT
32#define FC_WEIGHT_DEMILIGHT 55
33#define FC_WEIGHT_SEMILIGHT FC_WEIGHT_DEMILIGHT
34#endif
35
36
37typedef struct _PangoFcMetricsInfo PangoFcMetricsInfo;
38
39struct _PangoFcMetricsInfo
40{
41 const char *sample_str;
42 PangoFontMetrics *metrics;
43};
44
45
46#define PANGO_SCALE_26_6 (PANGO_SCALE / (1<<6))
47#define PANGO_PIXELS_26_6(d) \
48 (((d) >= 0) ? \
49 ((d) + PANGO_SCALE_26_6 / 2) / PANGO_SCALE_26_6 : \
50 ((d) - PANGO_SCALE_26_6 / 2) / PANGO_SCALE_26_6)
51#define PANGO_UNITS_26_6(d) ((d) * PANGO_SCALE_26_6)
52#define PANGO_UNITS_TO_26_6(d) ((d) / PANGO_SCALE_26_6)
53
54void _pango_fc_font_shutdown (PangoFcFont *fcfont);
55
56void _pango_fc_font_map_remove (PangoFcFontMap *fcfontmap,
57 PangoFcFont *fcfont);
58
59PangoCoverage *_pango_fc_font_map_get_coverage (PangoFcFontMap *fcfontmap,
60 PangoFcFont *fcfont);
61PangoCoverage *_pango_fc_font_map_fc_to_coverage (FcCharSet *charset);
62
63PangoFcDecoder *_pango_fc_font_get_decoder (PangoFcFont *font);
64void _pango_fc_font_set_decoder (PangoFcFont *font,
65 PangoFcDecoder *decoder);
66
67PangoFcFontKey *_pango_fc_font_get_font_key (PangoFcFont *fcfont);
68void _pango_fc_font_set_font_key (PangoFcFont *fcfont,
69 PangoFcFontKey *key);
70
71_PANGO_EXTERN
72void pango_fc_font_get_raw_extents (PangoFcFont *font,
73 PangoGlyph glyph,
74 PangoRectangle *ink_rect,
75 PangoRectangle *logical_rect);
76
77_PANGO_EXTERN
78PangoFontMetrics *pango_fc_font_create_base_metrics_for_context (PangoFcFont *font,
79 PangoContext *context);
80
81PangoLanguage **_pango_fc_font_map_get_languages (PangoFcFontMap *fcfontmap,
82 PangoFcFont *fcfont);
83
84G_END_DECLS
85
86#endif /* __PANGOFC_PRIVATE_H__ */
87

source code of gtk/subprojects/pango/pango/pangofc-private.h