自动化 HTML 字体嵌入 PHP 后端
据我了解,css3.0 在最新的 Opera、Safari 和 Firefox 浏览器中正确支持 Font-Face 标记,但 Internet Explorer 仍然需要 microsoft .eot 格式。
鉴于托管服务器可能不是 Windows,是否有可靠的方法从 .ttf 生成 eot 文件服务器端?
我需要整个过程自动化,为了提供一些背景,它是一个打印产品网站,部分过程涉及设计人员构建模板和上传可打印产品的字体,其中一些具有可编辑区域,以 HTML 形式呈现给客户元素,但是如果不提供字体,就不可能提供准确的实时编辑预览。
Flash 和 Javascript 技术不起作用,因为文本位于文本区域或文本输入字段中并且必须保持可编辑状态。
所以我需要一个 Font-Face 链接到兼容浏览器的 ttf 文件,以及 ie 的其他内容 问题是,如何自动化 ie 的其他内容
谢谢
I understand that css3.0 supports the Font-Face tag, correctly in the latest Opera, Safari, and Firefox browsers, but that Internet Explorer still requires the microsoft .eot format.
Is there a reliable way to generate an eot file server side from a .ttf given that the hosting server may not be Windows?
I need the entire process automated, to provide a bit of background it is a print product website, part of the process involves designers building templates and uploading fonts for printable products, some of these have editable regions which are rendered to a customer as HTML form elements, however without providing the font it is impossible to provide an accurate real-time preview of the edit.
Flash and Javascript techniques wont work as the text is in a textarea or text input field and has to remain editable.
So I need a Font-Face linking to the ttf file for compatible browsers, and something else for i.e The question is, how to automate that something else for i.e.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
EOT 文件是一种奇怪的格式。它们应该被锁定到某个域,以防止复制,并且原始的转换应用程序很旧并且几乎无法运行。
我能想到的自动化TTF->EOT的唯一方法是使用命令行程序ttf2eot找到此处。在 PHP 中,您可以使用函数 system() 来运行命令行程序,前提是您的 Web 主机允许。
我希望这对你有帮助。
EOT files are a strange format. They are supposed to be locked down to a certain domain, to prevent copying, and the original conversion app is old and barely functioning.
The only way I can think of to automate TTF->EOT is to use the command line program ttf2eot found here. In PHP, you can use the function system() to run command line programs, assuming that your web host allows it.
I hope that helps you.