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

Side by Side Diff: core/fxge/ge/fx_ge_font.cpp

Issue 2292503002: Refactor fx_font part 4 (Closed)
Patch Set: Comments Created 4 years, 3 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
« no previous file with comments | « core/fxge/ge/cttfontdesc.cpp ('k') | core/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fxge/include/fx_font.h" 7 #include "core/fxge/include/fx_font.h"
8 8
9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h" 9 #include "core/fpdfapi/fpdf_font/include/cpdf_font.h"
10 #include "core/fxge/ge/fx_text_int.h" 10 #include "core/fxge/ge/fx_text_int.h"
11 #include "core/fxge/include/cfx_fontmgr.h" 11 #include "core/fxge/include/cfx_fontmgr.h"
12 #include "core/fxge/include/cfx_gemodule.h" 12 #include "core/fxge/include/cfx_gemodule.h"
13 #include "core/fxge/include/cfx_substfont.h"
13 #include "core/fxge/include/fx_freetype.h" 14 #include "core/fxge/include/fx_freetype.h"
14 15
15 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em) 16 #define EM_ADJUST(em, a) (em == 0 ? (a) : (a)*1000 / em)
16 17
17 namespace { 18 namespace {
18 19
19 #ifdef PDF_ENABLE_XFA 20 #ifdef PDF_ENABLE_XFA
20 21
21 unsigned long FTStreamRead(FXFT_Stream stream, 22 unsigned long FTStreamRead(FXFT_Stream stream,
22 unsigned long offset, 23 unsigned long offset,
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 FXFT_Get_Face_UnderLinePosition(m_Face)); 407 FXFT_Get_Face_UnderLinePosition(m_Face));
407 } 408 }
408 409
409 int CFX_Font::GetULthickness() const { 410 int CFX_Font::GetULthickness() const {
410 if (!m_Face) 411 if (!m_Face)
411 return 0; 412 return 0;
412 413
413 return EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face), 414 return EM_ADJUST(FXFT_Get_Face_UnitsPerEM(m_Face),
414 FXFT_Get_Face_UnderLineThickness(m_Face)); 415 FXFT_Get_Face_UnderLineThickness(m_Face));
415 } 416 }
OLDNEW
« no previous file with comments | « core/fxge/ge/cttfontdesc.cpp ('k') | core/fxge/ge/fx_ge_fontmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698