Flutter Engine
The Flutter Engine
typeface_skia.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_TYPOGRAPHER_BACKENDS_SKIA_TYPEFACE_SKIA_H_
6#define FLUTTER_IMPELLER_TYPOGRAPHER_BACKENDS_SKIA_TYPEFACE_SKIA_H_
7
12
13namespace impeller {
14
15class TypefaceSkia final : public Typeface,
16 public BackendCast<TypefaceSkia, Typeface> {
17 public:
18 explicit TypefaceSkia(sk_sp<SkTypeface> typeface);
19
20 ~TypefaceSkia() override;
21
22 // |Typeface|
23 bool IsValid() const override;
24
25 // |Comparable<Typeface>|
26 std::size_t GetHash() const override;
27
28 // |Comparable<Typeface>|
29 bool IsEqual(const Typeface& other) const override;
30
32
33 private:
34 sk_sp<SkTypeface> typeface_;
35
36 TypefaceSkia(const TypefaceSkia&) = delete;
37
38 TypefaceSkia& operator=(const TypefaceSkia&) = delete;
39};
40
41} // namespace impeller
42
43#endif // FLUTTER_IMPELLER_TYPOGRAPHER_BACKENDS_SKIA_TYPEFACE_SKIA_H_
TypefaceSkia(sk_sp< SkTypeface > typeface)
Definition: typeface_skia.cc:9
std::size_t GetHash() const override
const sk_sp< SkTypeface > & GetSkiaTypeface() const
bool IsEqual(const Typeface &other) const override
bool IsValid() const override
A typeface, usually obtained from a font-file, on disk describes the intrinsic properties of the font...
Definition: typeface.h:18