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

Side by Side Diff: xfa/fxfa/app/xfa_textlayout.cpp

Issue 2037563002: Replace IFGAS_Font with underlying concrete type (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Fix Windows Created 4 years, 6 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 "xfa/fxfa/app/xfa_textlayout.h" 7 #include "xfa/fxfa/app/xfa_textlayout.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after
325 } 325 }
326 326
327 FX_BOOL CXFA_TextParser::IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const { 327 FX_BOOL CXFA_TextParser::IsSpaceRun(IFDE_CSSComputedStyle* pStyle) const {
328 CFX_WideString wsValue; 328 CFX_WideString wsValue;
329 if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"xfa-spacerun"), wsValue)) { 329 if (pStyle && pStyle->GetCustomStyle(FX_WSTRC(L"xfa-spacerun"), wsValue)) {
330 wsValue.MakeLower(); 330 wsValue.MakeLower();
331 return wsValue == FX_WSTRC(L"yes"); 331 return wsValue == FX_WSTRC(L"yes");
332 } 332 }
333 return FALSE; 333 return FALSE;
334 } 334 }
335 IFX_Font* CXFA_TextParser::GetFont(CXFA_TextProvider* pTextProvider, 335 CFX_GEFont* CXFA_TextParser::GetFont(CXFA_TextProvider* pTextProvider,
336 IFDE_CSSComputedStyle* pStyle) const { 336 IFDE_CSSComputedStyle* pStyle) const {
337 CFX_WideStringC wsFamily = FX_WSTRC(L"Courier"); 337 CFX_WideStringC wsFamily = FX_WSTRC(L"Courier");
338 uint32_t dwStyle = 0; 338 uint32_t dwStyle = 0;
339 CXFA_Font font = pTextProvider->GetFontNode(); 339 CXFA_Font font = pTextProvider->GetFontNode();
340 if (font) { 340 if (font) {
341 font.GetTypeface(wsFamily); 341 font.GetTypeface(wsFamily);
342 if (font.IsBold()) { 342 if (font.IsBold()) {
343 dwStyle |= FX_FONTSTYLE_Bold; 343 dwStyle |= FX_FONTSTYLE_Bold;
344 } 344 }
345 if (font.IsItalic()) { 345 if (font.IsItalic()) {
346 dwStyle |= FX_FONTSTYLE_Italic; 346 dwStyle |= FX_FONTSTYLE_Italic;
(...skipping 1610 matching lines...) Expand 10 before | Expand all | Expand 10 after
1957 tr.iLength = iLength; 1957 tr.iLength = iLength;
1958 tr.fFontSize = pPiece->fFontSize; 1958 tr.fFontSize = pPiece->fFontSize;
1959 tr.iBidiLevel = pPiece->iBidiLevel; 1959 tr.iBidiLevel = pPiece->iBidiLevel;
1960 tr.iCharRotation = 0; 1960 tr.iCharRotation = 0;
1961 tr.wLineBreakChar = L'\n'; 1961 tr.wLineBreakChar = L'\n';
1962 tr.iVerticalScale = pPiece->iVerScale; 1962 tr.iVerticalScale = pPiece->iVerScale;
1963 tr.dwLayoutStyles = FX_RTFLAYOUTSTYLE_ExpandTab; 1963 tr.dwLayoutStyles = FX_RTFLAYOUTSTYLE_ExpandTab;
1964 tr.iHorizontalScale = pPiece->iHorScale; 1964 tr.iHorizontalScale = pPiece->iHorScale;
1965 return TRUE; 1965 return TRUE;
1966 } 1966 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698