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

Add get_font_fallback on Windows #24

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

Conversation

moi15moi
Copy link
Owner

@moi15moi moi15moi commented Oct 21, 2024

No description provided.

It always crash on
<POINTER(IDWriteFont) ptr=0x2282e014950 at 2282df68c50>
Traceback (most recent call last):
  File "C:\Users\moi15moi\AppData\Local\Programs\Python\Python311\Lib\site-packages\comtypes\_post_coinit\unknwn.py", line 426, in __del__
    self.Release()
  File "C:\Users\moi15moi\AppData\Local\Programs\Python\Python311\Lib\site-packages\comtypes\_post_coinit\unknwn.py", line 560, in Release
    return self.__com_Release()  # type: ignore
           ^^^^^^^^^^^^^^^^^^^^
OSError: [WinError -1073741822] Windows Error 0xc0000002
Actually, I needed to exclude the null character when I call IDWriteFactory::CreateTextLayout and use font_ptr instead of font_ptr[0] when calling GetFontFromFontFace
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

Successfully merging this pull request may close these issues.

1 participant