I have this unique problem.
I am loading fonts with Python using code below:
gdi32 = ctypes.WinDLL('gdi32')
gdi32.AddFontResourceW.argtypes = (ctypes.c_wchar_p,)
gdi32.AddFontResourceW(FontsFileNamewithPAth)
While I am using c++ code in Visual Studio as below:
int x = AddFontResource(FontsFileNamewithPAth);
Both codes are working perfect
Now the problem..
Fonts installed with C++ code are not rendering in windows word versions 2013 and above. Word 2010 and below its working perfect . On all other software they are working fine.
In WORD, font is listed in the dropdown box but upon applying its not rendering.
While the same fonts installed with Python code are working fine.
I have C++ application and hence wants to use c++ code but This is something unique problem I am encountering.
I have tried using word "run with Administrator" and also in "Safe Mode" but problem was still the same.
It is important to note that problem is only in word versions 2013 and above.
Can anyone guide me what could be solution?
question from:
https://stackoverflow.com/questions/65840384/unique-problem-with-addfontresource-in-c 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…