Bug#555984: Analysis and possible solution of ttf-thai-tlwg dependency
September 24th, 2011 - 01:20 am ET by Osamu Aoki | Report spam
tags 555984 patch
thanks
Hi,
I also think phatch-cil should not have Thai font dependency just by
common sense. Moreover forcing to install particular taste of Latin-1
fonts seems to me an excessive dependency in terms of the type of
service this package provides.
But I am sure maintainer had some very good reasons to create this seemingly
absurd dependency. I see 2 references to such fonts in:
data/actionlists/polaroid.phatch : "Purisa"
phatch/actions/text.py : "Free Sans"
I noticed that the upstream ships FreeSans.ttf and Purisa.ttf in its
source to use them as the default for these dialogues. On Debian
system, these fonts from its source are not used in binary package.
Maintainer made those fonts available in usr/share/phatch/data/fonts/ by
creating symlinks and providing package dependency to ttf-freefont and
ttf-thai-tlwg. This is better than installing additional these fonts on
our system in non-standard location but created funky dependency issue.
As I see phatch/lib/fonts.py, it seems to search for system font. (I
did not read into it in details.) So having private font data for
phatch may not be the inherent issue.
Since official fontconfig default name for such San Serif Font group on
Debian is "san-serif", I replce such default font references to this.
This should allow us to remove the unneeded font package dependency.
Then, I adjusted package control file and formaition of links.
I have not tested this patch yet but submitting this so we do not forget
this.
Osamu
diff -Nru phatch-0.2.7.1-orig/debian/changelog phatch-0.2.7.1/debian/changelog
phatch-0.2.7.1-orig/debian/changelog 2011-03-17 05:43:07.000000000 +0900
+++ phatch-0.2.7.1/debian/changelog 2011-09-24 11:49:31.161826181 +0900
@@ -1,3 +1,9 @@
+phatch (0.2.7.1-2) unstable; urgency=low
+
+ * Removed unneeded font package dependency for phatch-cli (closes: 555984)
+
+ -- Osamu Aoki <osamu@debian.org> Sat, 24 Sep 2011 11:27:28 +0900
+
phatch (0.2.7.1-1) unstable; urgency=low
* New upstream release
diff -Nru phatch-0.2.7.1-orig/debian/control phatch-0.2.7.1/debian/control
phatch-0.2.7.1-orig/debian/control 2011-03-17 05:43:19.000000000 +0900
+++ phatch-0.2.7.1/debian/control 2011-09-24 11:26:15.946907620 +0900
@@ -47,8 +47,6 @@
python-notify,
python-pyexiv2 (>= 0.3),
libtiff-tools,
- ttf-freefont,
- ttf-thai-tlwg,
locate | mlocate
# move Recommends to phatch-plugins if we'll decide to split out plugins:
Recommends: xcftools,
diff -Nru phatch-0.2.7.1-orig/debian/patches/default_font.patch phatch-0.2.7.1/debian/patches/default_font.patch
phatch-0.2.7.1-orig/debian/patches/default_font.patch 1970-01-01 09:00:00.000000000 +0900
+++ phatch-0.2.7.1/debian/patches/default_font.patch 2011-09-24 11:24:36.034412281 +0900
@@ -0,0 +1,32 @@
+Author: Osamu Aoki <osamu@debian.org>
+Description: Let phatch use sans-serif for the font default
+ phatch ships FreeSans.ttf and Purisa.ttf in its source assumes to use
+ them as the default for some dialogues. On Debian system, these fonts
+ from its source are not used. Previously, those fonts were made
+ available in usr/share/phatch/data/fonts/ by creating symlinks and
+ providing package dependency to ttf-freefont and ttf-thai-tlwg.
+ Since official fontconfig default name for such San Serif Font group
+ is "san-serif", I replce such default font specification to this.
+ This should allow us to remove the unneeded font package dependency.
+ a/data/actionlists/polaroid.phatch
++++ b/data/actionlists/polaroid.phatch
+@@ -28,7 +28,7 @@
+ '__enabled__': 'yes'},
+ 'label': 'Border'},
+ {'fields': {'Color': u'#443fa5',
+- 'Font': u'Purisa',
++ 'Font': u'sans-serif',
+ 'Horizontal Justification': 'Middle',
+ 'Horizontal Offset': '50%',
+ 'Offset': '5%',
+ a/phatch/actions/text.py
++++ b/phatch/actions/text.py
+@@ -78,7 +78,7 @@
+ def interface(self, fields):
+ fields[_t('Text')] = self.CharField(
+ choices=self.STAMPS)
+- fields[_t('Font')] = self.FontFileField('Free Sans')
++ fields[_t('Font')] = self.FontFileField('sans-serif')
+ fields[_t('Size')] = self.PixelField('5%',
+ choices=self.SMALL_PIXELS)
+ fields[_t('Color')] = self.ColorField('#000000')
diff -Nru phatch-0.2.7.1-orig/debian/patches/series phatch-0.2.7.1/debian/patches/series
phatch-0.2.7.1-orig/debian/patches/series 2011-03-17 04:17:26.000000000 +0900
+++ phatch-0.2.7.1/debian/patches/series 2011-09-24 11:09:37.965958999 +0900
@@ -1,2 +1,3 @@
do_not_raise_string_exceptions.patch
pyexiv2.patch
+default_font.patch
diff -Nru phatch-0.2.7.1-orig/debian/phatch-cli.links phatch-0.2.7.1/debian/phatch-cli.links
phatch-0.2.7.1-orig/debian/phatch-cli.links 2010-05-28 03:15:22.000000000 +0900
+++ phatch-0.2.7.1/debian/phatch-cli.links 1970-01-01 09:00:00.000000000 +0900
@@ -1,2 +0,0 @@
-/usr/share/fonts/truetype/freefont/FreeSans.ttf /usr/share/phatch/data/fonts/FreeSans.ttf
-/usr/share/fonts/truetype/thai/Purisa.ttf /usr/share/phatch/data/fonts/Purisa.ttf
To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Similar topics
Make your own search :
Tags
Create a new topic
Follow the discussion
1 reply
Make a reply
May 19th, 2013 - 7:17 AM ET
Join now


Replies