[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft-devel] Trying to get a simple FreeType program to work right
From: |
Shayne Wissler |
Subject: |
[ft-devel] Trying to get a simple FreeType program to work right |
Date: |
Sun, 13 Nov 2005 14:02:15 -0700 |
User-agent: |
KMail/1.7.1 |
Hi,
I've got a program that uses FreeType to create a texture map an OpenGL
program uses to render glyphs. I've gotten it to work OK when rendering the
"ttf-bitstream-vera-1.10" font, but haven't gotten many others to work right.
One I'd like to get working is called "ProggyClean". The instructions for this
font say that it can only be rendered properly at 12 points, I think I'm
doing that but the rendered font is almost unreadable. I wonder if I'm just
not setting some parameters right, if anyone could give me some help I'd
appreciate it!
Here's what I'm doing basically:
int dpi = 72
int point = 12
FT_Init_FreeType
FT_New_Face fontpath
FT_Set_Char_Size(face, point * dpi, 0, 0, 0);
FT_Load_Char(face, glyph_i, FT_LOAD_RENDER);
I use the resulting face->glyph and copy its bitmap into a char array that I
use to set the texture map with. I can think of two alternatives for why it's
not working right:
1. I'm misusing the FT API here for this font. The point size isn't set
directly, I'm just assuming that "12 * 72" is the right number, maybe that's
wrong, or maybe I'm doing something else wrong.
2. My OpenGL texture mapping method is for some other reason breaking down
with this font.
Shayne
- [ft-devel] Trying to get a simple FreeType program to work right,
Shayne Wissler <=