Commit 3eacf0b7 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander Trofimov
parent ece0f269
......@@ -1296,7 +1296,7 @@ void CFontList::SetDefaultFont(std::wstring& sName)
}
}
void CFontList::LoadFromArrayFiles(CArray<std::wstring>& oArray)
void CFontList::LoadFromArrayFiles(CArray<std::wstring>& oArray, int nFlag)
{
int nCount = oArray.GetCount();
......@@ -1494,7 +1494,8 @@ void CFontList::LoadFromArrayFiles(CArray<std::wstring>& oArray)
EFontFormat eFormat = GetFontFormat( pFace );
if (eFormat != fontTrueType)
bool bSupportFont = ((eFormat == fontTrueType) || ((nFlag & 1) && (eFormat == fontOpenType)));
if (!bSupportFont)
{
FT_Done_Face( pFace );
continue;
......@@ -1795,7 +1796,9 @@ CArray<std::wstring> CApplicationFonts::GetSetupFontFiles()
#endif
#if defined(_MAC) && !defined(_IOS)
return NSDirectory::GetFiles(L"/Library/Fonts", true);
CArray<std::wstring> _array = NSDirectory::GetFiles(L"/Library/Fonts", true);
NSDirectory::GetFiles2(L"/System/Library/Fonts", _array, true);
return _array;
#endif
#ifdef _IOS
......@@ -1807,9 +1810,9 @@ CArray<std::wstring> CApplicationFonts::GetSetupFontFiles()
return ret;
}
void CApplicationFonts::InitializeFromArrayFiles(CArray<std::wstring>& files)
void CApplicationFonts::InitializeFromArrayFiles(CArray<std::wstring>& files, int nFlag)
{
m_oList.LoadFromArrayFiles(files);
m_oList.LoadFromArrayFiles(files, nFlag);
}
#if defined(_WIN32) || defined (_WIN64)
......
......@@ -209,7 +209,7 @@ public:
void ToBuffer(BYTE** pDstData, LONG* pLen, std::wstring strDirectory = L"", bool bIsOnlyFileName = false);
public:
void LoadFromArrayFiles(CArray<std::wstring>& arrFiles);
void LoadFromArrayFiles(CArray<std::wstring>& arrFiles, int nFlag = 0);
void LoadFromFolder(const std::wstring& strDirectory);
bool CheckLoadFromFolderBin(const std::wstring& strDirectory);
void Add(CFontInfo* pInfo);
......@@ -238,7 +238,7 @@ public:
void Initialize(bool bIsCheckSelection = true);
CArray<std::wstring> GetSetupFontFiles();
void InitializeFromArrayFiles(CArray<std::wstring>& files);
void InitializeFromArrayFiles(CArray<std::wstring>& files, int nFlag = 0);
#if defined(_WIN32) || defined (_WIN64)
void InitFromReg();
......
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