Open buzmeg opened 5 years ago
I think the documentation is mis-worded - width and height are both 26.6 fractional numbers . It is a special type of integer to mean x / 64, when you write x. (I.e. 128 means 2 , 96 means 1.5). Hres and vres are just integers, not floats. They are passed directly to freetype as documented in freetype's documentation.
Closing.
The crash probably should be avoided. Again, this is a good and somewhat easy to fix first issue for new contributors.
There are code elsewhere checking the type of inputs (e.g. file names are byte arrays, what freetype c expects, and python 3 strings are converted to byte arrays) and convert if mismatch to what freetype expects. This is a good new contributor issue to add such.
set_char_size() claims to take floats as parameters in the documentation. However, if you feed it a float, freetype-py crashes.
face.set_char_size(128, 128, 128, 128) works fine
face.set_char_size(128.0, 128, 128, 128) crashes with: