chromium/third_party/blink/renderer/platform/fonts/shaping/shape_result_test_info.h

// Copyright 2015 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_SHAPE_RESULT_TEST_INFO_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_SHAPE_RESULT_TEST_INFO_H_

#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.h"
#include "third_party/blink/renderer/platform/fonts/shaping/shape_result_bloberizer.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"

#include <hb.h>

namespace blink {

class PLATFORM_EXPORT ShapeResultTestInfo : public ShapeResult {};

class PLATFORM_EXPORT ShapeResultBloberizerTestInfo {};

struct PLATFORM_EXPORT ShapeResultTestGlyphInfo {};

void PLATFORM_EXPORT AddGlyphInfo(void* context,
                                  unsigned character_index,
                                  Glyph,
                                  gfx::Vector2dF glyph_offset,
                                  float advance,
                                  bool is_horizontal,
                                  CanvasRotationInVertical,
                                  const SimpleFontData*);

void PLATFORM_EXPORT ComputeGlyphResults(const ShapeResult&,
                                         Vector<ShapeResultTestGlyphInfo>*);

bool PLATFORM_EXPORT
CompareResultGlyphs(const Vector<ShapeResultTestGlyphInfo>& test,
                    const Vector<ShapeResultTestGlyphInfo>& reference,
                    unsigned reference_start,
                    unsigned num_glyphs);

}  // namespace blink

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_FONTS_SHAPING_SHAPE_RESULT_TEST_INFO_H_