-
Notifications
You must be signed in to change notification settings - Fork 107
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
Arithmetic operation resulted in an overflow #121
Comments
The types for 64 bit Windows are incorrect. You have
But this should be
|
It is complicated. Whereas what you are saying is strictly speak correct in the FreeType universe:
SharpFont suffers from some limitation from inconsistensies between C# and c-runtime on windows. |
Yea, I noticed. I used the exact BINARY version from SharpFont.Dependencies. If those are patched, and you know they are working on x64 on Windows, then it is possible that some other program installed a version of freetype in PATH without me knowing about that, and that it's using that - dllmap doesn't work in .NET Core btw - yet another problem. |
Hmm, you probably should do |
It has nothing to do with float - it fails on (int)rec.ascender casting an int64 to int32. By using regex to replace your FT_Long with mine, and using an unpatched freetype version, it works. Just checked - there is no freetype.dll in PATH anywhere. |
I don't have access to 64-bit windows machine at the moment, but with win64 mono under 64-bit wine, I get same answer under win64 as under x86_64 linux, which is
Granted I am using the freetype dll's I built though. You can have a go, grabbing the whole directory of https://github.com/HinTak/Font-Validator/tree/master/bin/Win64 . (it is built with mingw so have different dependencies; also I use a slightly larger win64 patch than FWIW, I am trying to look at HinTak/Font-Validator#27 , for my own purposes. |
I have same problem. |
On .NET-Core 2.0 x64, I get "Arithmetic operation resulted in an overflow." on reading the ascender...
I don't get what you're doing there - casting an int64 to an int32 ?
This can't work...
Dll's from SharpFont\Dependencies\freetype2\2.6-alldeps\msvc12\x64
Note:
On Linux with the same code, this runs just fine (font file path changed of course).
The text was updated successfully, but these errors were encountered: