Bug 34032 - lcdtest: fatal error: can't open font
Summary: lcdtest: fatal error: can't open font
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: lcdtest (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Vitaly Lipatov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-19 17:19 MSK by Andrew Savchenko
Modified: 2017-10-20 18:52 MSK (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Savchenko 2017-10-19 17:19:46 MSK
After lcdtest installation:

$ lcdtest
fatal error: can't open font

$ strace -e file lcdtest
[...]
open("/usr/share/fonts/liberation/LiberationMono-Regular.ttf", O_RDONLY) = -1 ENOENT (No such file or directory)

As can be seen from the above, lcdtest tries to read from /usr/share/fonts/liberation, while fonts-ttf-liberation package puts it into /usr/share/fonts/ttf/liberation:

$ rpm -ql fonts-ttf-liberation | grep Mono-Regular
/usr/share/fonts/ttf/liberation/LiberationMono-Regular.ttf

lcdtest has hardcoded font path in the lcdtest.c:

lcdtest.c:745:
const char font_path [] = "/usr/share/fonts/liberation/LiberationMono-Regular.ttf";

This should be fixed. At the very least it should use correct path, preferably it should use some ttf font path finder.

(As a temporary workaround symlink liberation -> ttf/liberation in the /usr/share/fonts was created.)
Comment 1 Vitaly Lipatov 2017-10-20 18:47:53 MSK
Сделал исправление, после этого проверяю:
$ strings /usr/bin/lcdtest | grep fonts | xargs ls -l
-rw-r--r-- 1 rooter rooter 313408 Nov  9  2015 /usr/share/fonts/ttf/liberation/LiberationMono-Regular.ttf
Comment 2 Repository Robot 2017-10-20 18:52:44 MSK
lcdtest-1.18-alt2 -> sisyphus:

Fri Oct 20 2017 Vitaly Lipatov <lav@altlinux.ru> 1.18-alt2
- fix path to Liberation font and require package with it (ALT bug 34032)