[mcclim-devel] Freetype and CFFI
    Dmitri Hrapof 
    hrapof at common-lisp.ru
       
    Thu Dec  7 08:40:31 UTC 2006
    
    
  
(also posted to CFFI list)
Hello!
I'm trying to use libfreetype.so via CFFI.
What I hacked up so far is located here:
http://www.common-lisp.ru/cleft.asd
http://www.common-lisp.ru/cleft.lisp
The code like that works:
(with-freetype lib
	 (with-face lib (face "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf")
	   (docharmap (code face) 
              (format t "~a " (code-char code)))))
and prints out all glyphs in a font.
However, the following doesn't do what I want:
(with-freetype lib
	 (with-face lib (face "/usr/share/fonts/truetype/ttf-bitstream-vera/Vera.ttf")
	   (set-char-size face (* 16 64) (* 16 64) 300 300)
	   (glyph-pixarray face (char-code #\a))))
It returns #2A()
Looks like the whole bitmap structure is set to zeros.
I think I'm following FreeType and CFFI tutorials closely and 
I can't explain what's wrong...
Thank you for your help,
Dmitri
    
    
More information about the mcclim-devel
mailing list