mkdocs-pdf-export-plugin icon indicating copy to clipboard operation
mkdocs-pdf-export-plugin copied to clipboard

ERROR: Failed to load font

Open zhaoterryy opened this issue 6 years ago • 4 comments

Non-fatal error related to loading fonts such as:

Reproducible with or without PDF combined option.

ERROR: Failed to load font at "file:///D:/github-system-modernization/BOK/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
Converting 15 files to PDF took 21.5s

zhaoterryy avatar Jan 15 '19 22:01 zhaoterryy

More logs:

ERROR: Failed to load stylesheet at file://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css : URLError: <urlopen error [Errno 2] No such file or directory: '/font-awesome/4.7.0/css/font-awesome.min.css'> ERROR: Failed to load stylesheet at file://cdn.jsdelivr.net/font-hack/2.018/css/hack.min.css : URLError: <urlopen error [Errno 2] No such file or directory: '/font-hack/2.018/css/hack.min.css'> ERROR: Failed to load stylesheet at file://fonts.googleapis.com/css?family=PT+Sans:400,400italic,700,700italic&subset=latin-ext,latin : URLError: <urlopen error [Errno 2] No such file or directory: '/css'> ERROR: Failed to load stylesheet at file://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,700italic,400,300,600,700&subset=latin-ext,latin : URLError: <urlopen error [Errno 2] No such file or directory: '/css'>

zhaoterryy avatar Jan 16 '19 15:01 zhaoterryy

The Failed to load font error seems to be caused by Weasyprint not supporting Woff2 fonts, as stated in their documentation.

The same error occurs for eot fonts, which is an old format for < IE9.

raqbit avatar Jan 31 '19 15:01 raqbit

I have this too, very anoying:

I am running this in mm-docs docker container and I get the following output behind the proxy if it is disabled

Error converting demo.md to PDF: 'demo/' is not in list
ERROR: Failed to load stylesheet at https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono : URLError: <urlopen error [Errno -3] Try again>
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
ERROR: Failed to load stylesheet at https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono : URLError: <urlopen error [Errno -3] Try again>
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
ERROR: Failed to load stylesheet at https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono : URLError: <urlopen error [Errno -3] Try again>
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
ERROR: Failed to load stylesheet at https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono : URLError: <urlopen error [Errno -3] Try again>
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
ERROR: Failed to load stylesheet at https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono : URLError: <urlopen error [Errno -3] Try again>
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
ERROR: Failed to load stylesheet at https://fonts.googleapis.com/css?family=Roboto:300,400,40

On build server (also behind proxy, I get this)

ERROR: Failed to load stylesheet at https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono : URLError: <urlopen error [Errno 99] Address not available>
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
ERROR: Failed to load stylesheet at https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono : URLError: <urlopen error [Errno 99] Address not available>
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
ERROR: Failed to load stylesheet at https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono : URLError: <urlopen error [Errno 99] Address not available>
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
....

Passing http_proxy and friends to docker container makes it like this:

ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
ERROR: Failed to load font at "file:///docs/source/site/assets/fonts/specimen/MaterialIcons-Regular.woff2"
....

majkinetor avatar Feb 27 '19 11:02 majkinetor

No solution to this?

dartie avatar Mar 07 '23 21:03 dartie