From: Aleksey Avdeev <solo@solin.spb.ru>
To: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] I: Сличение шрифтовых файлов (was: Баги касательно шрифтов в пузе.)
Date: Fri, 05 Aug 2011 19:13:12 +0400
Message-ID: <4E3C0888.3040906@solin.spb.ru> (raw)
In-Reply-To: <4D98578E.1060802@solin.spb.ru>
[-- Attachment #1: Type: text/plain, Size: 1855 bytes --]
03.04.2011 15:18, Aleksey Avdeev пишет:
> 03.04.2011 14:31, REAL пишет:
>> 03.04.2011 16:50, Aleksey Avdeev пишет:
>>> В свете обвешивания багами пакетов таскающих шрифты в пузе в bugzilla
>>> повешен метабаг<https://bugzilla.altlinux.org/show_bug.cgi?id=25358>.
>>
>> кстати, а как определяется, что это дубликаты шрифтов, а не просто
>> одноимённые файлы?
>
> Ни как: я смотрел только файл это или симлинк.
>
> Т. к. зачастую лежит только шрифтовый файл(ы), без сопутствующей
> информации (исключения есть, но их мало) то для более тщательной
> проверки пришлось бы вручную (через некий просмоторщик шрифтов) сличать
> содержимое файлов. Я этим не занимался. Исхожу из предположения, что имя
> файла (и путь к нему) в коде может быть прописано, а содержимое --
> скорее всего нет. => приложению можно подложить правильный (с точки
> зрения дистрибутива) файл.
Нашёл достаточно простой способ сличения служебной информации в
шрифтовых файлах -- утилита fc-query из fontconfig.
Работа на примере default.ttf из Moodle:
$ fc-query lib/default.ttf
Pattern has 20 elts (size 32)
family: "FreeSans"(s)
familylang: "en"(s)
style: "Medium"(s) "navadno"(s)
stylelang: "en"(s) "sl"(s)
fullname: "Free Sans"(s)
...
$ fc-query /usr/share/fonts/ttf/freefont/FreeSans.ttf > FreeSans.out
$ fc-query lib/default.ttf > default.out
$ diff -u default.out FreeSans.out
--- default.out 2011-08-05 18:49:48 +0400
+++ FreeSans.out 2011-08-05 18:49:32 +0400
@@ -9,7 +9,7 @@
weight: 80(i)(s)
width: 100(i)(s)
foundry: "unknown"(s)
- file: "lib/default.ttf"(s)
+ file: "/usr/share/fonts/ttf/freefont/FreeSans.ttf"(s)
index: 0(i)(s)
outline: FcTrue(s)
scalable: FcTrue(s)
--
С уважением. Алексей.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]
next prev parent reply other threads:[~2011-08-05 15:13 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-03 9:50 [devel] I: Баги касательно шрифтов в пузе Aleksey Avdeev
2011-04-03 10:31 ` REAL
2011-04-03 11:18 ` Aleksey Avdeev
2011-08-05 15:13 ` Aleksey Avdeev [this message]
2011-08-05 22:28 ` [devel] I: Сличение шрифтовых файлов (was: Баги касательно шрифтов в пузе.) Igor Vlasenko
2011-08-06 4:37 ` [devel] I: Сличение шрифтовых файлов REAL
2011-08-06 9:17 ` Igor Vlasenko
2011-08-06 9:45 ` Igor Zubkov
2011-08-06 9:51 ` Igor Vlasenko
2011-08-08 5:13 ` REAL
2011-04-03 18:58 ` [devel] I: Баги касательно шрифтов в пузе Paul Wolneykien
2011-04-03 20:48 ` Aleksey Avdeev
2011-04-04 2:58 ` REAL
2011-04-04 5:28 ` Aleksey Avdeev
2011-04-04 6:16 ` REAL
2011-04-04 8:23 ` Aleksey Avdeev
2011-04-04 9:16 ` REAL
2011-04-04 9:18 ` Aleksey Avdeev
2011-04-04 14:32 ` Vitaly Lipatov
2011-04-03 20:17 ` Slava Dubrovskiy
2011-04-03 20:51 ` Aleksey Avdeev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4E3C0888.3040906@solin.spb.ru \
--to=solo@solin.spb.ru \
--cc=devel@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Team development discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
public-inbox-index devel
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.devel
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git