rpicamera: convert font into C header during compilation (#1638)

This commit is contained in:
Alessandro Ros 2023-04-01 19:06:35 +02:00 committed by GitHub
parent 2dffccf9c1
commit 1b9584384c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 8435 deletions

View file

@ -578,6 +578,7 @@ The server can be compiled with native support for the Raspberry Pi Camera. Comp
* Go ≥ 1.20
* `libcamera-dev`
* `libfreetype-dev`
* `xxd`
* `patchelf`
Download the repository, open a terminal in it and run:

View file

@ -36,7 +36,10 @@ OBJS = \
all: exe
%.o: %.c
text_font.h: text_font.ttf
xxd --include $< > text_font.h
%.o: %.c text_font.h
$(CC) $(CFLAGS) -c $< -o $@
%.o: %.cpp

View file

@ -42,8 +42,8 @@ bool text_create(const parameters_t *params, text_t **text) {
error = FT_New_Memory_Face(
textp->library,
IBMPlexMono_Medium,
sizeof(IBMPlexMono_Medium),
text_font_ttf,
sizeof(text_font_ttf),
0,
&textp->face);
if (error) {

File diff suppressed because it is too large Load diff

Binary file not shown.