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

Side by Side Diff: core/fxge/win32/fx_win32_print.cpp

Issue 2246223002: Refactor fx_font part 1 (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: CFX_AutoFontCache to own class, fixes 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
« no previous file with comments | « core/fxge/skia/fx_skia_device_unittest.cpp ('k') | core/fxge/win32/win32_int.h » ('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/fxcrt/include/fx_system.h" 7 #include "core/fxcrt/include/fx_system.h"
8 8
9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ 9 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
10 10
11 #include <windows.h> 11 #include <windows.h>
12 12
13 #include <algorithm> 13 #include <algorithm>
14 14
15 #include "core/fxge/dib/dib_int.h" 15 #include "core/fxge/dib/dib_int.h"
16 #include "core/fxge/ge/fx_text_int.h" 16 #include "core/fxge/ge/fx_text_int.h"
17 #include "core/fxge/include/fx_freetype.h" 17 #include "core/fxge/include/fx_freetype.h"
18 #include "core/fxge/include/cfx_fontcache.h"
18 #include "core/fxge/include/cfx_renderdevice.h" 19 #include "core/fxge/include/cfx_renderdevice.h"
19 #include "core/fxge/include/cfx_windowsdevice.h" 20 #include "core/fxge/include/cfx_windowsdevice.h"
20 #include "core/fxge/win32/win32_int.h" 21 #include "core/fxge/win32/win32_int.h"
21 22
22 #if defined(PDFIUM_PRINT_TEXT_WITH_GDI) 23 #if defined(PDFIUM_PRINT_TEXT_WITH_GDI)
23 namespace { 24 namespace {
24 25
25 class ScopedState { 26 class ScopedState {
26 public: 27 public:
27 ScopedState(HDC hDC, HFONT hFont) : m_hDC(hDC) { 28 ScopedState(HDC hDC, HFONT hFont) : m_hDC(hDC) {
(...skipping 295 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 // Try to get the font and draw again. 324 // Try to get the font and draw again.
324 g_pdfium_typeface_accessible_func(&lf, wsText.c_str(), nChars); 325 g_pdfium_typeface_accessible_func(&lf, wsText.c_str(), nChars);
325 return ExtTextOutW(m_hDC, 0, 0, ETO_GLYPH_INDEX, nullptr, wsText.c_str(), 326 return ExtTextOutW(m_hDC, 0, 0, ETO_GLYPH_INDEX, nullptr, wsText.c_str(),
326 nChars, nChars > 1 ? &spacing[1] : nullptr); 327 nChars, nChars > 1 ? &spacing[1] : nullptr);
327 #else 328 #else
328 return FALSE; 329 return FALSE;
329 #endif 330 #endif
330 } 331 }
331 332
332 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ 333 #endif // _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_
OLDNEW
« no previous file with comments | « core/fxge/skia/fx_skia_device_unittest.cpp ('k') | core/fxge/win32/win32_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698