AutoXchange 2024 Technical Documentation

No sudo permission for Font Installation

Installing Linux fonts (see Font Installation) normally requires SUDO permission to copy the font file to /user/share/fonts and to run fc-cache. However, if you do not have SUDO permission on your system (for instance, on a shared server) there is a work-around. You can use the Font Mapping file (ax_font_map.txt) to map a font to a given TrueType Font file. This works just like a normal Font Mapping but you give the full path and not just the file name.

[map]
fangsong_gb2312 ==> fangsong
SIMHEI ==> /home/company/fonts/SIMHEI.TTF

The fist line is just the standard mapping of “fangsong_gb2312” to plain “fangsong”. The second line maps SIMHEI (text case is immaterial, so SIMHEI, SimHei and simhei or even SiMhEi would all work) to the “/home/company/fonts/SIMHEI.TTF” font file. This font path IS case sensitive on Linux, so “/home/company/fonts/SIMHEI.TTF” and “/home/company/fonts/simhei.ttf” are not the same, while they would be treated the same on Windows.

Last updated on 26 May 2020
Published on 26 May 2020