inkfish321 发表于 2011-9-23 18:27:46

UBUNTU上找不到X11R6

最近在搞gstreamer

需要用到插件timeoverlay

gst-launch -v videotestsrc pattern=0 ! \
timeoverlay valign="bottom" halign="center" text="Stream time:" ! \
autovideosink demux.

运行发现没有找到字库所以显示的字都是一个个框框。

于是读插件代码 在函数gst_time_overlay_init找到设置字体的代码

font_description = pango_font_description_new ();
pango_font_description_set_family_static (font_description, "monospace");
pango_font_description_set_style (font_description, PANGO_STYLE_NORMAL);
pango_font_description_set_variant (font_description, PANGO_VARIANT_NORMAL);
pango_font_description_set_weight (font_description, PANGO_WEIGHT_NORMAL);
pango_font_description_set_stretch (font_description, PANGO_STRETCH_NORMAL);
pango_font_description_set_size (font_description, 18 * PANGO_SCALE);
pango_context_set_font_description (context, font_description);
pango_font_description_free (font_description);

之前我对LINUX字体设置一点都不懂。

后来上网搜了一下资源linux字体是由/etc/fonts/fonts.conf 配置的。
发现fonts.conf 里面设置的字体文件目录是

<!-- Font directory list -->

        <dir>/usr/share/fonts</dir>
       
        <dir>~/.fonts</dir>

但是一检测IMX233 SDK编译后生成的根文件系统没有/usr/share/fonts这个目录。

后来查看编译发现fontconfig.spec有一段内容
perl -pi -e 's,^</fontconfig>,
<dir>%{_prefix}/X11R6/lib/X11/fonts/TTF</dir>
<dir>%{_prefix}/X11R6/lib/X11/fonts/Type1</dir>
<dir>%{_prefix}/X11R6/lib/X11/fonts/truetype</dir>
</fontconfig>

但在我的UBUNTU上找不到X11R6

现在不知道要怎么办了。
页: [1]
查看完整版本: UBUNTU上找不到X11R6