54 SkUnichar* code_points,
55 int code_point_count) {
56 std::unique_ptr<SkGlyphID[]> glyph_buffer =
57 std::make_unique<SkGlyphID[]>(code_point_count);
58 SkGlyphID* glyph_pointer = glyph_buffer.get();
59 int remaining_code_point_count = code_point_count;
60 for (
int typeface_index = 0; typeface_index < typeface_count;
62 typefaces[typeface_index]->unicharsToGlyphs(
63 {code_points, remaining_code_point_count},
64 {glyph_pointer, remaining_code_point_count});
66 for (
int input_index = 0; input_index < remaining_code_point_count;
68 if (glyph_pointer[input_index] == 0) {
69 if (output_index != input_index) {
70 code_points[output_index] = code_points[input_index];
75 if (output_index == 0) {
78 remaining_code_point_count = output_index;
81 return remaining_code_point_count;