[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft] Need help: newbee question
From: |
varun shrivastava |
Subject: |
[ft] Need help: newbee question |
Date: |
Fri, 11 Jun 2010 10:50:50 +0530 |
Hi,
i am new to freetype, tried some test case but i am facing some problem in understanding.
After initializing library and face, i tried creating a bitmap for character 'C' and than setting size as
error = FT_Set_Char_Size(face, 0, 12*64, 300, 300);
which gave me an image like [1].
Than i changed the size to 16 as
error = FT_Set_Char_Size(face, 0, 16*64, 300, 300);
which gave me an image like [2].
Than i changed the dpi in the above call to 200.
error = FT_Set_Char_Size(face, 0, 16*64, 200, 200);
which gave me an image like [3].
If you look at [2] the drawing is slanted. I am drawing the bitmap on to a cairo surface and than dumping it into png file.
Which gets fixed if i change the 300dpi to 200dpi.
One more thing i did was to print the bitmap on screen (for all cases), which was properly printed (no slanting of character).
Can some one help me out to understand this.
Thanks
Varun
[1]: 12(300x300dpi.png)
[2]: 16(300x300dpi.png)
[3]: 16(200x200dpi.png)
12(300x300dpi).png
Description: PNG image
16(300x300dpi).png
Description: PNG image
16(200x200dpi).png
Description: PNG image
- [ft] Need help: newbee question,
varun shrivastava <=