Skip to content

Add get_font_fallback on Windows - #24

Draft
moi15moi wants to merge 4 commits into
mainfrom
Add-get_font_fallback
Draft

Add get_font_fallback on Windows#24
moi15moi wants to merge 4 commits into
mainfrom
Add-get_font_fallback

Conversation

@moi15moi

@moi15moi moi15moi commented Oct 21, 2024

Copy link
Copy Markdown
Owner

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