本文整理汇总了C++中CPDF_Font::GetFace方法的典型用法代码示例。如果您正苦于以下问题:C++ CPDF_Font::GetFace方法的具体用法?C++ CPDF_Font::GetFace怎么用?C++ CPDF_Font::GetFace使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CPDF_Font
的用法示例。
在下文中一共展示了CPDF_Font::GetFace方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ProcessText
FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj, const CFX_AffineMatrix* pObj2Device, CFX_PathData* pClippingPath)
{
if(textobj->m_nChars == 0) {
return TRUE;
}
int text_render_mode = textobj->m_TextState.GetObject()->m_TextMode;
if (text_render_mode == 3) {
return TRUE;
}
CPDF_Font* pFont = textobj->m_TextState.GetFont();
if (pFont->GetFontType() == PDFFONT_TYPE3) {
return ProcessType3Text(textobj, pObj2Device);
}
FX_BOOL bFill = FALSE, bStroke = FALSE, bClip = FALSE;
if (pClippingPath) {
bClip = TRUE;
} else {
switch (text_render_mode) {
case 0:
case 4:
bFill = TRUE;
break;
case 1:
case 5:
if (pFont->GetFace() == NULL && !(pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_GLYPHPATH)) {
bFill = TRUE;
} else {
bStroke = TRUE;
}
break;
case 2:
case 6:
if (pFont->GetFace() == NULL && !(pFont->GetSubstFont()->m_SubstFlags & FXFONT_SUBST_GLYPHPATH)) {
bFill = TRUE;
} else {
bFill = bStroke = TRUE;
}
break;
case 3:
case 7:
return TRUE;
default:
bFill = TRUE;
}
}
FX_ARGB stroke_argb = 0, fill_argb = 0;
FX_BOOL bPattern = FALSE;
if (bStroke) {
if (textobj->m_ColorState.GetStrokeColor()->IsPattern()) {
bPattern = TRUE;
} else {
stroke_argb = GetStrokeArgb(textobj);
}
}
if (bFill) {
if (textobj->m_ColorState.GetFillColor()->IsPattern()) {
bPattern = TRUE;
} else {
fill_argb = GetFillArgb(textobj);
}
}
CFX_AffineMatrix text_matrix;
textobj->GetTextMatrix(&text_matrix);
if(IsAvailableMatrix(text_matrix) == FALSE) {
return TRUE;
}
FX_FLOAT font_size = textobj->m_TextState.GetFontSize();
if (bPattern) {
DrawTextPathWithPattern(textobj, pObj2Device, pFont, font_size, &text_matrix, bFill, bStroke);
return TRUE;
}
#if defined(_FPDFAPI_MINI_)
if (bFill) {
bStroke = FALSE;
}
if (bStroke) {
if (font_size * text_matrix.GetXUnit() * pObj2Device->GetXUnit() < 6) {
bStroke = FALSE;
}
}
#endif
if (bClip || bStroke) {
const CFX_AffineMatrix* pDeviceMatrix = pObj2Device;
CFX_AffineMatrix device_matrix;
if (bStroke) {
const FX_FLOAT* pCTM = textobj->m_TextState.GetObject()->m_CTM;
if (pCTM[0] != 1.0f || pCTM[3] != 1.0f) {
CFX_AffineMatrix ctm(pCTM[0], pCTM[1], pCTM[2], pCTM[3], 0, 0);
text_matrix.ConcatInverse(ctm);
device_matrix.Copy(ctm);
device_matrix.Concat(*pObj2Device);
pDeviceMatrix = &device_matrix;
}
}
int flag = 0;
if (bStroke && bFill) {
flag |= FX_FILL_STROKE;
flag |= FX_STROKE_TEXT_MODE;
}
#if !defined(_FPDFAPI_MINI_) || defined(_FXCORE_FEATURE_ALL_)
//.........这里部分代码省略.........