windows: access violation loading ToyFontFace
time4tea opened this issue · 0 comments
time4tea commented
Using ToyFontFace on pycairo windows 10 seems to have a problem, causing immediate program exit
import faulthandler
import cairo
import os
faulthandler.enable()
print([x for x in os.listdir('c:/windows/fonts') if "arial" in x])
# try arial, Arial, arial.ttf
face = cairo.ToyFontFace("arial.ttf", cairo.FONT_SLANT_NORMAL, cairo.FONT_WEIGHT_NORMAL)
print(face)
will result in
Windows fatal exception: access violation
Current thread 0x000017e8 (most recent call first):
File "C:\Users\james\AppData\Roaming\JetBrains\PyCharm2023.3\scratches\scratch.py", line 11 in <module>
This is repeatable every time.
pycairo information:
Obtaining dependency information for pycairo==1.25.1 from https://files.pythonhosted.org/packages/fe/d2/f1712b8b36a7e9ba06a4ee00f538e45b9845165d0cb786242d3c76bafc93/pycairo-1.25.1-cp311-cp311-win_amd64.whl.metadata
Using cached pycairo-1.25.1-cp311-cp311-win_amd64.whl.metadata (2.8 kB)
Sorry I don't know too much about windows, so can't really make any useful suggestions. Thanks for taking a look.