2019-10-13 11:01:53 +02:00
|
|
|
/*
|
2020-01-10 18:14:15 +01:00
|
|
|
* Copyright © 2019-2020 Ebrahim Byagowi
|
2019-10-13 11:01:53 +02:00
|
|
|
*
|
|
|
|
* This is part of HarfBuzz, a text shaping library.
|
|
|
|
*
|
|
|
|
* Permission is hereby granted, without written agreement and without
|
|
|
|
* license or royalty fees, to use, copy, modify, and distribute this
|
|
|
|
* software and its documentation for any purpose, provided that the
|
|
|
|
* above copyright notice and the following two paragraphs appear in
|
|
|
|
* all copies of this software.
|
|
|
|
*
|
|
|
|
* IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR
|
|
|
|
* DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
|
|
|
|
* ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN
|
|
|
|
* IF THE COPYRIGHT HOLDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
|
|
* DAMAGE.
|
|
|
|
*
|
|
|
|
* THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
|
|
|
|
* BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
|
|
* FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
|
|
|
|
* ON AN "AS IS" BASIS, AND THE COPYRIGHT HOLDER HAS NO OBLIGATION TO
|
|
|
|
* PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "hb.hh"
|
|
|
|
|
|
|
|
#ifndef HB_NO_OT_GLYPH
|
|
|
|
|
|
|
|
#include "hb-ot.h"
|
|
|
|
#include "hb-ot-glyf-table.hh"
|
2019-10-20 14:54:14 +02:00
|
|
|
#include "hb-ot-cff1-table.hh"
|
2019-10-21 11:36:12 +02:00
|
|
|
#include "hb-ot-cff2-table.hh"
|
2019-10-13 11:01:53 +02:00
|
|
|
|
2020-01-10 18:14:15 +01:00
|
|
|
hb_bool_t
|
|
|
|
hb_ot_glyph_decompose (hb_font_t *font, hb_codepoint_t glyph,
|
|
|
|
hb_ot_glyph_decompose_funcs_t *funcs,
|
|
|
|
void *user_data)
|
2019-10-20 14:53:27 +02:00
|
|
|
{
|
2020-01-10 18:14:15 +01:00
|
|
|
if (unlikely (!funcs || glyph >= font->face->get_num_glyphs ())) return false;
|
2019-10-20 14:53:27 +02:00
|
|
|
|
2020-01-10 18:38:21 +01:00
|
|
|
if (font->face->table.glyf->get_path (font, glyph, funcs, user_data)) return true;
|
2020-01-10 19:44:46 +01:00
|
|
|
#ifndef HB_NO_CFF
|
|
|
|
if (font->face->table.cff1->get_path (font, glyph, funcs, user_data)) return true;
|
|
|
|
if (font->face->table.cff2->get_path (font, glyph, funcs, user_data)) return true;
|
2020-01-10 18:38:21 +01:00
|
|
|
#endif
|
|
|
|
|
|
|
|
return false;
|
2019-10-13 11:01:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|