django - Emojis do not render well on Heroku with Pillow but they do locally -


i using pillow 4.2 in django 1.10 application insert text containing unicode emojis on images. whole thing runs on python 2.7 backward compatibility reasons.

locally works charm. way using opensansemojis.tff font.

when push code on heroku though, emoji characters not displayed , "square" character instead (▯). said, accented characters such 'é', 'è', 'ç', etc. displayed correctly.

i should add function run celery 4.* worker (separate dyno on heroku).

what tried already

i tried set pythonioencoding did not help.

i tried use the trick mentioned here didn't either.

ok bit hard figure out think heroku running narrow build of python whereas running "wide" build on laptop.

this explains why emoji characters displayed locally fail in production exact same code , dependencies installed.

in order force heroku use "wide" build, used conda buildpack instead of default buildpack python applications. conda seems run wide build , need anyway because pillow/pil cannot installed default buildpack.


Comments

Popular posts from this blog

Add new key value to json node in java -

javascript - Highcharts Synchronized charts with missing data points -

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -