Custom ggplot2 font via extrafont package - issue with loadfonts()

Hello there,
I am trying to deploy a Shiny App that uses the extrafont package to make a custom font accessible to ggplot2 graphics. While I managed to install and use every other package/dependency without a problem, extrafont seems to give me a bit of a headache.
The usual way of using the package is the following R code:

library("extrafont")
font_import(paths = "/some_folder/customFont.ttf", prompt = FALSE)   #Run once
loadfonts(device = "win") #Run once per session

I put the first two lines into an R script called “register.fonts.R” which I copy and then run via the dockerfile with:

COPY register.fonts.R /root/euler/www/
RUN Rscript /root/euler/www/register.fonts.R

I placed the call to the “loadfonts()” function (third line) in the global.R file as it should be run before every session.
However, this always throws an R error, stating that “windowsFonts()” function (a function that is called from within loadfonts() I suspect) is not recognized.
I guess the error arises due to the Linux-based architecture of the docker containers.
Does anyone have any experience with this issue or know a workaround?
I am a novice with shinyproxy so any help is greatly appreciated!
Best,
Luke