Include arial & inter fonts, load into fontdb

This commit is contained in:
2023-06-16 21:13:54 -05:00
parent 5c828ddb16
commit 5eef1517e6
3 changed files with 2 additions and 0 deletions

View File

@@ -30,6 +30,7 @@ RUN groupadd $APP_USER \
&& mkdir -p ${APP}
COPY --from=builder /time-banner/target/release/time-banner ${APP}/time-banner
COPY --from=builder /time-banner/src/fonts ${APP}/fonts
RUN chown -R $APP_USER:$APP_USER ${APP}

BIN
src/fonts/arial.ttf Normal file
View File

Binary file not shown.

View File

@@ -27,6 +27,7 @@ pub fn get() -> Result<Vec<u8>, RenderError> {
let mut fontdb = fontdb::Database::new();
fontdb.load_system_fonts();
fontdb.load_fonts_dir("./fonts");
let svg_data = include_bytes!("../test.svg");