#include "third_party/blink/renderer/platform/fonts/shaping/han_kerning.h"
#include <unicode/uchar.h>
#include "third_party/blink/renderer/platform/fonts/opentype/open_type_features.h"
#include "third_party/blink/renderer/platform/fonts/shaping/font_features.h"
#include "third_party/blink/renderer/platform/fonts/shaping/harfbuzz_shaper.h"
#include "third_party/blink/renderer/platform/fonts/simple_font_data.h"
#include "third_party/blink/renderer/platform/wtf/text/character_names.h"
namespace blink {
namespace {
HashSet<uint32_t> ExclusiveFeatures() { … }
bool IsExclusiveFeature(uint32_t tag) { … }
inline float GetAdvance(const HarfBuzzShaper::GlyphData& glyph,
bool is_horizontal) { … }
HanKerning::CharType CharTypeFromBounds(float half_em,
const SkRect& bound,
bool is_horizontal) { … }
HanKerning::CharType CharTypeFromBounds(
base::span<HarfBuzzShaper::GlyphData> glyphs,
base::span<SkRect> bounds,
unsigned index,
bool is_horizontal) { … }
HanKerning::CharType CharTypeFromBounds(
base::span<HarfBuzzShaper::GlyphData> glyphs,
base::span<SkRect> bounds,
bool is_horizontal) { … }
}
void HanKerning::ResetFeatures() { … }
HanKerning::CharType HanKerning::GetCharType(UChar ch,
const FontData& font_data) { … }
bool HanKerning::MayApply(StringView text) { … }
inline bool HanKerning::ShouldKern(CharType type, CharType last_type) { … }
inline bool HanKerning::ShouldKernLast(CharType type, CharType last_type) { … }
void HanKerning::Compute(const String& text,
wtf_size_t start,
wtf_size_t end,
const SimpleFontData& font,
const FontDescription& font_description,
Options options,
FontFeatures* features) { … }
HanKerning::FontData::FontData(const SimpleFontData& font,
const LayoutLocale& locale,
bool is_horizontal) { … }
}