On 28/11/2016 22:29, Lawrence D'Oliveiro wrote:
On Mon, 28 Nov 2016 13:09:24 +0000, Olumide wrote:#define FONT_HEIGHT 18 FT_Size_RequestRec req = { FT_SIZE_REQUEST_TYPE_BBOX , 0 , FONT_HEIGHT * 64 , 0 , 0 }; CHECK_STATUS( error , "Request size rec" ) FT_Request_Size( face , &req ); CHECK_STATUS( error , "Request size" )When I try something equivalent in Python: import sys import freetype2 as ft from freetype2 import \ FT face = ft.get_default_lib().find_face("sans-serif") sys.stdout.write("got face %s\n" % face.family_name) face.request_size \ ( reqtype = FT.SIZE_REQUEST_TYPE_BBOX, width = 0, height = 18, horiResolution = 0, vertResolution = 0 ) sys.stdout.write("face.ascender = %.3g\n" % face.ascender) I get freetype2.FTException: FreeType error 151 -- invalid ppem value I would suggest that you are getting the same error, without noticing.
Thanks for your reply and for pointing my attention to the Python bindings for FreeType.
I'd like to run your python scripts but I can't import freetype2 from python. (I can import freetype though. BTW, I installed freetype-py from here https://pypi.python.org/pypi/freetype-py/) I compiled freetype from source and I only have static library options (no dlls).
PS: are you suggesting that FreeType2 has a bug or that I'm doing something wrong.
Regards, - Olumide _______________________________________________ Freetype mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/freetype
