Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How fix src/free_glyph.c:9:60: error: ‘FT_RENDER_MODE_SDF’ undeclared (first use in this function); did you mean ‘FT_RENDER_MODE_MAX’? #84

Open
Sharabaddin opened this issue Apr 3, 2023 · 4 comments

Comments

@Sharabaddin
Copy link

Sharabaddin commented Apr 3, 2023

src/free_glyph.c:9:60: error: ‘FT_RENDER_MODE_SDF’ undeclared (first use in this function); did you mean ‘FT_RENDER_MODE_MAX’?

How fix it error?

@Sharabaddin Sharabaddin changed the title src/free_glyph.c:9:60: error: ‘FT_RENDER_MODE_SDF’ undeclared (first use in this function); did you mean ‘FT_RENDER_MODE_MAX’? How fix src/free_glyph.c:9:60: error: ‘FT_RENDER_MODE_SDF’ undeclared (first use in this function); did you mean ‘FT_RENDER_MODE_MAX’? Apr 3, 2023
@BillKek
Copy link
Contributor

BillKek commented Apr 7, 2023

Is this define from the FreeType library? Maybe you have a very old version of FreeType?

@Sharabaddin
Copy link
Author

Sharabaddin commented Apr 12, 2023

@BillKek how check?

@BitPigeon
Copy link

BitPigeon commented May 9, 2023

I am having this same issue. I have installed the latest version of FreeType and all other dependancies, but I am getting this error:

src/free_glyph.c:9:60: error: ‘FT_RENDER_MODE_SDF’ undeclared (first use in this function); did you mean ‘FT_RENDER_MODE_MAX’?
    9 |     FT_Int32 load_flags = FT_LOAD_RENDER | FT_LOAD_TARGET_(FT_RENDER_MODE_SDF);
      |                                                            ^~~~~~~~~~~~~~~~~~

I am also getting this:

/usr/include/freetype2/freetype/freetype.h:3135:47: note: in definition of macro ‘FT_LOAD_TARGET_’
 3135 | #define FT_LOAD_TARGET_( x )   ( (FT_Int32)( (x) & 15 ) << 16 )
      |                                               ^
src/free_glyph.c:9:60: note: each undeclared identifier is reported only once for each function it appears in
    9 |     FT_Int32 load_flags = FT_LOAD_RENDER | FT_LOAD_TARGET_(FT_RENDER_MODE_SDF);
      |                                                            ^~~~~~~~~~~~~~~~~~
/usr/include/freetype2/freetype/freetype.h:3135:47: note: in definition of macro ‘FT_LOAD_TARGET_’
 3135 | #define FT_LOAD_TARGET_( x )   ( (FT_Int32)( (x) & 15 ) << 16 )
      |

I think this project looks really promising, and I hope the error is resolved soon, as I am looking forward to trying it out.

@abhinavpatel0
Copy link

i am getting same error

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants