0

webkit3 如何在 Linux 上解析其主要字体?

(在 libwebkitgtk-3.0 中出现分段错误。有人见过类似的问题吗?有没有办法解决它?如何在对系统进行最小更改的情况下调试或修复它?)

gdb 打印:

Program received signal SIGSEGV, Segmentation fault.
0x74a1bc87 in WebCore::RenderStyle::fontMetrics() const () from /lib/libwebkitgtk-3.0.so.0

安装 debuginfo 后的 gdb 回溯:

(gdb) bt
#0  primarySimpleFontData (...) at Source/WebCore/platform/graphics/FontGlyphs.h:123
#1  primaryFont           (...) at Source/WebCore/platform/graphics/Font.h:326
#2  fontMetrics           (...) at Source/WebCore/platform/graphics/Font.h:143
#3  WebCore::RenderStyle::fontMetrics 
                          (...) at Source/WebCore/rendering/style/RenderStyle.cpp:1335
#4  0x74a1bea3 in WebCore::RenderStyle::computedLineHeight 
                          (...) at Source/WebCore/rendering/style/RenderStyle.cpp:1376
#5  0x7488ef06 in WebCore::RenderBlock::lineHeight 
                          (...) at Source/WebCore/rendering/RenderBlock.cpp:6651

步骤导致:

Install pyjs.org following its readme file, set the virtualenv to pyjsroot/mypy. 
Install webkitgtk3 and pygobject3.
Source an environment setting file to set PATHONPATH to pyjsroot:/lib/python2.7/site-packages
Run in pyjsroot "mypy/bin/python examples/helloworld/Hello.py"

编辑:添加了 gdb 回溯。回溯告诉我 webkit 无法正确解析“主要字体”。从旧的“运行 pyjs 时在 fedora 20 上的 libwebkitgtk-3.0 中的分段”更改标题以反映这一点。

4

1 回答 1

0

改成Frdora 21,分段错误消失了,但是不能正确显示字符。安装了以下软件包,然后一切正常。

xorg-x11-fonts-ISO8859-1-100dpi

gnu-free-fonts-common
gnu-free-mono-fonts
gnu-free-sans-fonts
gnu-free-serif-fonts

不确定是否需要 xorg-x11-fonts-ISO8859-1-100dpi,但它确实带来了依赖关系。gnu-free-* 中,-common 是需要的,另外三个是需要的。如果不安装所有其他三个,字符只会以安装的任何字体显示。

上述字体应该也可以解决 Fedora 20 上的问题。

于 2014-06-02T15:30:39.653 回答