freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ft] Rendering Windows .fon files


From: Shayne Wissler
Subject: [ft] Rendering Windows .fon files
Date: Fri, 17 Mar 2006 11:50:06 -0700

Hi,

I am successfully rendering .ttf fonts but when I try a .fon font I get
junk--just looks like random pixels being set or scrambled versions of
the characters maybe. I use the same basic code for both, only changing
which fontpath I pass to FreeType:

  const char fontpath[] = "ProggyClean.ttf"; // Works great!
  //const char fontpath[] = "ProggyClean.fon"; // Doesn't work at all!
  FT_Init_FreeType(&library);
  FT_New_Face(library, fontpath, 0, &face);
  const int dpi = 96;  
  const int point = 10;
  int error = FT_Set_Char_Size(face, point * FT_UNITS, 0, dpi, dpi);
  if (error) crash();
  for (int i = 0; i < nglyphs; i++) {
    uchar load = (uchar(i));
    error = FT_Load_Char(face, load, FT_LOAD_RENDER);
    ...
 
Note: point size other than 10 crashes on the .fon font so I use 10.
Also, I am running this code on Linux, and using the font
"ProggyClean.fon".

Thanks for any help with this problem!


Regards,
 Shayne Wissler






reply via email to

[Prev in Thread] Current Thread [Next in Thread]