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

windows: access violation loading ToyFontFace #356

Open
time4tea opened this issue Jan 21, 2024 · 0 comments
Open

windows: access violation loading ToyFontFace #356

time4tea opened this issue Jan 21, 2024 · 0 comments

Comments

@time4tea
Copy link

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.

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

No branches or pull requests

1 participant