Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
cfx_substfont.cpp
Go to the documentation of this file.
1// Copyright 2016 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "core/fxge/cfx_substfont.h"
8
10
11CFX_SubstFont::~CFX_SubstFont() = default;
12
13#if defined(PDF_USE_SKIA)
14int CFX_SubstFont::GetOriginalWeight() const {
15 int weight = m_Weight;
16
17 // Perform the inverse weight adjustment of UseChromeSerif() to get the
18 // original font weight.
19 if (m_Family == "Chrome Serif")
20 weight = weight * 5 / 4;
21 return weight;
22}
23#endif
24
26 m_Weight = m_Weight * 4 / 5;
27 m_Family = "Chrome Serif";
28}