Configuring dart content_shell on ubuntu trusty

ε祈祈猫儿з 提交于 2019-12-05 19:04:31

In my case, I needed some fonts.

You can see what errors contentshell has by viewing the log file, for my install location this is:

cat /opt/google/content_shell/content_shell.log

This showed me I was missing a bunch of fonts, which caused contentshell to silently fail.

The ones I had to install (or hack my way around since a lot of the fonts packages are huge, and since this is a Docker container I wanted to minimize bloat):

apt-get update && apt-get install fonts-tlwg-garuda

# fix dart content shell
mkdir /usr/share/fonts/truetype/kochi
cd /usr/share/fonts/truetype/kochi
ln -s ../dejavu/DejaVuSans-Bold.ttf kochi-gothic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf kochi-mincho.ttf

mkdir /usr/share/fonts/truetype/ttf-indic-fonts-core/
cd /usr/share/fonts/truetype/ttf-indic-fonts-core/
ln -s ../dejavu/DejaVuSans-Bold.ttf lohit_hi.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf lohit_ta.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf MuktiNarrow.ttf

mkdir /usr/share/fonts/truetype/ttf-punjabi-fonts/
cd /usr/share/fonts/truetype/ttf-punjabi-fonts/
ln -s ../dejavu/DejaVuSans-Bold.ttf lohit_pa.ttf
ln -s dejavu/ ttf-dejavu
cd /usr/share/fonts/truetype
ln -s dejavu/ ttf-dejavu

mkdir /usr/share/fonts/truetype/msttcorefonts/
cd /usr/share/fonts/truetype/msttcorefonts/
ln -s ../dejavu/DejaVuSans-Bold.ttf Arial.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Arial_Bold.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Arial_Bold_Italic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Arial_Italic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Comic_Sans_MS.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Comic_Sans_MS_Bold.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Courier_New.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Courier_New_Bold.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Courier_New_Bold_Italic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Courier_New_Italic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Georgia.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Georgia_Bold.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Georgia_Bold_Italic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Georgia_Italic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Impact.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Trebuchet_MS.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Trebuchet_MS_Bold.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Trebuchet_MS_Bold_Italic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Trebuchet_MS_Italic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Times_New_Roman.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Times_New_Roman_Bold.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Times_New_Roman_Bold_Italic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Times_New_Roman_Italic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Verdana.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Verdana_Bold.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Verdana_Bold_Italic.ttf
ln -s ../dejavu/DejaVuSans-Bold.ttf Verdana_Italic.ttf

Most of these were from this source code validation. It's far easier to find the list it's validating first instead of running the command and seeing the next one a million times.

You may wish to actually install this package.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!