dtjkl42086 2012-02-03 10:08
浏览 67
已采纳

在linux中列出可用字体[关闭]

I'm programming a custom bit of hardware (a media box) running a custom build of Linux (tangox 2.6.29.6-18-sigma #2 PREEMPT Tue Dec 20 14:00:43 UTC 2011 mips GNU/Linux) and need to find out what fonts are available on this system.

Globally, my task is to quiz a web service for some content and display it on the system (i.e. on the TV screen), but not all characters I receive from the "outside world" can be rendered via the font used by the media box. Fonts on the media box are outside of my control, as is the firmware - I have to get on with what I've got via the supported PHP API.

Question 1: How would I list all fonts available on the box, along with their supported character ranges? (We suspect that the font being used does not render some of the chars we need - so my issues can't be solved by just making sure everything is UTF8.)

I've tried:

xlsfonts (command not found)
/etc/X11/ (dir does not exist)
fc-list (command not found)

...none of the above helped.

I've located some fonts in:

ls -al /firmware/fonts

-rw-r--r--    1 root     root        42643 Dec 31  1969 verdana-108-subset.aaf
-rw-r--r--    1 root     root       236340 Dec 31  1969 verdana-25.aaf
-rw-r--r--    1 root     root       426097 Dec 31  1969 verdana-34.aaf
-rw-r--r--    1 root     root       696763 Dec 31  1969 verdana-44.aaf
-rw-r--r--    1 root     root       834851 Dec 31  1969 verdana-48.aaf
-rw-r--r--    1 root     root         1539 Dec 31  1969 webdings-30.aaf
-rw-r--r--    1 root     root         5517 Dec 31  1969 webdings-38.aaf
-rw-r--r--    1 root     root         4509 Dec 31  1969 webdings-49.aaf

But I want to be sure that there are no other fonts hidden somewhere around the system and used by the firmware.

Question 2: Once I know the character range I can display in, is there a fool-proof way to strip out everything outside that range (I can do that), but simplify some of the fancy characters (e.g. accented e) into their English counter-parts? And last but not least - does anyone know of an existing PHP library that would do most of this for me?

P.S. Sorry if this question is a bit too n00bish - I'm not a Linux guru and don't have an intimate understanding of fonts/encodings.

  • 写回答

1条回答 默认 最新

  • doujiaozhan4397 2012-02-03 10:14
    关注

    Answer for Q1.

    This

    xlsfonts (command not found)
    /etc/X11/ (dir does not exist)
    fc-list (command not found)
    

    doesn't work because xorg-xserver not installed. If it is planned then you have only console fonts on your box (surely you don't have X11 fonts if you don't have X11 (xserver) itself). To list console fonts use ls -l /usr/share/consolefonts (on most distributions).

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 这个电路是如何实现路灯控制器的,原理是什么,怎么求解灯亮起后熄灭的时间如图?
  • ¥15 matlab数字图像处理频率域滤波
  • ¥15 在abaqus做了二维正交切削模型,给刀具添加了超声振动条件后输出切削力为什么比普通切削增大这么多
  • ¥15 ELGamal和paillier计算效率谁快?
  • ¥15 file converter 转换格式失败 报错 Error marking filters as finished,如何解决?
  • ¥15 ubuntu系统下挂载磁盘上执行./提示权限不够
  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 关于#r语言#的问题:差异分析前数据准备,报错Error in data[, sampleName1] : subscript out of bounds请问怎么解决呀以下是全部代码:
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)