It turns out that one of our mupdf patch reads the FONTDIR env var and uses it in a totally different way so we will use another env var EXT_FONT_DIR to define external font directory for different platforms.