glumpy icon indicating copy to clipboard operation
glumpy copied to clipboard

RuntimeError: Freetype library not found

Open Hammad-hab opened this issue 3 years ago • 5 comments

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 https://github.com/glumpy/glumpy/issues/249 but it doesn't solve my problem because I can't find a freetype.dll for MacOS

Hammad-hab avatar Jul 25 '22 11:07 Hammad-hab

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

rougier avatar Aug 08 '22 14:08 rougier

I have already installed freetype-py via pip

Hammad-hab avatar Aug 13 '22 12:08 Hammad-hab

You may also have to run condo install freetype on OSX

tovacinni avatar Aug 15 '22 18:08 tovacinni

Does import freetype works?

rougier avatar Aug 31 '22 08:08 rougier

brew install freetype should work on MAC.

liruilong940607 avatar Sep 03 '22 18:09 liruilong940607