mirror of
https://github.com/Xevion/time-banner.git
synced 2025-12-08 06:08:42 -06:00
Include arial & inter fonts, load into fontdb
This commit is contained in:
@@ -30,6 +30,7 @@ RUN groupadd $APP_USER \
|
|||||||
&& mkdir -p ${APP}
|
&& mkdir -p ${APP}
|
||||||
|
|
||||||
COPY --from=builder /time-banner/target/release/time-banner ${APP}/time-banner
|
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}
|
RUN chown -R $APP_USER:$APP_USER ${APP}
|
||||||
|
|
||||||
|
|||||||
BIN
src/fonts/arial.ttf
Normal file
BIN
src/fonts/arial.ttf
Normal file
Binary file not shown.
@@ -27,6 +27,7 @@ pub fn get() -> Result<Vec<u8>, RenderError> {
|
|||||||
|
|
||||||
let mut fontdb = fontdb::Database::new();
|
let mut fontdb = fontdb::Database::new();
|
||||||
fontdb.load_system_fonts();
|
fontdb.load_system_fonts();
|
||||||
|
fontdb.load_fonts_dir("./fonts");
|
||||||
|
|
||||||
let svg_data = include_bytes!("../test.svg");
|
let svg_data = include_bytes!("../test.svg");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user