Error rendering space character in mono mode with FreeType 2.2.1

View: New views
3 Messages — Rating Filter:   Alert me  

Error rendering space character in mono mode with FreeType 2.2.1

by Christian Prochaska :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Rendering the space character in mono mode fails with error code 6
with FreeType 2.2.1 (binary package from Debian testing). This didn't
happen with older FreeType versions and it still works fine with other
characters or with FT_RENDER_MODE_NORMAL. Test program attached.

Christian

[fttest.c]

#include <ft2build.h>
#include FT_FREETYPE_H

int main() {
  FT_Library library;
  FT_Face face;
  FT_GlyphSlot slot;
  FT_Error error;
  FT_UInt glyph_index;

  error = FT_Init_FreeType(&library);
  if (error) {
    printf("Error: FT_Init_FreeType(): error code %d\n", error);
    exit(1);
  }

  error = FT_New_Face(library,"Vera.ttf", 0, &face);
  if (error) {
    printf("Error: FT_New_Face(): error code %d\n", error);
    exit(1);
  }

  error = FT_Set_Pixel_Sizes(face, 0, 16);
  if (error) {
    printf("Error: FT_Set_Pixel_Sizes(): error code %d\n", error);
    exit(1);
  }

  glyph_index = FT_Get_Char_Index(face, ' ');
  printf("glyph_index = %d\n", glyph_index);

  error = FT_Load_Glyph(face, glyph_index, FT_LOAD_DEFAULT);
  if (error) {
    printf("Error: FT_Load_Glyph(): error code %d\n", error);
    exit(1);
  }
 
  error = FT_Render_Glyph(face->glyph, FT_RENDER_MODE_MONO);
  if (error) {
    printf("Error: FT_Render_Glyph(): error code %d\n", error);
    exit(1);
  }

  return 0;
}


_______________________________________________
Freetype mailing list
Freetype@...
http://lists.nongnu.org/mailman/listinfo/freetype

Re: Error rendering space character in mono mode with FreeType 2.2.1

by Werner LEMBERG :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


> Rendering the space character in mono mode fails with error code 6
> with FreeType 2.2.1 (binary package from Debian testing). This
> didn't happen with older FreeType versions and it still works fine
> with other characters or with FT_RENDER_MODE_NORMAL. Test program
> attached.

With the current CVS everything seems to work fine.  Please test.


    Werner


_______________________________________________
Freetype mailing list
Freetype@...
http://lists.nongnu.org/mailman/listinfo/freetype

Re: Error rendering space character in mono mode with FreeType 2.2.1

by Christian Prochaska :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 7/3/06, Werner LEMBERG <wl@...> wrote:

>
> > Rendering the space character in mono mode fails with error code 6
> > with FreeType 2.2.1 (binary package from Debian testing). This
> > didn't happen with older FreeType versions and it still works fine
> > with other characters or with FT_RENDER_MODE_NORMAL. Test program
> > attached.
>
> With the current CVS everything seems to work fine.  Please test.
>
>
>     Werner
>

yes, it works with the CVS version.

Christian


_______________________________________________
Freetype mailing list
Freetype@...
http://lists.nongnu.org/mailman/listinfo/freetype