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

Side by Side Diff: core/src/fxge/ge/fx_ge_fontmap.cpp

Issue 1783023002: Re-enable MSVC warning 4800 for compiling with chromium_code (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: remove cast change on security_handler file Created 4 years, 9 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/src/fxge/agg/fx_agg_driver.cpp ('k') | fpdfsdk/include/fsdk_baseannot.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 <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 break; 380 break;
381 } 381 }
382 return 0; 382 return 0;
383 } 383 }
384 384
385 int32_t GetSimilarValue(int weight, 385 int32_t GetSimilarValue(int weight,
386 FX_BOOL bItalic, 386 FX_BOOL bItalic,
387 int pitch_family, 387 int pitch_family,
388 FX_DWORD style) { 388 FX_DWORD style) {
389 int32_t iSimilarValue = 0; 389 int32_t iSimilarValue = 0;
390 if ((style & FXFONT_BOLD) == (weight > 400)) { 390 if (!!(style & FXFONT_BOLD) == (weight > 400)) {
391 iSimilarValue += 16; 391 iSimilarValue += 16;
392 } 392 }
393 if ((style & FXFONT_ITALIC) == bItalic) { 393 if (!!(style & FXFONT_ITALIC) == bItalic) {
394 iSimilarValue += 16; 394 iSimilarValue += 16;
395 } 395 }
396 if ((style & FXFONT_SERIF) == (pitch_family & FXFONT_FF_ROMAN)) { 396 if (!!(style & FXFONT_SERIF) == !!(pitch_family & FXFONT_FF_ROMAN)) {
397 iSimilarValue += 16; 397 iSimilarValue += 16;
398 } 398 }
399 if ((style & FXFONT_SCRIPT) == (pitch_family & FXFONT_FF_SCRIPT)) { 399 if (!!(style & FXFONT_SCRIPT) == !!(pitch_family & FXFONT_FF_SCRIPT)) {
400 iSimilarValue += 8; 400 iSimilarValue += 8;
401 } 401 }
402 if ((style & FXFONT_FIXED_PITCH) == (pitch_family & FXFONT_FF_FIXEDPITCH)) { 402 if (!!(style & FXFONT_FIXED_PITCH) ==
403 !!(pitch_family & FXFONT_FF_FIXEDPITCH)) {
403 iSimilarValue += 8; 404 iSimilarValue += 8;
404 } 405 }
405 return iSimilarValue; 406 return iSimilarValue;
406 } 407 }
407 408
408 } // namespace 409 } // namespace
409 410
410 CFX_SubstFont::CFX_SubstFont() { 411 CFX_SubstFont::CFX_SubstFont() {
411 m_ExtHandle = NULL; 412 m_ExtHandle = NULL;
412 m_Charset = 0; 413 m_Charset = 0;
(...skipping 1200 matching lines...) Expand 10 before | Expand all | Expand 10 after
1613 int PDF_GetStandardFontName(CFX_ByteString* name) { 1614 int PDF_GetStandardFontName(CFX_ByteString* name) {
1614 AltFontName* found = static_cast<AltFontName*>( 1615 AltFontName* found = static_cast<AltFontName*>(
1615 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames), 1616 FXSYS_bsearch(name->c_str(), g_AltFontNames, FX_ArraySize(g_AltFontNames),
1616 sizeof(AltFontName), CompareString)); 1617 sizeof(AltFontName), CompareString));
1617 if (!found) 1618 if (!found)
1618 return -1; 1619 return -1;
1619 1620
1620 *name = g_Base14FontNames[found->m_Index]; 1621 *name = g_Base14FontNames[found->m_Index];
1621 return found->m_Index; 1622 return found->m_Index;
1622 } 1623 }
OLDNEW
« no previous file with comments | « core/src/fxge/agg/fx_agg_driver.cpp ('k') | fpdfsdk/include/fsdk_baseannot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698