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

RuntimeError: Freetype library not found #301

Closed
Hammad-hab opened this issue Jul 25, 2022 · 5 comments
Closed

RuntimeError: Freetype library not found #301

Hammad-hab opened this issue Jul 25, 2022 · 5 comments

Comments

@Hammad-hab
Copy link

Hammad-hab commented Jul 25, 2022

Hi, I am trying to learn OpenGL in python by using glumpy and when try to run the folllowing code on MacOS:

from glumpy import app, gloo, gl


vertex = """
  uniform float scale;
  attribute vec2 position;
  attribute vec4 color;
  varying vec4 v_color;
  void main()
  {
    gl_Position = vec4(scale*position, 0.0, 1.0);
    v_color = color;
  } """

fragment = """
  varying vec4 v_color;
  void main()
  {
      gl_FragColor = v_color;
  } """
  
quad = gloo.Program(vertex, fragment, count=4)

quad['color'] = [ (1,0,0,1), (0,1,0,1), (0,0,1,1), (1,1,0,1) ]
quad['position'] = [ (-1,-1),   (-1,+1),   (+1,-1),   (+1,+1)   ]
quad['scale'] = 1.0

window = app.Window()
@window.event
def on_draw(dt):
    window.clear()
    quad.draw(gl.GL_TRIANGLE_STRIP)
app.run()

it keeps giving me raise RuntimeError('Freetype library not found') RuntimeError: Freetype library not found
I know that this error is a duplicate of #249 but it doesn't solve my problem because I can't find a freetype.dll for MacOS

@rougier
Copy link
Member

rougier commented Aug 8, 2022

Can you install freetype-py and check if it works?

@Hammad-hab
Copy link
Author

I have already installed freetype-py via pip

@tovacinni
Copy link

You may also have to run condo install freetype on OSX

@rougier
Copy link
Member

rougier commented Aug 31, 2022

Does import freetype works?

@liruilong940607
Copy link

brew install freetype should work on MAC.

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