Phantomjs不渲染希伯来语字体 [英] Phantomjs not render hebrew fonts

查看:83
本文介绍了Phantomjs不渲染希伯来语字体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Centos 6.3上使用PhantomJs 1.9.2进行自动化ui测试.如果测试失败, 屏幕截图已保存到服务器.

I am using PhantomJs 1.9.2 on Centos 6.3 to for automated ui tests. When a test fails, screenshots are saved to the server.

我的问题是,即使屏幕截图已保存,它们也不包含可读字体.

My problem is that even though the screenshots are saved, they do not contain readable fonts.

因此,如果网站显示如下:

So if the website reads like this:

חייםטכנולוגיים

חיים טכנולוגיים

该网站的屏幕截图如下:

the screenshot of the site will look like this:

םםםםםםםםםםםםם

םםםםםםםםםםםםם

因此,它渲染并保存了小盒子,而不是实际的字母.

So, instead of the actual letters, it renders and saves little boxes.

系统为centos 6.3. Freetype和Fontconfig也已安装.

The system is centos 6.3. Freetype and Fontconfig are also installed.

我该如何解决这个问题?

How could I go about fixing this?

谢谢!

推荐答案

您应该使用python代码获取网站的屏幕截图.有两个模块可以满足您的所有需求 pyvirtualdisplay & .安装它们并编写一个类来创建屏幕截图,并使用命令行和您的代码对其进行调用. 祝你好运...

You should use python code for taking screenshots of website. there are two module which will do whatever you want pyvirtualdisplay & selenium. Install them and write a class to create screenshot and call it with command line with your code. Best of luck...

这篇关于Phantomjs不渲染希伯来语字体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆