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

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

Issue 818363006: fix a few linux compilation warnings (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Restore origina cmslut.c Created 5 years, 11 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
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 "../../../include/fxge/fx_ge.h" 7 #include "../../../include/fxge/fx_ge.h"
8 #include "../agg/include/fx_agg_driver.h" 8 #include "../agg/include/fx_agg_driver.h"
9 #include "text_int.h" 9 #include "text_int.h"
10 #if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_ 10 #if _FXM_PLATFORM_ == _FXM_PLATFORM_LINUX_
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 break; 156 break;
157 } 157 }
158 return 0; 158 return 0;
159 } 159 }
160 static FX_INT32 _LinuxGetSimilarValue(int weight, FX_BOOL bItalic, int pitch_fam ily, FX_DWORD style) 160 static FX_INT32 _LinuxGetSimilarValue(int weight, FX_BOOL bItalic, int pitch_fam ily, FX_DWORD style)
161 { 161 {
162 FX_INT32 iSimilarValue = 0; 162 FX_INT32 iSimilarValue = 0;
163 if ((style & FXFONT_BOLD) == (weight > 400)) { 163 if ((style & FXFONT_BOLD) == (weight > 400)) {
164 iSimilarValue += 16; 164 iSimilarValue += 16;
165 } 165 }
166 // TODO(tsepez): File BUG since 0x40 & x is never 1, for instance.
166 if ((style & FXFONT_ITALIC) == bItalic) { 167 if ((style & FXFONT_ITALIC) == bItalic) {
jun_fang 2015/01/17 00:39:17 it shall be changed to if ((style & FXFONT_ITALIC)
167 iSimilarValue += 16; 168 iSimilarValue += 16;
168 } 169 }
169 if ((style & FXFONT_SERIF) == (pitch_family & FXFONT_FF_ROMAN)) { 170 if ((style & FXFONT_SERIF) == (pitch_family & FXFONT_FF_ROMAN)) {
170 iSimilarValue += 16; 171 iSimilarValue += 16;
171 } 172 }
172 if ((style & FXFONT_SCRIPT) == (pitch_family & FXFONT_FF_SCRIPT)) { 173 if ((style & FXFONT_SCRIPT) == (pitch_family & FXFONT_FF_SCRIPT)) {
173 iSimilarValue += 8; 174 iSimilarValue += 8;
174 } 175 }
175 if ((style & FXFONT_FIXED_PITCH) == (pitch_family & FXFONT_FF_FIXEDPITCH)) { 176 if ((style & FXFONT_FIXED_PITCH) == (pitch_family & FXFONT_FF_FIXEDPITCH)) {
176 iSimilarValue += 8; 177 iSimilarValue += 8;
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 return FALSE; 226 return FALSE;
226 } 227 }
227 void CFX_GEModule::InitPlatform() 228 void CFX_GEModule::InitPlatform()
228 { 229 {
229 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault()); 230 m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault());
230 } 231 }
231 void CFX_GEModule::DestroyPlatform() 232 void CFX_GEModule::DestroyPlatform()
232 { 233 {
233 } 234 }
234 #endif 235 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698