mirror of
https://github.com/bluenviron/mediamtx.git
synced 2026-01-10 04:11:59 -08:00
rpicamera: convert font into C header during compilation (#1638)
This commit is contained in:
parent
2dffccf9c1
commit
1b9584384c
5 changed files with 7 additions and 8435 deletions
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
BIN
internal/rpicamera/exe/text_font.ttf
Normal file
BIN
internal/rpicamera/exe/text_font.ttf
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue