Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb609d5 commit e05c2faCopy full SHA for e05c2fa
src/ft2font.cpp
@@ -4,8 +4,12 @@
4
5
#include "numpy/arrayobject.h"
6
7
-#define FIXED_MAJOR(val) (*((short *) &val+1))
8
-#define FIXED_MINOR(val) (*((short *) &val+0))
+/*
+ By definition, FT_FIXED as 2 16bit values stored in a single long.
9
+ We cast to long to ensure the correct Py::Int convertor is called
10
+ */
11
+#define FIXED_MAJOR(val) (long) ((val & 0xffff000) >> 16)
12
+#define FIXED_MINOR(val) (long) (val & 0xffff)
13
14
/**
15
To improve the hinting of the fonts, this code uses a hack
0 commit comments