Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1135)

Side by Side Diff: core/fxge/include/cfx_unicodeencoding.h

Issue 2260533002: Refactor fx_font part 2 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 PDFium 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 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7 #ifndef CORE_FXGE_INCLUDE_CFX_UNICODEENCODING_H_
8 #define CORE_FXGE_INCLUDE_CFX_UNICODEENCODING_H_
9
10 #include "core/fxge/include/fx_font.h"
11
12 #define ENCODING_INTERNAL 0
13 #define ENCODING_UNICODE 1
14
15 #ifdef PDF_ENABLE_XFA
16 #define FXFM_ENC_TAG(a, b, c, d) \
17 (((uint32_t)(a) << 24) | ((uint32_t)(b) << 16) | ((uint32_t)(c) << 8) | \
18 (uint32_t)(d))
19 #define FXFM_ENCODING_NONE FXFM_ENC_TAG(0, 0, 0, 0)
20 #define FXFM_ENCODING_MS_SYMBOL FXFM_ENC_TAG('s', 'y', 'm', 'b')
21 #define FXFM_ENCODING_UNICODE FXFM_ENC_TAG('u', 'n', 'i', 'c')
22 #define FXFM_ENCODING_MS_SJIS FXFM_ENC_TAG('s', 'j', 'i', 's')
23 #define FXFM_ENCODING_MS_GB2312 FXFM_ENC_TAG('g', 'b', ' ', ' ')
24 #define FXFM_ENCODING_MS_BIG5 FXFM_ENC_TAG('b', 'i', 'g', '5')
25 #define FXFM_ENCODING_MS_WANSUNG FXFM_ENC_TAG('w', 'a', 'n', 's')
26 #define FXFM_ENCODING_MS_JOHAB FXFM_ENC_TAG('j', 'o', 'h', 'a')
27 #define FXFM_ENCODING_ADOBE_STANDARD FXFM_ENC_TAG('A', 'D', 'O', 'B')
28 #define FXFM_ENCODING_ADOBE_EXPERT FXFM_ENC_TAG('A', 'D', 'B', 'E')
29 #define FXFM_ENCODING_ADOBE_CUSTOM FXFM_ENC_TAG('A', 'D', 'B', 'C')
30 #define FXFM_ENCODING_ADOBE_LATIN_1 FXFM_ENC_TAG('l', 'a', 't', '1')
31 #define FXFM_ENCODING_OLD_LATIN_2 FXFM_ENC_TAG('l', 'a', 't', '2')
32 #define FXFM_ENCODING_APPLE_ROMAN FXFM_ENC_TAG('a', 'r', 'm', 'n')
33 #endif // PDF_ENABLE_XFA
34
35 class CFX_UnicodeEncoding {
36 public:
37 explicit CFX_UnicodeEncoding(CFX_Font* pFont);
38 virtual ~CFX_UnicodeEncoding();
39
40 virtual uint32_t GlyphFromCharCode(uint32_t charcode);
41
42 protected:
43 // Unowned, not nullptr.
dsinclair 2016/08/18 15:14:52 Put this after the param: CFX_Font* m_pFont; //
npm 2016/08/18 17:36:41 Done.
44 CFX_Font* m_pFont;
45 };
46
47 #endif // CORE_FXGE_INCLUDE_CFX_UNICODEENCODING_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698