// Copyright 2019 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CORE_FXGE_CFX_FACE_H_ #define CORE_FXGE_CFX_FACE_H_ #include "core/fxcrt/observed_ptr.h" #include "core/fxcrt/retain_ptr.h" #include "core/fxge/fx_freetype.h" #include "third_party/base/span.h" class CFX_Face : public Retainable, public Observable { public: static RetainPtr New(FT_Library library, const RetainPtr& pDesc, pdfium::span data, FT_Long face_index); static RetainPtr Open(FT_Library library, const FT_Open_Args* args, FT_Long face_index); ~CFX_Face() override; FXFT_FaceRec* GetRec() { return m_pRec.get(); } private: CFX_Face(FXFT_FaceRec* pRec, const RetainPtr& pDesc); ScopedFXFTFaceRec const m_pRec; RetainPtr const m_pDesc; }; #endif // CORE_FXGE_CFX_FACE_H_