[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft-devel] Antialiasing
From: |
huels |
Subject: |
Re: [ft-devel] Antialiasing |
Date: |
Wed, 22 Mar 2006 02:04:09 -0800 (PST) |
Hey Werner,
here a little example:
#include <stdio.h>
#include <ft2build.h>
#include FT_FREETYPE_H
void printPixel(FT_Bitmap* bitmap)
{
int i,j,count=0;
for(i=0;i<=(bitmap->rows-1);i++)
{
for(j=0;j<=(bitmap->width-1);j++)
{
printf("Pixel %d:%d %d\n",i,j,(unsigned short)bitmap->buffer[count]);
count++;
}
}
}
int main(void)
{
FT_Library library;
FT_Face face;
FT_GlyphSlot slot;
FT_Error error;
error = FT_Init_FreeType( &library );
printf("INIT...%d\n",error);
error = FT_New_Face( library, "arial.ttf", 0, &face );
printf("FACE...%d\n",error);
error = FT_Set_Char_Size( face, 10*64, 0,92, 0 );
printf("SIZE...%d\n",error);
error = FT_Load_Char( face, '@', FT_LOAD_RENDER | FT_LOAD_MONOCHROME );
printf("RENDER...%d\n",error);
printPixel(&face->glyph->bitmap);
FT_Done_Face(face);
FT_Done_FreeType(library);
return 0;
}
This gives me not a 1 Bit Bitmap. The Bitmap is still with antialiasing. I
get not only the values 0 and 255.
What is the problem? Thanks for your help.
Regards Stephan
--
View this message in context:
http://www.nabble.com/Antialiasing-t1313311.html#a3529413
Sent from the Freetype - Dev forum at Nabble.com.