Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
8#include "flutter/fml/macros.h"
13
14namespace impeller {
15
16class TypefaceSkia final : public Typeface,
17 public BackendCast<TypefaceSkia, Typeface> {
18 public:
19 explicit TypefaceSkia(sk_sp<SkTypeface> typeface);
20
21 ~TypefaceSkia() override;
22
23 // |Typeface|
24 bool IsValid() const override;
25
26 // |Comparable<Typeface>|
27 std::size_t GetHash() const override;
28
29 // |Comparable<Typeface>|
30 bool IsEqual(const Typeface& other) const override;
31
33
34 private:
35 sk_sp<SkTypeface> typeface_;
36
37 TypefaceSkia(const TypefaceSkia&) = delete;
38
39 TypefaceSkia& operator=(const TypefaceSkia&) = delete;
40};
41
42} // namespace impeller
43
44#endif // FLUTTER_IMPELLER_TYPOGRAPHER_BACKENDS_SKIA_TYPEFACE_SKIA_H_
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:20