Hello!
I continued to experiment with my Freetype bindings http://www.common-lisp.ru/cleft.asd http://www.common-lisp.ru/cleft.lisp and more strange behaviour was found.
Firstly, as I said earlier, FT_Load_Char(face, char, FT_LOAD_RENDER) doesn't work when called from Lisp. However, FT_Load_Char(face, char, FT_LOAD_DEFAULT) + FT_Render_Glyph(glyph, FT_RENDER_MODE_NORMAL) work.
Secondly, the following code
(with-freetype lib (with-face lib (face "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf") (set-char-size face 64 0 600 0) (with-foreign-object (matrix 'ft-matrix) (setf (foreign-slot-value matrix 'ft-matrix 'xx) (cos (deg->rad 22.5)) (foreign-slot-value matrix 'ft-matrix 'xy) (- (sin (deg->rad 22.5))) (foreign-slot-value matrix 'ft-matrix 'yx) (sin (deg->rad 22.5)) (foreign-slot-value matrix 'ft-matrix 'yy) (cos (deg->rad 22.5))) (ft-set-transform face matrix (null-pointer)) (glyph-pixarray face (char-code #\a)))))
rotates glyph and returns rendered bitmap, but this bitmap is always of the same size (for the given character), no matter what the resolution and height are (set by set-char-size)
Tested on Ubuntu 6.10 PPC + SBCL 1.0 or Clisp 2.41 and Fedora Core 3 i386 + SBCL 0.9.15
Looks like some C functions work and some other do not... Why?
Thank you for answers and Happy Christmas! Dmitri
I have to apologize for my stupid questions.
It turned out that I just incorrectly declared bitfield ft-load-flags (my flags started from 1, ought to be 0) and what I thought was FT_LOAD_DEFAULT was in fact FT_LOAD_NO_SCALE. So Ft_Load_Char was not working as expected, and no scaling was applied either! :)
Beg your pardon once more, Dmitri