fix nativegraphics test

This commit is contained in:
Kulikova Svetlana
2021-12-21 11:18:39 +03:00
parent 92e2385650
commit 67facf5e69
3 changed files with 7 additions and 2 deletions

View File

@ -5,6 +5,7 @@ TARGET = wasmgraphics
TEMPLATE = app
CONFIG += console
CONFIG += object_parallel_to_source
CONFIG -= app_bundle
DEFINES += TEST_AS_EXECUTABLE \
@ -629,6 +630,7 @@ SOURCES += \
$$PDF_ROOT_DIR/Src/RendererOutputDev.cpp \
$$PDF_ROOT_DIR/Src/Adaptors.cpp \
$$PDF_ROOT_DIR/Src/GfxClip.cpp \
$$PDF_ROOT_DIR/Resources/BaseFonts.cpp \
$$PDF_ROOT_DIR/PdfReader.cpp
HEADERS +=\
@ -646,6 +648,7 @@ HEADERS +=\
$$PDF_ROOT_DIR/Resources/Fontn022023l.h \
$$PDF_ROOT_DIR/Resources/Fontn022024l.h \
$$PDF_ROOT_DIR/Resources/Fonts050000l.h \
$$PDF_ROOT_DIR/Resources/BaseFonts.h \
$$PDF_ROOT_DIR/Src/RendererOutputDev.h \
$$PDF_ROOT_DIR/Src/Adaptors.h \
$$PDF_ROOT_DIR/Src/MemoryUtils.h \

View File

@ -78,7 +78,7 @@
#include "debug.h"
#if defined(__linux__) || defined(LINUX)
#if defined(__linux__) || defined(LINUX) || defined (BUILDING_WASM_MODULE)
typedef unsigned int UINT;
#endif

View File

@ -61,6 +61,7 @@
#define FONTS_USE_AFM_SETTINGS
#else
#define FONTS_USE_ONLY_MEMORY_STREAMS
#ifndef TEST_AS_EXECUTABLE
#include "emscripten.h"
EM_JS(char*, js_get_stream_id, (unsigned char* data, unsigned char* status), {
return self.AscViewer.CheckStreamId(data, status);
@ -70,6 +71,7 @@ EM_JS(int, js_free_id, (unsigned char* data), {
return 1;
});
#endif
#endif
class CMemoryFontStream
{
@ -1229,7 +1231,7 @@ namespace PdfReader
wsFileName = pFontInfo->m_wsFontPath;
eFontType = pFont->isCIDFont() ? fontCIDType2 : fontTrueType;
#ifdef BUILDING_WASM_MODULE
#if defined(BUILDING_WASM_MODULE) && !defined(TEST_AS_EXECUTABLE)
BYTE nStatus = 0;
NSWasm::CData oRes;
oRes.SkipLen();