Flutter Engine
The Flutter Engine
hb_wrappers.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_TOOLS_FONT_SUBSET_HB_WRAPPERS_H_
6#define FLUTTER_TOOLS_FONT_SUBSET_HB_WRAPPERS_H_
7
8#include <hb-subset.h>
9
10#include <memory>
11
14 void operator()(hb_blob_t* ptr) { hb_blob_destroy(ptr); }
15};
16
18 void operator()(hb_face_t* ptr) { hb_face_destroy(ptr); }
19};
20
22 void operator()(hb_subset_input_t* ptr) { hb_subset_input_destroy(ptr); }
23};
24
26 void operator()(hb_set_t* ptr) { hb_set_destroy(ptr); }
27};
28
29using HbBlobPtr = std::unique_ptr<hb_blob_t, hb_blob_deleter>;
30using HbFacePtr = std::unique_ptr<hb_face_t, hb_face_deleter>;
32 std::unique_ptr<hb_subset_input_t, hb_subset_input_deleter>;
33using HbSetPtr = std::unique_ptr<hb_set_t, hb_set_deleter>;
34
35}; // namespace HarfbuzzWrappers
36
37#endif // FLUTTER_TOOLS_FONT_SUBSET_HB_WRAPPERS_H_
std::unique_ptr< hb_subset_input_t, hb_subset_input_deleter > HbSubsetInputPtr
Definition: hb_wrappers.h:32
std::unique_ptr< hb_blob_t, hb_blob_deleter > HbBlobPtr
Definition: hb_wrappers.h:29
std::unique_ptr< hb_face_t, hb_face_deleter > HbFacePtr
Definition: hb_wrappers.h:30
std::unique_ptr< hb_set_t, hb_set_deleter > HbSetPtr
Definition: hb_wrappers.h:33
void operator()(hb_blob_t *ptr)
Definition: hb_wrappers.h:14
void operator()(hb_face_t *ptr)
Definition: hb_wrappers.h:18
void operator()(hb_set_t *ptr)
Definition: hb_wrappers.h:26
void operator()(hb_subset_input_t *ptr)
Definition: hb_wrappers.h:22