summaryrefslogtreecommitdiff
path: root/core/src/fxge
diff options
context:
space:
mode:
authorJohn Abd-El-Malek <jam@chromium.org>2015-02-02 16:52:07 -0800
committerJohn Abd-El-Malek <jam@chromium.org>2015-02-02 16:52:07 -0800
commitef4dce44bb4b990f301a98853075f501c6f053d7 (patch)
tree006cd513695df7d324fce1fd1b4a58af3902d799 /core/src/fxge
parent3795a748bb3fb7fc3f2c6196af1f89627ac37f4e (diff)
downloadpdfium-ef4dce44bb4b990f301a98853075f501c6f053d7.tar.xz
Merge the following changes to XFA branch:
b3a788e Fix GN PDFium build when building all. by John Abd-El-Malek - 19 hours ago chromium/2293 f8af677 Always use the FreeType headers included in PDFium. by John Abd-El-Malek - 24 hours ago dc8c950 Don't export any OpenJPEG methods from PDFium. by John Abd-El-Malek - 3 days ago 71c24b8 Use system FreeType on Linux. by John Abd-El-Malek - 3 days ago R=tsepez@chromium.org Review URL: https://codereview.chromium.org/900433002
Diffstat (limited to 'core/src/fxge')
-rw-r--r--core/src/fxge/ge/fx_ge_text.cpp14
1 files changed, 0 insertions, 14 deletions
diff --git a/core/src/fxge/ge/fx_ge_text.cpp b/core/src/fxge/ge/fx_ge_text.cpp
index 0724c10edf..59bd351822 100644
--- a/core/src/fxge/ge/fx_ge_text.cpp
+++ b/core/src/fxge/ge/fx_ge_text.cpp
@@ -1328,12 +1328,10 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde
pFont->AdjustMMParams(glyph_index, dest_width, pFont->GetSubstFont()->m_Weight);
}
}
- int transflag = FXFT_Get_Face_Internal_Flag(m_Face);
FXFT_Set_Transform(m_Face, &ft_matrix, 0);
int load_flags = (m_Face->face_flags & FT_FACE_FLAG_SFNT) ? FXFT_LOAD_NO_BITMAP : (FXFT_LOAD_NO_BITMAP | FT_LOAD_NO_HINTING);
int error = FXFT_Load_Glyph(m_Face, glyph_index, load_flags);
if (error) {
- FXFT_Set_Face_Internal_Flag(m_Face, transflag);
return NULL;
}
int weight = 0;
@@ -1345,7 +1343,6 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde
if (pSubstFont && !(pSubstFont->m_SubstFlags & FXFONT_SUBST_MM) && weight > 400) {
int index = (weight - 400) / 10;
if (index >= WEIGHTPOW_ARRAY_SIZE) {
- FXFT_Set_Face_Internal_Flag(m_Face, transflag);
return NULL;
}
int level = 0;
@@ -1359,13 +1356,11 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde
FXFT_Library_SetLcdFilter(CFX_GEModule::Get()->GetFontMgr()->m_FTLibrary, FT_LCD_FILTER_DEFAULT);
error = FXFT_Render_Glyph(m_Face, anti_alias);
if (error) {
- FXFT_Set_Face_Internal_Flag(m_Face, transflag);
return NULL;
}
int bmwidth = FXFT_Get_Bitmap_Width(FXFT_Get_Glyph_Bitmap(m_Face));
int bmheight = FXFT_Get_Bitmap_Rows(FXFT_Get_Glyph_Bitmap(m_Face));
if (bmwidth > 2048 || bmheight > 2048) {
- FXFT_Set_Face_Internal_Flag(m_Face, transflag);
return NULL;
}
int dib_width = bmwidth;
@@ -1402,7 +1397,6 @@ CFX_GlyphBitmap* CFX_FaceCache::RenderGlyph(CFX_Font* pFont, FX_DWORD glyph_inde
_GammaAdjust(pDestBuf, bmwidth, bmheight, dest_pitch, CFX_GEModule::Get()->GetTextGammaTable());
}
}
- FXFT_Set_Face_Internal_Flag(m_Face, transflag);
return pGlyphBitmap;
}
FX_BOOL _OutputGlyph(void* dib, int x, int y, CFX_Font* pFont,
@@ -1444,7 +1438,6 @@ FX_BOOL OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size,
}
FXFT_Face face = pFont->GetFace();
FXFT_Select_Charmap(pFont->m_Face, FXFT_ENCODING_UNICODE);
- int transflag = FXFT_Get_Face_Internal_Flag(pFont->m_Face);
if (pText_matrix) {
FXFT_Matrix ft_matrix;
ft_matrix.xx = (signed long)(pText_matrix->a / 64 * 65536);
@@ -1472,7 +1465,6 @@ FX_BOOL OutputText(void* dib, int x, int y, CFX_Font* pFont, double font_size,
glyph_index, argb);
x_pos += (FX_FLOAT)w / em;
}
- FXFT_Set_Face_Internal_Flag(pFont->m_Face, transflag);
return TRUE;
}
FX_BOOL OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size,
@@ -1489,11 +1481,9 @@ FX_BOOL OutputGlyph(void* dib, int x, int y, CFX_Font* pFont, double font_size,
ft_matrix.xy = ft_matrix.yx = 0;
ft_matrix.yy = (signed long)(font_size / 64 * 65536);
}
- int transflag = FXFT_Get_Face_Internal_Flag(pFont->m_Face);
FXFT_Set_Transform(pFont->m_Face, &ft_matrix, 0);
FX_BOOL ret = _OutputGlyph(dib, x, y, pFont,
glyph_index, argb);
- FXFT_Set_Face_Internal_Flag(pFont->m_Face, transflag);
return ret;
}
const CFX_PathData* CFX_FaceCache::LoadGlyphPath(CFX_Font* pFont, FX_DWORD glyph_index, int dest_width)
@@ -1640,12 +1630,10 @@ CFX_PathData* CFX_Font::LoadGlyphPath(FX_DWORD glyph_index, int dest_width)
AdjustMMParams(glyph_index, dest_width, m_pSubstFont->m_Weight);
}
}
- int transflag = FXFT_Get_Face_Internal_Flag(m_Face);
FXFT_Set_Transform(m_Face, &ft_matrix, 0);
int load_flags = (m_Face->face_flags & FT_FACE_FLAG_SFNT) ? FXFT_LOAD_NO_BITMAP : FXFT_LOAD_NO_BITMAP | FT_LOAD_NO_HINTING;
int error = FXFT_Load_Glyph(m_Face, glyph_index, load_flags);
if (error) {
- FXFT_Set_Face_Internal_Flag(m_Face, transflag);
return NULL;
}
if (m_pSubstFont && !(m_pSubstFont->m_SubstFlags & FXFONT_SUBST_MM) && m_pSubstFont->m_Weight > 400) {
@@ -1672,7 +1660,6 @@ CFX_PathData* CFX_Font::LoadGlyphPath(FX_DWORD glyph_index, int dest_width)
params.m_PointCount = 0;
FXFT_Outline_Decompose(FXFT_Get_Glyph_Outline(m_Face), &funcs, &params);
if (params.m_PointCount == 0) {
- FXFT_Set_Face_Internal_Flag(m_Face, transflag);
return NULL;
}
CFX_PathData* pPath = FX_NEW CFX_PathData;
@@ -1691,7 +1678,6 @@ CFX_PathData* CFX_Font::LoadGlyphPath(FX_DWORD glyph_index, int dest_width)
if (params.m_PointCount) {
pPath->GetPoints()[params.m_PointCount - 1].m_Flag |= FXPT_CLOSEFIGURE;
}
- FXFT_Set_Face_Internal_Flag(m_Face, transflag);
return pPath;
}
void _CFX_UniqueKeyGen::Generate(int count, ...)