Skip to content

Commit

Permalink
Lazy import for compute_sdf
Browse files Browse the repository at this point in the history
  • Loading branch information
rougier committed Dec 21, 2015
1 parent 9bccf61 commit d7e9ea6
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions glumpy/graphics/text/sdf_font.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
import numpy as np
from . font import Glyph
from glumpy.ext import freetype
from glumpy.ext.sdf import compute_sdf

# Lazy import to avoid problem on readthedocs.org
# from glumpy.ext.sdf import compute_sdf


def bilinear_interpolate(im, x, y):
Expand Down Expand Up @@ -79,6 +79,9 @@ def __getitem__(self, charcode):

def load_glyph(self, face, charcode):

# Lazy import to avoid problem on readthedocs.org
from glumpy.ext.sdf import compute_sdf

face.set_char_size( self._hires_size*64 )
face.load_char(charcode, freetype.FT_LOAD_RENDER |
freetype.FT_LOAD_NO_HINTING |
Expand Down

0 comments on commit d7e9ea6

Please sign in to comment.