Fix bug 58096

This commit is contained in:
Oleg Korshul
2022-09-15 16:33:08 +03:00
parent 4982e1e1ed
commit 1873515006
7 changed files with 29 additions and 8 deletions

View File

@ -1156,6 +1156,8 @@ HRESULT CGraphicsRenderer::CommandLong(const LONG& lType, const LONG& lCommand)
{
if (c_nDarkMode == lType && m_pRenderer)
m_pRenderer->m_bIsDarkMode = (1 == lCommand);
if (c_nUseDictionaryFonts == lType && m_pFontManager)
m_pFontManager->SetUseCorrentFontByName((1 == lCommand) ? true : false);
return S_OK;
}
HRESULT CGraphicsRenderer::CommandDouble(const LONG& lType, const double& dCommand)

View File

@ -106,6 +106,7 @@ const long c_nParamFlipX = 0x0001;
const long c_nParamFlipY = 0x0002;
const long c_nFlipNextRotate = 0x0004;
const long c_nDarkMode = 0x0008;
const long c_nUseDictionaryFonts = 0x0010;
// типы рендерера
const long c_nUnknownRenderer = 0x0000;

View File

@ -475,6 +475,9 @@ namespace NSOnlineOfficeBinToPdf
LONG lRendererType = 0;
pRenderer->get_Type(&lRendererType);
// из команд js - точные имена
pRenderer->CommandLong(c_nUseDictionaryFonts, 0);
CommandType eCommand = ctError;
bool bIsPathOpened = false;

View File

@ -715,6 +715,8 @@ namespace NSFonts
virtual void GetLimitsY(double& dMin, double& dMax) = 0;
virtual int GetUnderline(float *pfStartX, float *pfStartY, float *pfEndX, float *pfEndY, float *pfSize) = 0;
virtual void SetUseCorrentFontByName(const bool& use) = 0;
public:
static IFontFile* LoadFontFile(CLibrary& library, IFontStream* pStream, int lFaceIndex);
};