This commit is contained in:
Svetlana Kulikova
2023-10-09 16:29:19 +03:00
parent 5ce26e6dca
commit 3ce05adc4d

View File

@ -2350,7 +2350,7 @@ bool CPdfWriter::DrawTextToRenderer(const unsigned int* unGid, const unsigned in
// TODO pdf позволяет создание своего шрифта, но не следует это использовать для воссоздания шрифта запрещенного для редактирования или встраивания // TODO pdf позволяет создание своего шрифта, но не следует это использовать для воссоздания шрифта запрещенного для редактирования или встраивания
Aggplus::CGraphicsPathSimpleConverter simplifier; Aggplus::CGraphicsPathSimpleConverter simplifier;
simplifier.SetRenderer(m_pRenderer); simplifier.SetRenderer(m_pRenderer);
m_pFontManager->LoadFontByName(m_oFont.GetName(), m_oFont.GetSize(), (int)m_oFont.GetFaceIndex(), 72.0, 72.0); m_pFontManager->LoadFontByName(m_oFont.GetName(), m_oFont.GetSize(), (int)m_oFont.GetStyle(), 72.0, 72.0);
PathCommandEnd(); PathCommandEnd();
if (simplifier.PathCommandText2(L"", (const int*)unGid, unLen, m_pFontManager, dX, dY, 0, 0)) if (simplifier.PathCommandText2(L"", (const int*)unGid, unLen, m_pFontManager, dX, dY, 0, 0))
{ {
@ -2377,7 +2377,10 @@ bool CPdfWriter::UpdateFont()
if (L"" == wsFontPath) if (L"" == wsFontPath)
{ {
if (!GetFontPath(m_oFont.GetName(), m_oFont.IsBold(), m_oFont.IsItalic(), wsFontPath, lFaceIndex)) if (!GetFontPath(m_oFont.GetName(), m_oFont.IsBold(), m_oFont.IsItalic(), wsFontPath, lFaceIndex))
{
m_pFont = NULL;
return false; return false;
}
} }
m_oFont.SetNeedDoBold(false); m_oFont.SetNeedDoBold(false);