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

Side by Side Diff: core/fpdfapi/fpdf_render/fpdf_render_text.cpp

Issue 1821043003: Remove FX_WORD in favor of uint16_t. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use stdint.h directly, bitfield minefield. 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/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h ('k') | core/fpdfdoc/doc_ap.cpp » ('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 "core/fpdfapi/fpdf_render/render_int.h" 7 #include "core/fpdfapi/fpdf_render/render_int.h"
8 8
9 #include "core/fpdfapi/fpdf_page/cpdf_parseoptions.h" 9 #include "core/fpdfapi/fpdf_page/cpdf_parseoptions.h"
10 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h" 10 #include "core/fpdfapi/fpdf_page/include/cpdf_form.h"
(...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after
559 charpos.m_FontCharWidth = pFont->GetCharWidthF(CharCode); 559 charpos.m_FontCharWidth = pFont->GetCharWidthF(CharCode);
560 } else { 560 } else {
561 charpos.m_FontCharWidth = 0; 561 charpos.m_FontCharWidth = 0;
562 } 562 }
563 charpos.m_OriginX = iChar ? pCharPos[iChar - 1] : 0; 563 charpos.m_OriginX = iChar ? pCharPos[iChar - 1] : 0;
564 charpos.m_OriginY = 0; 564 charpos.m_OriginY = 0;
565 charpos.m_bGlyphAdjust = FALSE; 565 charpos.m_bGlyphAdjust = FALSE;
566 if (!pCIDFont) { 566 if (!pCIDFont) {
567 continue; 567 continue;
568 } 568 }
569 FX_WORD CID = pCIDFont->CIDFromCharCode(CharCode); 569 uint16_t CID = pCIDFont->CIDFromCharCode(CharCode);
570 if (bVertWriting) { 570 if (bVertWriting) {
571 charpos.m_OriginY = charpos.m_OriginX; 571 charpos.m_OriginY = charpos.m_OriginX;
572 charpos.m_OriginX = 0; 572 charpos.m_OriginX = 0;
573 short vx, vy; 573 short vx, vy;
574 pCIDFont->GetVertOrigin(CID, vx, vy); 574 pCIDFont->GetVertOrigin(CID, vx, vy);
575 charpos.m_OriginX -= FontSize * vx / 1000; 575 charpos.m_OriginX -= FontSize * vx / 1000;
576 charpos.m_OriginY -= FontSize * vy / 1000; 576 charpos.m_OriginY -= FontSize * vy / 1000;
577 } 577 }
578 const uint8_t* pTransform = pCIDFont->GetCIDTransform(CID); 578 const uint8_t* pTransform = pCIDFont->GetCIDTransform(CID);
579 if (pTransform && !bVert) { 579 if (pTransform && !bVert) {
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX, 783 matrix.Concat(font_size, 0, 0, font_size, charpos.m_OriginX,
784 charpos.m_OriginY); 784 charpos.m_OriginY);
785 path.m_Path.New()->Append(pPath, &matrix); 785 path.m_Path.New()->Append(pPath, &matrix);
786 path.m_Matrix = *pTextMatrix; 786 path.m_Matrix = *pTextMatrix;
787 path.m_bStroke = bStroke; 787 path.m_bStroke = bStroke;
788 path.m_FillType = bFill ? FXFILL_WINDING : 0; 788 path.m_FillType = bFill ? FXFILL_WINDING : 0;
789 path.CalcBoundingBox(); 789 path.CalcBoundingBox();
790 ProcessPath(&path, pObj2Device); 790 ProcessPath(&path, pObj2Device);
791 } 791 }
792 } 792 }
OLDNEW
« no previous file with comments | « core/fpdfapi/fpdf_parser/include/fpdf_parser_decode.h ('k') | core/fpdfdoc/doc_ap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698