Commit 1f68bd26 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov

fonts dictionary

git-svn-id: svn://fileserver/activex/AVS/Sources/TeamlabOffice/trunk/ServerComponents@56326 954022d7-b5bf-4e40-9824-e11837661b57
parent e3efb9d6
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#include "FontUtils.h" #include "FontUtils.h"
#include "../../Common/XmlUtils.h" #include "../../Common/XmlUtils.h"
#include "../../DesktopEditor/freetype_names/FontMaps/FontDictionaryWorker.h"
static _bstr_t g_cpszXML_Font_Name = L"name"; static _bstr_t g_cpszXML_Font_Name = L"name";
static _bstr_t g_cpszXML_Font_Bold = L"bold"; static _bstr_t g_cpszXML_Font_Bold = L"bold";
static _bstr_t g_cpszXML_Font_Italic = L"italic"; static _bstr_t g_cpszXML_Font_Italic = L"italic";
...@@ -1109,6 +1111,11 @@ public: ...@@ -1109,6 +1111,11 @@ public:
} }
} }
bool bIsCorrectFromDict = NSFontDictionary::CorrectParamsFromDictionary(wsFamilyName, bBold, bItalic,
bFixedWidth, pPanose, ulRange1, ulRange2, ulRange3, ulRange4, ulCodeRange1, ulCodeRange2, usWeight, usWidth,
sFamilyClass, shAvgCharWidth, shAscent, shDescent, shLineGap, shXHeight, shCapHeight, bIsStyle,
bIsFixed, bIsPanose, bIsRanges, bIsWeight, bIsWidth, bIsFamilyClass, bIsAvgWidth, bIsAscent, bIsDescent, bIsLineGap, bIsXHeight, bIsCapHeight);
int nMinIndex = 0; // int nMinIndex = 0; //
int nMinPenalty = 0; // int nMinPenalty = 0; //
...@@ -1125,12 +1132,12 @@ public: ...@@ -1125,12 +1132,12 @@ public:
} }
ULONG arrCandRanges[6] = { pInfo->m_ulUnicodeRange1, pInfo->m_ulUnicodeRange2, pInfo->m_ulUnicodeRange3, pInfo->m_ulUnicodeRange4, pInfo->m_ulCodePageRange1, pInfo->m_ulCodePageRange2 }; ULONG arrCandRanges[6] = { pInfo->m_ulUnicodeRange1, pInfo->m_ulUnicodeRange2, pInfo->m_ulUnicodeRange3, pInfo->m_ulUnicodeRange4, pInfo->m_ulCodePageRange1, pInfo->m_ulCodePageRange2 };
//if ( bIsRanges ) if ( bIsRanges && bIsCorrectFromDict )
//{ {
// ULONG arrReqRanges[6] = { ulRange1, ulRange2, ulRange3, ulRange4, ulCodeRange1, ulCodeRange2 }; ULONG arrReqRanges[6] = { ulRange1, ulRange2, ulRange3, ulRange4, ulCodeRange1, ulCodeRange2 };
// nCurPenalty += GetSigPenalty( arrCandRanges, arrReqRanges ); nCurPenalty += GetSigPenalty( arrCandRanges, arrReqRanges );
//} }
if ( bIsFixed ) if ( bIsFixed )
nCurPenalty += GetFixedPitchPenalty( pInfo->m_bIsFixed, bFixedWidth ); nCurPenalty += GetFixedPitchPenalty( pInfo->m_bIsFixed, bFixedWidth );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment