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




_______________________________________________
Freetype mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype

Reply via email to