[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ft] FT_Load_Glyph returns an error
From: |
YuGiOhJCJ Mailing-List |
Subject: |
[ft] FT_Load_Glyph returns an error |
Date: |
Fri, 11 Nov 2016 14:27:43 +0100 |
Hello,
I have a problem with wine [1] at runtime.
Regarding the backtrace [2], it seems that there is a relationship with
freetype (or maybe harfbuzz).
So, I am trying for the first time to write a minimal C program that is using
freetype in order to see if I am able to reproduce the problem:
---
#include <ft2build.h> /* for FT_Init_FreeType */
#include <stdlib.h> /* for exit */
#include FT_FREETYPE_H
int main()
{
/* https://www.freetype.org/freetype2/docs/tutorial/step1.html */
FT_Library library;
FT_Face face;
FT_UInt glyph_index;
int error = FT_Init_FreeType(&library);
if(error != 0)
{
fprintf(stderr, "Unable to initialize the library.\n");
exit(EXIT_FAILURE);
}
error = FT_New_Face(library, "Arial.TTF", 0, &face);
if(error != 0)
{
fprintf(stderr, "Unable to load the font face.\n");
exit(EXIT_FAILURE);
}
glyph_index = FT_Get_Char_Index(face, 0x00041);
error = FT_Load_Glyph(face, glyph_index, 0);
if(error != 0)
{
fprintf(stderr, "Unable to load the glyph image.\n");
exit(EXIT_FAILURE);
}
exit(EXIT_SUCCESS);
}
---
Unfortunately, when I try to call the "FT_Load_Glyph" function, the returned
value is not 0 (which means that there is a failure):
---
gcc -std=c89 -pedantic -Wall -Werror `pkg-config freetype2 --cflags --libs`
main.c
$ ./a.out
Unable to load the glyph image.
---
What is the reason please?
Thank you.
Best regards.
[1] https://www.winehq.org/
[2] https://forum.winehq.org/viewtopic.php?f=8&t=27879#p107932
- [ft] FT_Load_Glyph returns an error,
YuGiOhJCJ Mailing-List <=
- Re: [ft] FT_Load_Glyph returns an error, Lawrence D'Oliveiro, 2016/11/11
- Re: [ft] FT_Load_Glyph returns an error, YuGiOhJCJ Mailing-List, 2016/11/12
- Re: [ft] FT_Load_Glyph returns an error, Werner LEMBERG, 2016/11/12
- Re: [ft] FT_Load_Glyph returns an error, YuGiOhJCJ Mailing-List, 2016/11/12
- Re: [ft] FT_Load_Glyph returns an error, Werner LEMBERG, 2016/11/13
- Re: [ft] FT_Load_Glyph returns an error, YuGiOhJCJ Mailing-List, 2016/11/13
- Re: [ft] FT_Load_Glyph returns an error, Werner LEMBERG, 2016/11/13