LinuxForum.Fans
Тема

Шрифты fontconfig

Автор: soln 10 сообщений 3375 просмотров
#116125

Приветствую.
Возникли проблемы с шрифтами, к сожелению я не очень понимаю в чем корень проблем. при обращение к шрифтам (к примеру при

1 установке шрифта:
Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>
Fontconfig error: out of memoryНастраивается пакет msttcorefonts

2 dpkg-reconfigure fontconfig
Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>
Fontconfig error: out of memory

При обращение из WINE@Etersoft
Fontconfig warning: no <cachedir> elements found. Check configuration.
Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>
Fontconfig warning: no <cachedir> elements found. Check configuration.

Как это лечить?

#116358

выполни команды:
free
ls -lRa ~/.fontconfig
ls /var/cache/fontconfig/*

желательно еще
strace fontconfig

и закинь сюда результат.
Если результат длинный - для ls интересно начало, для strace - конец.

#116359

и концигурационный файл /etc/fontconfig кинь.

#116386

~$ free
total used free shared buffers cached
Mem: 3498368 300268 3198100 0 33652 225760
-/+ buffers/cache: 40856 3457512
Swap: 9767480 0 9767480

ls -lRa ~/.fontconfig
/home/soln/.fontconfig:
итого 216
drwxr-xr-x 2 soln soln 4096 Янв 12 15:19 .
drwxr-xr-x 34 soln soln 4096 Янв 12 19:41 ..
-rw-r--r-- 1 soln soln 80 Янв 9 18:09 111149350c6eff283e78acef98e70f62-x86.cache-2
-rw-r--r-- 1 soln soln 80 Янв 9 18:09 21a99156bb11811cef641abeda519a45-x86.cache-2
-rw-r--r-- 1 soln soln 192 Янв 9 18:09 3830d5c3ddfd5cd38a049b759396e72e-x86.cache-2
-rw-r--r-- 1 soln soln 1688 Янв 9 18:09 4794a0821666d79190d59a36cb4f44b5-x86.cache-2
-rw-r--r-- 1 soln soln 88 Янв 9 18:09 6333f38776742d18e214673cd2c24e34-x86.cache-2
-rw-r--r-- 1 soln soln 25192 Янв 9 18:09 6d41288fd70b0be22e8c3a91e032eec0-x86.cache-2
-rw-r--r-- 1 soln soln 10696 Янв 9 18:09 6eb3985aa4124903f6ff08ba781cd364-x86.cache-2
-rw-r--r-- 1 soln soln 128 Янв 9 18:09 707971e003b4ae6c8121c3a920e507f5-x86.cache-2
-rw-r--r-- 1 soln soln 76992 Янв 9 18:09 79419bd48d02a13c99ff08cf82c31dca-x86.cache-2
-rw-r--r-- 1 soln soln 104 Янв 9 18:09 94322f4d3cdf1bd54794b691285ca062-x86.cache-2
-rw-r--r-- 1 soln soln 23768 Янв 9 18:09 945677eb7aeaf62f1d50efc3fb3ec7d8-x86.cache-2
-rw-r--r-- 1 soln soln 288 Янв 9 18:09 c855463f699352c367813e37f3f70ea7-x86.cache-2
-rw-r--r-- 1 soln soln 19864 Янв 9 18:09 cabbd14511b9e8a55e92af97fb3a0461-x86.cache-2
-rw-r--r-- 1 soln soln 112 Янв 9 18:09 d82eb4fd963d448e2fcb7d7b793b5df3-x86.cache-2
-rw-r--r-- 1 soln soln 80 Янв 9 18:09 eeebfc908bd29a90773fd860017aada4-x86.cache-2
-rw-r--r-- 1 soln soln 80 Янв 9 18:09 fe547fea3a41b43a38975d292a2b19c7-x86.cache-2

~$ ls /var/cache/fontconfig/*
/var/cache/fontconfig/111149350c6eff283e78acef98e70f62-x86.cache-2 /var/cache/fontconfig/6d41288fd70b0be22e8c3a91e032eec0-x86.cache-2 /var/cache/fontconfig/945677eb7aeaf62f1d50efc3fb3ec7d8-x86.cache-2
/var/cache/fontconfig/21a99156bb11811cef641abeda519a45-x86.cache-2 /var/cache/fontconfig/6eb3985aa4124903f6ff08ba781cd364-x86.cache-2 /var/cache/fontconfig/c855463f699352c367813e37f3f70ea7-x86.cache-2
/var/cache/fontconfig/365b55f210c0a22e9a19e35191240f32-x86.cache-2 /var/cache/fontconfig/707971e003b4ae6c8121c3a920e507f5-x86.cache-2 /var/cache/fontconfig/cabbd14511b9e8a55e92af97fb3a0461-x86.cache-2
/var/cache/fontconfig/3830d5c3ddfd5cd38a049b759396e72e-x86.cache-2 /var/cache/fontconfig/79419bd48d02a13c99ff08cf82c31dca-x86.cache-2 /var/cache/fontconfig/d82eb4fd963d448e2fcb7d7b793b5df3-x86.cache-2
/var/cache/fontconfig/4794a0821666d79190d59a36cb4f44b5-x86.cache-2 /var/cache/fontconfig/7ef2298fde41cc6eeb7af42e48b7d293-x86.cache-2 /var/cache/fontconfig/eeebfc908bd29a90773fd860017aada4-x86.cache-2
/var/cache/fontconfig/6333f38776742d18e214673cd2c24e34-x86.cache-2 /var/cache/fontconfig/94322f4d3cdf1bd54794b691285ca062-x86.cache-2 /var/cache/fontconfig/fe547fea3a41b43a38975d292a2b19c7-x86.cache-2

~$ strace fontconfig
strace: fontconfig: command not found

:~$ sudo strace fontconfig/
execve("fontconfig/", ["fontconfig/"], [/* 14 vars */]) = -1 EACCES (Permission denied)
dup(2) = 3
fcntl64(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat64(3, {st_mode=S_IFCHR|0620, st_rdev=makedev(136, 0), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb77bd000
_llseek(3, 0, 0xbff1d3bc, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: Permission denied\n"..., 32strace: exec: Permission denied
) = 32
close(3) = 0
munmap(0xb77bd000, 4096) = 0
exit_group(1) = ?

/etc/fonts/fonts.conf огромен но как я понимаю информативно начало так как далее идут настройки для каждого шрифта.

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<!-- /etc/fonts/fonts.conf file to configure system font access -->
<fontconfig>

<!--
DO NOT EDIT THIS FILE.
IT WILL BE REPLACED WHEN FONTCONFIG IS UPDATED.
LOCAL CHANGES BELONG IN 'local.conf'.

The intent of this standard configuration file is to be adequate for
most environments. If you have a reasonably normal environment and
have found problems with this configuration, they are probably
things that others will also want fixed. Please submit any
problems to the fontconfig bugzilla system located at fontconfig.org

Note that the normal 'make install' procedure for fontconfig is to
replace any existing fonts.conf file with the new version. Place
any local customizations in local.conf which this file references.

Keith Packard
-->

<!-- Font directory list -->

<dir>/usr/share/fonts</dir>
<dir>/usr/X11R6/lib/X11/fonts</dir>
<dir>~/.fonts</dir>

<!--
Accept deprecated 'mono' alias, replacing it with 'monospace'
-->
<match target="pattern">
<test qual="any" name="family">
<string>mono</string>
</test>
<edit name="family" mode="assign">
<string>monospace</string>
</edit>
</match>

<!--
Accept alternate 'sans serif' spelling, replacing it with 'sans-serif'
-->
<match target="pattern">
<test qual="any" name="family">
<string>sans serif</string>
</test>
<edit name="family" mode="assign">
<string>sans-serif</string>
</edit>
</match>

<!--
Accept deprecated 'sans' alias, replacing it with 'sans-serif'
-->
<match target="pattern">
<test qual="any" name="family">
<string>sans</string>
</test>
<edit name="family" mode="assign">
<string>sans-serif</string>
</edit>
</match>

<!--
Mark common families with their generics so we'll get
something reasonable
-->

#116395

попробуй выполнить fc-cache -r

#116398

~$ fc-cache -r
Fontconfig warning: no <cachedir> elements found. Check configuration.
Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>
~$

#116399

Fontconfig error: out of memory - нету?

попробуй wine теперь запустить.

насколько понял, такое бывает, если сильно много шрифтов, в результате fc-cache -f падает по памяти на обновлении кэша.

#116402

то же самое

winecfg
Warning: could not find DOS drive for current working directory '/home/soln', starting in the Windows directory.
Warning: could not find DOS drive for current working directory '/home/soln', starting in the Windows directory.
Fontconfig warning: no <cachedir> elements found. Check configuration.
Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>
Warning: could not find DOS drive for current working directory '/home/soln', starting in the Windows directory.
Fontconfig warning: no <cachedir> elements found. Check configuration.
Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>
Fontconfig warning: no <cachedir> elements found. Check configuration.
Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
Fontconfig warning: adding <cachedir>~/.fontconfig</cachedi

sudo aptitude purge msttcorefonts
Fontconfig warning: adding <cachedir>/var/cache/fontconfig</cachedir>
Fontconfig warning: adding <cachedir>~/.fontconfig</cachedir>
Fontconfig error: out of memoryУдаляется пакет cabextract...
Обрабатываются триггеры для man-db ...
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
Чтение информации о расширенных состояниях
Инициализация состояний пакетов... Готово
Запись информации расширенных состояний... Готово
Чтение описаний задач... Готово

то есть как и раньше он ругается но делает но шрифты в wine@etersoft не те.
А нельзя увеличить количество памяти ну кп римеру из файла /etc/security/limits.conf

~$ sudo cat /etc/security/limits.conf
# /etc/security/limits.conf
#
#Each line describes a limit for a user in the form:
#
#<domain> <type> <item> <value>
#
#Where:
#<domain> can be:
# - an user name
# - a group name, with @group syntax
# - the wildcard *, for default entry
# - the wildcard %, can be also used with %group syntax,
# for maxlogin limit
#
#<type> can have the two values:
# - "soft" for enforcing the soft limits
# - "hard" for enforcing hard limits
#
#<item> can be one of the following:
# - core - limits the core file size (KB)
# - data - max data size (KB)
# - fsize - maximum filesize (KB)
# - memlock - max locked-in-memory address space (KB)
# - nofile - max number of open files
# - rss - max resident set size (KB)
# - stack - max stack size (KB)
# - cpu - max CPU time (MIN)
# - nproc - max number of processes
# - as - address space limit (KB)
# - maxlogins - max number of logins for this user
# - maxsyslogins - max number of logins on the system
# - priority - the priority to run user process with
# - locks - max number of file locks the user can hold
# - sigpending - max number of pending signals
# - msgqueue - max memory used by POSIX message queues (bytes)
# - nice - max nice priority allowed to raise to values: [-20, 19]
# - rtprio - max realtime priority
# - chroot - change root to directory (Debian-specific)
#
#<domain> <type> <item> <value>
#

* soft nofile 5000
* hard nofile 5000





#* soft core 5000
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#ftp - chroot /ftp
#@student - maxlogins 4

# End of file

#116403

:~$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 27581
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 5000
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 27581
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

#116663

удалил почти все шрифты не помогло,
сделал dpkg-reconfigure fontconfig не помогло,
Удалил fontconfig fontconfig-config за собой потенула вес Х.
помогло. поставил назад ругатся перестал.
"Взгляд, конечно, варварский - но верный..."
Спасибо.

Войдите или зарегистрируйтесь, чтобы ответить.