2021-12-06 16:07:01 +00:00
|
|
|
diff --git a/weasyprint/text/ffi.py b/weasyprint/text/ffi.py
|
2022-11-04 12:27:35 +00:00
|
|
|
index 09f614aad..cbe9a73dd 100644
|
2021-12-06 16:07:01 +00:00
|
|
|
--- a/weasyprint/text/ffi.py
|
|
|
|
+++ b/weasyprint/text/ffi.py
|
2022-11-04 12:27:35 +00:00
|
|
|
@@ -415,22 +415,11 @@ def _dlopen(ffi, *names):
|
|
|
|
with suppress((OSError, FileNotFoundError)):
|
|
|
|
os.add_dll_directory(dll_directory)
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-12-06 16:07:01 +00:00
|
|
|
-gobject = _dlopen(
|
|
|
|
- ffi, 'gobject-2.0-0', 'gobject-2.0', 'libgobject-2.0-0',
|
2022-01-13 20:06:32 +00:00
|
|
|
- 'libgobject-2.0.so.0', 'libgobject-2.0.dylib', 'libgobject-2.0-0.dll')
|
2021-12-06 16:07:01 +00:00
|
|
|
-pango = _dlopen(
|
|
|
|
- ffi, 'pango-1.0-0', 'pango-1.0', 'libpango-1.0-0', 'libpango-1.0.so.0',
|
2022-01-13 20:06:32 +00:00
|
|
|
- 'libpango-1.0.dylib', 'libpango-1.0-0.dll')
|
2021-12-06 16:07:01 +00:00
|
|
|
-harfbuzz = _dlopen(
|
|
|
|
- ffi, 'harfbuzz', 'harfbuzz-0.0', 'libharfbuzz-0',
|
2022-01-13 20:06:32 +00:00
|
|
|
- 'libharfbuzz.so.0', 'libharfbuzz.so.0', 'libharfbuzz.0.dylib',
|
|
|
|
- 'libharfbuzz-0.dll')
|
2021-12-06 16:07:01 +00:00
|
|
|
-fontconfig = _dlopen(
|
2022-01-13 20:06:32 +00:00
|
|
|
- ffi, 'fontconfig-1', 'fontconfig', 'libfontconfig', 'libfontconfig.so.1',
|
2022-11-04 12:27:35 +00:00
|
|
|
- 'libfontconfig.1.dylib', 'libfontconfig-1.dll')
|
2021-12-06 16:07:01 +00:00
|
|
|
-pangoft2 = _dlopen(
|
|
|
|
- ffi, 'pangoft2-1.0-0', 'pangoft2-1.0', 'libpangoft2-1.0-0',
|
2022-01-13 20:06:32 +00:00
|
|
|
- 'libpangoft2-1.0.so.0', 'libpangoft2-1.0.dylib', 'libpangoft2-1.0-0.dll')
|
2021-12-06 16:07:01 +00:00
|
|
|
+gobject = _dlopen(ffi, '@gobject@')
|
|
|
|
+pango = _dlopen(ffi, '@pango@')
|
|
|
|
+harfbuzz = _dlopen(ffi, '@harfbuzz@')
|
|
|
|
+fontconfig = _dlopen(ffi, '@fontconfig@')
|
|
|
|
+pangoft2 = _dlopen(ffi, '@pangoft2@')
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-11-04 12:27:35 +00:00
|
|
|
gobject.g_type_init()
|