| // 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. |
| // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| #include "core/fxge/scoped_font_transform.h" |
| void ResetTransform(FT_Face face) { |
| FT_Set_Transform(face, &matrix, 0); |
| ScopedFontTransform::ScopedFontTransform(RetainPtr<CFX_Face> face, |
| : m_Face(std::move(face)) { |
| FT_Set_Transform(m_Face->GetRec(), matrix, 0); |
| ScopedFontTransform::~ScopedFontTransform() { |
| ResetTransform(m_Face->GetRec()); |