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

Unified Diff: xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp

Issue 2350763002: Revert of Pdfium: Fix fonts leaking on ClosePage. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp ('k') | xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
diff --git a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index fb95f264a0cc92174dd2c0291f67bc028a3ceda2..0a7f3a8a5066e0fb660bc4201e534f5e2d724a87 100644
--- a/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/xfa/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -222,7 +222,8 @@
delete ge.GetBitmap();
ge.Create(strWidth, iTextHeight, FXDIB_Argb, nullptr);
ge.GetBitmap()->Clear(m_backgroundColor);
- ge.DrawNormalText(iLen, pCharPos, m_pFont, (FX_FLOAT)iFontSize,
+ ge.DrawNormalText(iLen, pCharPos, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition, m_Height - iTextHeight);
} else {
@@ -230,8 +231,9 @@
(FX_FLOAT)leftPosition * m_outputHScale,
(FX_FLOAT)(m_Height - iTextHeight + iFontSize));
affine_matrix1.Concat(*matrix);
- device->DrawNormalText(iLen, pCharPos, m_pFont, (FX_FLOAT)iFontSize,
- &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
+ device->DrawNormalText(
+ iLen, pCharPos, m_pFont, CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
}
tempStr = str.Mid(4, 4);
iLen = tempStr.GetLength();
@@ -241,7 +243,8 @@
delete ge.GetBitmap();
ge.Create(strWidth, iTextHeight, FXDIB_Argb, nullptr);
ge.GetBitmap()->Clear(m_backgroundColor);
- ge.DrawNormalText(iLen, pCharPos + 4, m_pFont, (FX_FLOAT)iFontSize,
+ ge.DrawNormalText(iLen, pCharPos + 4, m_pFont,
+ CFX_GEModule::Get()->GetFontCache(), (FX_FLOAT)iFontSize,
&affine_matrix, m_fontColor, FXTEXT_CLEARTYPE);
geBitmap.SetDIBits(ge.GetBitmap(), leftPosition + 33 * multiple,
m_Height - iTextHeight);
@@ -253,8 +256,9 @@
if (matrix) {
affine_matrix1.Concat(*matrix);
}
- device->DrawNormalText(iLen, pCharPos + 4, m_pFont, (FX_FLOAT)iFontSize,
- &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
+ device->DrawNormalText(
+ iLen, pCharPos + 4, m_pFont, CFX_GEModule::Get()->GetFontCache(),
+ (FX_FLOAT)iFontSize, &affine_matrix1, m_fontColor, FXTEXT_CLEARTYPE);
}
FX_Free(pCharPos);
}
« no previous file with comments | « xfa/fxbarcode/oned/BC_OnedEAN13Writer.cpp ('k') | xfa/fxbarcode/oned/BC_OnedUPCAWriter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698