AWS上的GD字体path用于.ttf

在常规的AWS EC2实例中是否有可用的path的标准字体? 我需要提供一个.ttf文件的完整path来使用GDgraphics工具的基本function。 AWS不会让我将.ttffile upload到主应用程序文件中。 我需要使用/设置S3存储桶吗? 服务器和GD工具是否能够使用直接path到S3上托pipe的.ttf文件?

任何解决方法? 我会很高兴在这一点上任何.ttf字体文件,将工作的GD。 我不需要任何自定义字体,只是gd工具可以访问的任何字体的path:

或多或less,这里是我创build的节点模块的代码,使用处理的数据制作图像:

//forum-sig.js var gd = require('nod-gd') module.exports{ createSig: function(text, name){ var sigimg = gd.createSync(360, 180); var red = sigimg.colorAllocate(255, 0, 0) var white = sigimg.collorAllocate(255,255,255); // set full path to file // example var fontPath = '/full/path/to/font.ttf'; var fontPath = './public/OpenSans-Bold.ttf' //this path works locally // WHAT path can I use on AWS ? will S3 work? are there public fonts // on AWS that i can find a path to? // Render string in image // example img.stringFT(txtColor, fontPath, 24, 0, 10, 60, 'Hello world!'); sigimg.stringFT(white, fontPath, 18, 0, 15, 35, text) sigimg.saveFile('public/images/' + name + '.png'); } } 

这再次在我的本地计算机上工作。 我相信我成功地加载了库和node-gyp和node-gd模块。 我只是得到一个错误,他们无法find一个字体,因为.. AWS似乎不会上传一个.ttf文件,我还没有find一种方法给其他地方的path。