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

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

Issue 1846793002: Make wide strings use StringData template (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@template_str
Patch Set: Fix mac compile Created 4 years, 8 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/fxcrt/include/fx_string.h ('k') | no next file » | 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/fxcodec/include/fx_codec.h" 7 #include "core/fxcodec/include/fx_codec.h"
8 #include "core/fxge/ge/fx_text_int.h" 8 #include "core/fxge/ge/fx_text_int.h"
9 #include "core/fxge/include/fx_freetype.h" 9 #include "core/fxge/include/fx_freetype.h"
10 #include "core/fxge/include/fx_ge.h" 10 #include "core/fxge/include/fx_ge.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 uint32_t fill_color, 185 uint32_t fill_color,
186 uint32_t text_flags, 186 uint32_t text_flags,
187 int alpha_flag, 187 int alpha_flag,
188 void* pIccTransform) { 188 void* pIccTransform) {
189 int nativetext_flags = text_flags; 189 int nativetext_flags = text_flags;
190 if (m_DeviceClass != FXDC_DISPLAY) { 190 if (m_DeviceClass != FXDC_DISPLAY) {
191 if (!(text_flags & FXTEXT_PRINTGRAPHICTEXT)) { 191 if (!(text_flags & FXTEXT_PRINTGRAPHICTEXT)) {
192 bool should_call_draw_device_text = true; 192 bool should_call_draw_device_text = true;
193 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ 193 #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
194 if ((text_flags & FXFONT_CIDFONT) || 194 if ((text_flags & FXFONT_CIDFONT) ||
195 (pFont->GetPsName().Find(CFX_WideString::FromLocal("+ZJHL")) != -1) || 195 (pFont->GetPsName().Find(
196 CFX_WideString::FromLocal("+ZJHL").AsWideStringC()) != -1) ||
196 (pFont->GetPsName() == CFX_WideString::FromLocal("CNAAJI+cmex10"))) { 197 (pFont->GetPsName() == CFX_WideString::FromLocal("CNAAJI+cmex10"))) {
197 should_call_draw_device_text = false; 198 should_call_draw_device_text = false;
198 } 199 }
199 #endif 200 #endif
200 if (should_call_draw_device_text && 201 if (should_call_draw_device_text &&
201 m_pDeviceDriver->DrawDeviceText(nChars, pCharPos, pFont, pCache, 202 m_pDeviceDriver->DrawDeviceText(nChars, pCharPos, pFont, pCache,
202 pText2Device, font_size, fill_color, 203 pText2Device, font_size, fill_color,
203 alpha_flag, pIccTransform)) { 204 alpha_flag, pIccTransform)) {
204 return TRUE; 205 return TRUE;
205 } 206 }
(...skipping 1690 matching lines...) Expand 10 before | Expand all | Expand 10 after
1896 void _CFX_UniqueKeyGen::Generate(int count, ...) { 1897 void _CFX_UniqueKeyGen::Generate(int count, ...) {
1897 va_list argList; 1898 va_list argList;
1898 va_start(argList, count); 1899 va_start(argList, count);
1899 for (int i = 0; i < count; i++) { 1900 for (int i = 0; i < count; i++) {
1900 int p = va_arg(argList, int); 1901 int p = va_arg(argList, int);
1901 ((uint32_t*)m_Key)[i] = p; 1902 ((uint32_t*)m_Key)[i] = p;
1902 } 1903 }
1903 va_end(argList); 1904 va_end(argList);
1904 m_KeyLen = count * sizeof(uint32_t); 1905 m_KeyLen = count * sizeof(uint32_t);
1905 } 1906 }
OLDNEW
« no previous file with comments | « core/fxcrt/include/fx_string.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698