hb_bool_t
hb_ot_color_has_palettes (hb_face_t *face)
{
+#ifdef HB_NO_COLOR
+ return false;
+#endif
return face->table.CPAL->has_data ();
}
unsigned int
hb_ot_color_palette_get_count (hb_face_t *face)
{
+#ifdef HB_NO_COLOR
+ return 0;
+#endif
return face->table.CPAL->get_palette_count ();
}
hb_ot_color_palette_get_name_id (hb_face_t *face,
unsigned int palette_index)
{
+#ifdef HB_NO_COLOR
+ return HB_OT_NAME_ID_INVALID;
+#endif
return face->table.CPAL->get_palette_name_id (palette_index);
}
hb_ot_color_palette_color_get_name_id (hb_face_t *face,
unsigned int color_index)
{
+#ifdef HB_NO_COLOR
+ return HB_OT_NAME_ID_INVALID;
+#endif
return face->table.CPAL->get_color_name_id (color_index);
}
hb_ot_color_palette_get_flags (hb_face_t *face,
unsigned int palette_index)
{
+#ifdef HB_NO_COLOR
+ return HB_OT_COLOR_PALETTE_FLAG_DEFAULT;
+#endif
return face->table.CPAL->get_palette_flags (palette_index);
}
unsigned int *colors_count /* IN/OUT. May be NULL. */,
hb_color_t *colors /* OUT. May be NULL. */)
{
+#ifdef HB_NO_COLOR
+ if (colors_count)
+ *colors_count = 0;
+ return 0;
+#endif
return face->table.CPAL->get_palette_colors (palette_index, start_offset, colors_count, colors);
}
hb_bool_t
hb_ot_color_has_layers (hb_face_t *face)
{
+#ifdef HB_NO_COLOR
+ return false;
+#endif
return face->table.COLR->has_data ();
}
* @face: a font face.
* @glyph: a layered color glyph id.
* @start_offset: starting offset of layers.
- * @count: (inout) (optional): gets number of layers available to be written on buffer
+ * @layer_count: (inout) (optional): gets number of layers available to be written on buffer
* and returns number of written layers.
- * @layers: (array length=count) (out) (optional): layers buffer to buffer.
+ * @layers: (array length=layer_count) (out) (optional): layers buffer to buffer.
*
* Returns: Total number of layers a layered color glyph have.
*
hb_ot_color_glyph_get_layers (hb_face_t *face,
hb_codepoint_t glyph,
unsigned int start_offset,
- unsigned int *count, /* IN/OUT. May be NULL. */
+ unsigned int *layer_count, /* IN/OUT. May be NULL. */
hb_ot_color_layer_t *layers /* OUT. May be NULL. */)
{
- return face->table.COLR->get_glyph_layers (glyph, start_offset, count, layers);
+#ifdef HB_NO_COLOR
+ if (layer_count)
+ *layer_count = 0;
+ return 0;
+#endif
+ return face->table.COLR->get_glyph_layers (glyph, start_offset, layer_count, layers);
}
hb_bool_t
hb_ot_color_has_svg (hb_face_t *face)
{
+#ifdef HB_NO_COLOR
+ return false;
+#endif
return face->table.SVG->has_data ();
}
hb_blob_t *
hb_ot_color_glyph_reference_svg (hb_face_t *face, hb_codepoint_t glyph)
{
+#ifdef HB_NO_COLOR
+ return hb_blob_get_empty ();
+#endif
return face->table.SVG->reference_blob_for_glyph (glyph);
}
hb_bool_t
hb_ot_color_has_png (hb_face_t *face)
{
+#ifdef HB_NO_COLOR
+ return false;
+#endif
return face->table.CBDT->has_data () || face->table.sbix->has_data ();
}
hb_blob_t *
hb_ot_color_glyph_reference_png (hb_font_t *font, hb_codepoint_t glyph)
{
+#ifdef HB_NO_COLOR
+ return hb_blob_get_empty ();
+#endif
+
hb_blob_t *blob = hb_blob_get_empty ();
if (font->face->table.sbix->has_data ())