Added OFD rendering to the renderer

This commit is contained in:
Green
2025-03-24 18:34:04 +03:00
parent 7252d29579
commit 925c40aa80
33 changed files with 1186 additions and 207 deletions

View File

@ -1,16 +1,35 @@
#include "../OfdFile.h"
#include <iostream>
#include "../../DesktopEditor/common/Directory.h"
#include "../../DesktopEditor/common/File.h"
#include "../../DesktopEditor/graphics/pro/Fonts.h"
#include "../../DesktopEditor/fontengine/ApplicationFontsWorker.h"
int main()
{
OFD::COfdFile oOfdFile;
// Check system fonts
CApplicationFontsWorker oWorker;
oWorker.m_sDirectory = NSFile::GetProcessDirectory() + L"/fonts_cache";
oWorker.m_bIsNeedThumbnails = false;
oOfdFile.SetTempDir(L"temp");
if (!NSDirectory::Exists(oWorker.m_sDirectory))
NSDirectory::CreateDirectory(oWorker.m_sDirectory);
NSFonts::IApplicationFonts* pFonts = oWorker.Check();
COFDFile oOfdFile(pFonts);
oOfdFile.SetTempDirectory(L"temp");
if (oOfdFile.LoadFromFile(L"YOUR_PATH"))
std::cout << "GOOD" << std::endl;
else
std::cout << "BAD" << std::endl;
oOfdFile.ConvertToRaster(0, L"result.png", 4);
pFonts->Release();
return 0;
}

View File

@ -2,19 +2,29 @@ QT -= core
QT -= gui
TARGET = test
CONFIG += console
CONFIG -= app_bundle
TEMPLATE = app
DEFINES += OFD_USE_DYNAMIC_LIBRARY
SOURCES += main.cpp
CONFIG += console
CONFIG -= app_bundle
s
CORE_ROOT_DIR = $$PWD/../../
PWD_ROOT_DIR = $$PWD
include($$CORE_ROOT_DIR/Common/base.pri)
include($$CORE_ROOT_DIR/Common/3dParty/icu/icu.pri)
ADD_DEPENDENCY(kernel, UnicodeConverter, OFDFile)
ADD_DEPENDENCY(kernel, graphics, UnicodeConverter, OFDFile)
DESTDIR = $$PWD/build/$$CORE_BUILDS_PLATFORM_PREFIX
win32 {
LIBS += -lgdi32 \
-ladvapi32 \
-luser32 \
-lshell32
}
linux-g++ | linux-g++-64 | linux-g++-32 {
LIBS += -lz
}
SOURCES += main.cpp
DESTDIR = $$PWD_ROOT_DIR/build/$$CORE_BUILDS_PLATFORM_PREFIX/$$CORE_BUILDS_CONFIGURATION_PREFIX