* Google Author(s): Sascha Brawer, Behdad Esfahbod
*/
-#include "hb-open-type.hh"
+#include "hb.hh"
+
+#ifndef HB_NO_COLOR
+
+#include "hb-ot.h"
+
#include "hb-ot-color-cbdt-table.hh"
#include "hb-ot-color-colr-table.hh"
#include "hb-ot-color-cpal-table.hh"
#include "hb-ot-color-sbix-table.hh"
#include "hb-ot-color-svg-table.hh"
-#include "hb-ot-face.hh"
-#include "hb-ot.h"
#include <stdlib.h>
#include <string.h>
-#include "hb-ot-layout.hh"
-
/**
* SECTION:hb-ot-color
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 ();
}
unsigned int *layer_count, /* IN/OUT. May be NULL. */
hb_ot_color_layer_t *layers /* OUT. May be NULL. */)
{
-#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 ())
return blob;
}
+
+
+#endif