1
1
mirror of https://github.com/Kozea/WeasyPrint.git synced 2024-10-05 08:27:22 +03:00

Restrict altered behavior to win. Dont annoy.

This commit is contained in:
Tontyna 2018-03-16 00:33:31 +01:00
parent 84ae39ead4
commit 23d7dac5b4

View File

@ -46,6 +46,10 @@ else:
pangoft2 = dlopen(ffi, 'pangoft2-1.0', 'libpangoft2-1.0-0',
'libpangoft2-1.0.so', 'libpangoft2-1.0.dylib')
except Exception as err:
# dont alter behavior on other platforms!
if not sys.platform.startswith('win'):
raise err
else:
warnings.warn("'@font-face not supported: {0}".format(err))
fontconfig = None
pangoft2 = None