Don't embed font in executable
Creating a Japanese build would require 4GB+ of RAM because of this. It's about time it got removed. It was a silly idea anyway.
This commit is contained in:
parent
b199feb944
commit
cf75cbcad2
8 changed files with 5 additions and 17 deletions
|
@ -243,11 +243,11 @@ list(APPEND CMAKE_MODULE_PATH
|
|||
|
||||
if(JAPANESE)
|
||||
set(BUILD_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/game_japanese")
|
||||
list(APPEND RESOURCES "BITMAP/pixel_jp.bmp" "FONT/NotoSansMonoCJKjp.otf")
|
||||
list(APPEND RESOURCES "BITMAP/pixel_jp.bmp")
|
||||
target_compile_definitions(CSE2 PRIVATE JAPANESE)
|
||||
else()
|
||||
set(BUILD_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/game_english")
|
||||
list(APPEND RESOURCES "BITMAP/pixel.bmp" "FONT/LiberationMono.ttf")
|
||||
list(APPEND RESOURCES "BITMAP/pixel.bmp")
|
||||
endif()
|
||||
|
||||
if(FIX_BUGS)
|
||||
|
|
2
Makefile
2
Makefile
|
@ -206,10 +206,8 @@ RESOURCES = \
|
|||
|
||||
ifeq ($(JAPANESE), 1)
|
||||
RESOURCES += BITMAP/pixel_jp.bmp
|
||||
RESOURCES += FONT/NotoSansMonoCJKjp.otf
|
||||
else
|
||||
RESOURCES += BITMAP/pixel.bmp
|
||||
RESOURCES += FONT/LiberationMono.ttf
|
||||
endif
|
||||
|
||||
ifneq ($(WINDOWS), 1)
|
||||
|
|
|
@ -618,10 +618,10 @@ void InitTextObject(const char *name)
|
|||
{
|
||||
(void)name; // Unused in this branch
|
||||
|
||||
size_t size;
|
||||
const unsigned char *data = FindResource("FONT", "FONT", &size);
|
||||
char path[MAX_PATH];
|
||||
sprintf(path, "%s/Font/font", gDataPath);
|
||||
|
||||
font = LoadFontFromData(data, size, 8 * magnification, 9 * magnification);
|
||||
font = LoadFont(path, 8 * magnification, 9 * magnification);
|
||||
}
|
||||
|
||||
void PutText(int x, int y, const char *text, unsigned long color)
|
||||
|
|
|
@ -27,11 +27,6 @@
|
|||
#endif
|
||||
#include "Resource/CURSOR/CURSOR_IKA.bmp.h"
|
||||
#include "Resource/CURSOR/CURSOR_NORMAL.bmp.h"
|
||||
#ifdef JAPANESE
|
||||
#include "Resource/FONT/NotoSansMonoCJKjp.otf.h"
|
||||
#else
|
||||
#include "Resource/FONT/LiberationMono.ttf.h"
|
||||
#endif
|
||||
#ifndef _WIN32
|
||||
#include "Resource/ICON/ICON_MINI.bmp.h"
|
||||
#endif
|
||||
|
@ -110,11 +105,6 @@ static const struct
|
|||
#endif
|
||||
{"CURSOR", "CURSOR_IKA", rCURSOR_IKA, sizeof(rCURSOR_IKA)},
|
||||
{"CURSOR", "CURSOR_NORMAL", rCURSOR_NORMAL, sizeof(rCURSOR_NORMAL)},
|
||||
#ifdef JAPANESE
|
||||
{"FONT", "FONT", rNotoSansMonoCJKjp, sizeof(rNotoSansMonoCJKjp)},
|
||||
#else
|
||||
{"FONT", "FONT", rLiberationMono, sizeof(rLiberationMono)},
|
||||
#endif
|
||||
#ifndef _WIN32
|
||||
{"ICON", "ICON_MINI", rICON_MINI, sizeof(rICON_MINI)},
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue