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

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: rebase 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
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.h ('k') | xfa/fxfa/include/fxfa.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 "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 IFGAS_Font* CXFA_TextParser::GetFont(CXFA_TextProvider* pTextProvider, 335 CFGAS_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 1591 matching lines...) Expand 10 before | Expand all | Expand 10 after
1938 tr.iLength = iLength; 1938 tr.iLength = iLength;
1939 tr.fFontSize = pPiece->fFontSize; 1939 tr.fFontSize = pPiece->fFontSize;
1940 tr.iBidiLevel = pPiece->iBidiLevel; 1940 tr.iBidiLevel = pPiece->iBidiLevel;
1941 tr.iCharRotation = 0; 1941 tr.iCharRotation = 0;
1942 tr.wLineBreakChar = L'\n'; 1942 tr.wLineBreakChar = L'\n';
1943 tr.iVerticalScale = pPiece->iVerScale; 1943 tr.iVerticalScale = pPiece->iVerScale;
1944 tr.dwLayoutStyles = FX_RTFLAYOUTSTYLE_ExpandTab; 1944 tr.dwLayoutStyles = FX_RTFLAYOUTSTYLE_ExpandTab;
1945 tr.iHorizontalScale = pPiece->iHorScale; 1945 tr.iHorizontalScale = pPiece->iHorScale;
1946 return TRUE; 1946 return TRUE;
1947 } 1947 }
OLDNEW
« no previous file with comments | « xfa/fxfa/app/xfa_textlayout.h ('k') | xfa/fxfa/include/fxfa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698