Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No fonts configured on alpine linux - how to add them #50

Open
MrFloppy opened this issue Jan 24, 2021 · 1 comment
Open

No fonts configured on alpine linux - how to add them #50

MrFloppy opened this issue Jan 24, 2021 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@MrFloppy
Copy link

MrFloppy commented Jan 24, 2021

Hi and thank you for your really great work with this plugin.

Unfortunately I got an error when building my documentation and I do not know how to fix it. Maybe you can help me:
/usr/local/lib/python3.8/site-packages/weasyprint/fonts.py:227: UserWarning: FontConfig: No fonts configured. Expect ugly output. warnings.warn(

I have the following fonts set:
font: text: Barlow code: Roboto Mono

is the error I get, when I build my mkdocs-material on docker (alpine). Did I miss a dependency?

Thanks in advance!

@orzih orzih added the documentation Improvements or additions to documentation label Jan 25, 2021
@orzih
Copy link
Owner

orzih commented Jan 25, 2021

WeasyPrint(v52.2) does not yet fully support Web fonts(WOFF/WOFF2). see WeasyPrint: features fonts.

I think you can install some fonts in your alpine docker image.
Please see here and try it:

# Additional font
COPY fonts /usr/share/fonts/Additional
RUN apk --update --upgrade --no-cache add fontconfig ttf-freefont font-noto terminus-font \
&& fc-cache -f \
&& fc-list | sort

and see also Alpine linux fonts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants