Skip to content

Commit ff010ec

Browse files
author
pbsurf
committed
try font location for clean checkout
1 parent 81cc8ae commit ff010ec

4 files changed

Lines changed: 13 additions & 12 deletions

File tree

.github/workflows/write-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
submodules: recursive
2020
- name: Install dependencies
2121
run: sudo apt-get update && sudo apt-get install -y libsdl2-dev
22-
- run: make DEBUG=1 USE_SYSTEM_SDL=1
22+
- run: make DEBUG=1 SANITIZE=0 USE_SYSTEM_SDL=1
2323
working-directory: syncscribble
24-
- run: ./Debug/Write --test
24+
- run: ./Debug/Write --glRender=0 --test
2525
working-directory: syncscribble

syncscribble/Makefile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -283,11 +283,6 @@ else
283283
endif
284284
endif
285285

286-
ifneq ($(DEBUG), 0)
287-
# use asan by default for debug build
288-
SANITIZE = 1
289-
endif
290-
291286
# must use this instead of just -lpthread so the defines needed by force_glibc.h are created
292287
CFLAGS = -pthread
293288
# X11 and Xi needed for linuxtablet.c

syncscribble/Makefile.unix

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,14 @@ ifneq ($(DEBUG), 0)
2121
# rdynamic needed to get backtrace symbols from, e.g., catchsegv
2222
LDFLAGS += -rdynamic
2323
BUILDDIR ?= Debug
24+
# enable asan by default for debug build
25+
SANITIZE ?= 1
2426
else
2527
CFLAGS += -O2 -DNDEBUG
2628
BUILDDIR ?= Release
29+
SANITIZE ?= 0
2730
endif
2831

29-
SANITIZE ?= 0
3032
ifneq ($(SANITIZE), 0)
3133
CFLAGS += -fsanitize=address -fsanitize=undefined -fsanitize=float-divide-by-zero
3234
LDFLAGS += -lasan -lubsan

syncscribble/resources.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,16 @@ void setupResources()
8888
const char* sans = "SanFranciscoDisplay-Regular.otf";
8989
const char* fallback = "DroidSansFallback.ttf";
9090
#elif PLATFORM_LINUX
91-
const char* fontpath = Application::appDir.c_str();
92-
FSPath sansPath(fontpath, "Roboto-Regular.ttf");
93-
FSPath fallbackPath(fontpath, "DroidSansFallback.ttf");
91+
FSPath fontpath(Application::appDir);
92+
FSPath sansPath = fontpath.child("Roboto-Regular.ttf");
93+
if(!sansPath.exists()) {
94+
fontpath = FSPath(Application::appDir, "../../scribbleres/fonts/");
95+
sansPath = fontpath.child("Roboto-Regular.ttf");
96+
}
97+
FSPath fallbackPath = fontpath.child("DroidSansFallback.ttf");
9498
const char* sans = sansPath.c_str();
9599
const char* fallback = fallbackPath.c_str();
96-
//sansBoldPath = FSPath(fontpath, "Roboto-Bold.ttf");
100+
sansBackupPath = FSPath("/usr/share/fonts/truetype/dejavu/DejaVuSans.ttf");
97101
//sansItalicPath = FSPath(fontpath, "Roboto-Italic.ttf");
98102
#elif PLATFORM_EMSCRIPTEN
99103
Painter::loadFontMem("ui-sans", Roboto_Regular_ttf, Roboto_Regular_ttf_len);

0 commit comments

Comments
 (0)