Permalink
Browse files

change for ttf again

  • Loading branch information...
sdpython committed Jan 9, 2018
1 parent c6ac842 commit 7034eb2a1660beeaf5c878109708826e9e7b847b
Showing with 2 additions and 6 deletions.
  1. +0 −2 .circleci/config.yml
  2. +0 −2 .travis.yml
  3. +2 −2 src/code_beatrix/faq/faq_video.py
View
@@ -25,8 +25,6 @@ jobs:
name: Install font
command: |
sudo apt-get install -y libfreetype6-dev
mkdir -p ~/.local/share/fonts
wget -nc https://github.com/google/fonts/tree/master/apache/roboto/Roboto-Regular.ttf -O ~/.local/share/fonts/Roboto-Regular.ttf || true
- run:
name: Install tex
View
@@ -17,8 +17,6 @@ install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- mkdir -p ~/.local/share/fonts
- wget -nc https://github.com/google/fonts/tree/master/apache/roboto/Roboto-Regular.ttf -O ~/.local/share/fonts/Roboto-Regular.ttf || true
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
@@ -635,11 +635,11 @@ def video_text(text, font=None, fontsize=32, size=None,
if sys.platform.startswith('win'):
font = "arial.ttf"
else:
exp = '/usr/share/fonts/truetype' # os.path.expanduser('~')
exp = '/usr/share/fonts/truetype/dejavu' # os.path.expanduser('~')
d = exp # os.path.join(exp, '.local', 'share', 'fonts')
if not os.path.exists(d):
raise FileNotFoundError("Unable to find '{0}'".format(d))
font = os.path.join(d, "FreeSans.ttf")
font = os.path.join(d, "DejaVuSans.ttf")
if not os.path.exists(font):
raise FileNotFoundError("Unable to find font '{0}'. Available:\n{1}".format(
font, "\n".join(os.listdir(d))))

0 comments on commit 7034eb2

Please sign in to comment.