Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
hb-ot-color.h
Go to the documentation of this file.
1/*
2 * Copyright © 2016 Google, Inc.
3 * Copyright © 2018 Khaled Hosny
4 * Copyright © 2018 Ebrahim Byagowi
5 *
6 * This is part of HarfBuzz, a text shaping library.
7 *
8 * Permission is hereby granted, without written agreement and without
9 * license or royalty fees, to use, copy, modify, and distribute this
10 * software and its documentation for any purpose, provided that the
11 * above copyright notice and the following two paragraphs appear in
12 * all copies of this software.
13 *
14 * IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
15 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
16 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
17 * IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
18 * DAMAGE.
19 *
20 * THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
21 * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
22 * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
23 * ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
24 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
25 *
26 * Google Author(s): Sascha Brawer, Behdad Esfahbod
27 */
28
29#if !defined(HB_OT_H_IN) && !defined(HB_NO_SINGLE_HEADER_ERROR)
30#error "Include <hb-ot.h> instead."
31#endif
32
33#ifndef HB_OT_COLOR_H
34#define HB_OT_COLOR_H
35
36#include "hb.h"
37#include "hb-ot-name.h"
38
40
41
42/*
43 * Color palettes.
44 */
45
48
49HB_EXTERN unsigned int
51
54 unsigned int palette_index);
55
58 unsigned int color_index);
59
60/**
61 * hb_ot_color_palette_flags_t:
62 * @HB_OT_COLOR_PALETTE_FLAG_DEFAULT: Default indicating that there is nothing special
63 * to note about a color palette.
64 * @HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_LIGHT_BACKGROUND: Flag indicating that the color
65 * palette is appropriate to use when displaying the font on a light background such as white.
66 * @HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_DARK_BACKGROUND: Flag indicating that the color
67 * palette is appropriate to use when displaying the font on a dark background such as black.
68 *
69 * Flags that describe the properties of color palette.
70 *
71 * Since: 2.1.0
72 */
78
81 unsigned int palette_index);
82
83HB_EXTERN unsigned int
85 unsigned int palette_index,
86 unsigned int start_offset,
87 unsigned int *color_count, /* IN/OUT. May be NULL. */
88 hb_color_t *colors /* OUT. May be NULL. */);
89
90
91/*
92 * Color layers.
93 */
94
97
98/**
99 * hb_ot_color_layer_t:
100 * @glyph: the glyph ID of the layer
101 * @color_index: the palette color index of the layer
102 *
103 * Pairs of glyph and color index.
104 *
105 * A color index of 0xFFFF does not refer to a palette
106 * color, but indicates that the foreground color should
107 * be used.
108 *
109 * Since: 2.1.0
110 **/
115
116HB_EXTERN unsigned int
118 hb_codepoint_t glyph,
119 unsigned int start_offset,
120 unsigned int *layer_count, /* IN/OUT. May be NULL. */
121 hb_ot_color_layer_t *layers /* OUT. May be NULL. */);
122
123/* COLRv1 */
124
127
130 hb_codepoint_t glyph);
131
132/*
133 * SVG
134 */
135
138
141
142/*
143 * PNG: CBDT or sbix
144 */
145
148
151
152
154
155#endif /* HB_OT_COLOR_H */
struct hb_blob_t hb_blob_t
Definition hb-blob.h:84
HB_BEGIN_DECLS typedef int hb_bool_t
Definition hb-common.h:94
uint32_t hb_codepoint_t
Definition hb-common.h:103
struct hb_font_t hb_font_t
Definition hb-common.h:949
uint32_t hb_color_t
Definition hb-common.h:894
#define HB_BEGIN_DECLS
Definition hb-common.h:45
#define HB_END_DECLS
Definition hb-common.h:46
#define HB_EXTERN
Definition hb-common.h:37
struct hb_face_t hb_face_t
Definition hb-face.h:56
HB_EXTERN hb_bool_t hb_ot_color_has_paint(hb_face_t *face)
HB_EXTERN hb_bool_t hb_ot_color_has_svg(hb_face_t *face)
HB_EXTERN unsigned int hb_ot_color_palette_get_colors(hb_face_t *face, unsigned int palette_index, unsigned int start_offset, unsigned int *color_count, hb_color_t *colors)
hb_ot_color_palette_flags_t
Definition hb-ot-color.h:73
@ HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_LIGHT_BACKGROUND
Definition hb-ot-color.h:75
@ HB_OT_COLOR_PALETTE_FLAG_USABLE_WITH_DARK_BACKGROUND
Definition hb-ot-color.h:76
@ HB_OT_COLOR_PALETTE_FLAG_DEFAULT
Definition hb-ot-color.h:74
HB_EXTERN hb_ot_name_id_t hb_ot_color_palette_get_name_id(hb_face_t *face, unsigned int palette_index)
HB_EXTERN hb_ot_name_id_t hb_ot_color_palette_color_get_name_id(hb_face_t *face, unsigned int color_index)
HB_EXTERN hb_bool_t hb_ot_color_has_png(hb_face_t *face)
HB_EXTERN unsigned int hb_ot_color_palette_get_count(hb_face_t *face)
HB_EXTERN hb_blob_t * hb_ot_color_glyph_reference_svg(hb_face_t *face, hb_codepoint_t glyph)
HB_EXTERN hb_bool_t hb_ot_color_glyph_has_paint(hb_face_t *face, hb_codepoint_t glyph)
HB_BEGIN_DECLS HB_EXTERN hb_bool_t hb_ot_color_has_palettes(hb_face_t *face)
HB_EXTERN hb_blob_t * hb_ot_color_glyph_reference_png(hb_font_t *font, hb_codepoint_t glyph)
struct hb_ot_color_layer_t hb_ot_color_layer_t
HB_EXTERN hb_ot_color_palette_flags_t hb_ot_color_palette_get_flags(hb_face_t *face, unsigned int palette_index)
HB_EXTERN hb_bool_t hb_ot_color_has_layers(hb_face_t *face)
HB_EXTERN unsigned int hb_ot_color_glyph_get_layers(hb_face_t *face, hb_codepoint_t glyph, unsigned int start_offset, unsigned int *layer_count, hb_ot_color_layer_t *layers)
unsigned int hb_ot_name_id_t
Definition hb-ot-name.h:115
unsigned int color_index
hb_codepoint_t glyph