summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_char.cpp
blob: 1c166353f1f4a40b744d87f7749d862c953ec52e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright 2017 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/fxcrt/cfx_char.h"

CFX_Char::CFX_Char()
    : m_dwStatus(CFX_BreakType::None),
      m_nBreakType(0),
      m_dwCharStyles(0),
      m_dwCharProps(0),
      m_iCharWidth(0),
      m_iHorizontalScale(100),
      m_iVerticalScale(100),
      m_iBidiClass(0),
      m_iBidiLevel(0),
      m_iBidiPos(0),
      m_iBidiOrder(0),
      m_wCharCode(0),
      m_iFontSize(0),
      m_dwIdentity(0) {}

CFX_Char::CFX_Char(uint16_t wCharCode, uint32_t dwCharProps)
    : m_nBreakType(0),
      m_dwCharStyles(0),
      m_dwCharProps(dwCharProps),
      m_iCharWidth(0),
      m_iHorizontalScale(100),
      m_iVerticalScale(100),
      m_iBidiClass(0),
      m_iBidiLevel(0),
      m_iBidiPos(0),
      m_iBidiOrder(0),
      m_wCharCode(wCharCode),
      m_iFontSize(0),
      m_dwIdentity(0) {}

CFX_Char::CFX_Char(const CFX_Char& other) = default;

CFX_Char::~CFX_Char() = default;

FX_CHARTYPE CFX_Char::GetCharType() const {
  return GetCharTypeFromProp(m_dwCharProps);
}