ttf-dejavu: wrong defoma hints file

Bug #34288 reported by Ming Hua
14
Affects Status Importance Assigned to Milestone
ttf-dejavu (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

DejaVu fonts has changed the filename of some of the fonts (both the .sfd file and the generated .ttf file), for example from DejaVuSerif-Roman to DejaVuSerif. The defoma hints file in the current package still uses the old filenames. This will cause broken links in the /var/lib/defoma directories.

There are also new font files, and the defoma hints file lacks the hints for these new fonts.

I'm working on a patch for this and am almost done. I'll post a patch for review soon.

Revision history for this message
Ming Hua (minghua) wrote : debdiff for fix the defoma hints in ttf-dejavu 2.1-0ubuntu1

The promised patch. This debdiff is against 2.1-0ubuntu1 (the current version in dapper) and fix the following two things:

1. add a preinst file to purge broken defoma registrations because of the old wrong defoma hints.

2. fix the defoma hints to have correct font file names, and add hints for the new fonts as well.

I don't know defoma very well, so all the new hints are just using the old hints for other fonts with necessary changes.

I haven't tested this patch for 2.3 yet. But I will do so soon.

Revision history for this message
Simos Xenitellis  (simosx) wrote :

Thanks for the patch.

I noticed that ISO8859-7 (Greek) is not listed.
I am not sure if this is relevant only to non-Unicode system locales.
For UTF-8 locales, do you need to add "utf-8"?

Revision history for this message
Matthias Klose (doko) wrote : Re: [Bug 34288] ttf-dejavu: wrong defoma hints file

Ming Hua schrieb:
> Public bug report changed:
> https://launchpad.net/malone/bugs/34288
>
> - Changed attachments:
> Added: debdiff for fix the defoma hints in ttf-dejavu 2.1-0ubuntu1
> http://librarian.launchpad.net/1687949/ttf-dejavu_fix-defoma-hints.debdiff

the preinst doesn't seem to be necessary. the fonts should be
deregistered in the postinst of the old version of the package.

Revision history for this message
Ming Hua (minghua) wrote :

On Fri, Mar 10, 2006 at 11:57:04PM -0000, Matthias Klose wrote:
>
> the preinst doesn't seem to be necessary. the fonts should be
> deregistered in the postinst of the old version of the package.

I think the preinst is necessary.

First I think you mean "prerm of the old version", as the postinst of
old version is not run during upgrade.

As for the prerm of the old version, it is generated automatically by
defoma, and has the [ "$1" = remove ] test. However during upgrade, the
prerm script is called with $1 = upgrade, therefore the commands for
deregister/purge defoma hints are not run.

Therefore without my preinst script, the package is good with a fresh
install, but still left broken symlinks if upgraded from an old version
(with broken defoma hints file).

Maybe I should add a comment in the preinst script?

Ming
2006.03.10

Revision history for this message
Ming Hua (minghua) wrote :

On Fri, Mar 10, 2006 at 10:43:34PM -0000, Simos Xenitellis wrote:
>
> I noticed that ISO8859-7 (Greek) is not listed.
> I am not sure if this is relevant only to non-Unicode system locales.
> For UTF-8 locales, do you need to add "utf-8"?

As I've said, I don't know much about defoma. So I just kept old defoma
hint settings.

Also my patch was tested with version 2.1. Since 2.1 doesn't have
complete Greek coverage, it doesn't make much sense to add Greek support
anyway.

Now that doko has made packages for version 2.3, I suggest test his
package for Greek; and if that works well, file a separate bug asking
for add Greek encoding in defoma hints.

Ming
2006.03.10

Revision history for this message
Luka Renko (lure) wrote :

On apt-get upgrade today, the folowing errors were reported:
Preparing to replace ttf-dejavu 2.1-0ubuntu1 (using .../ttf-dejavu_2.3-0ubuntu1_all.deb) ...
Unpacking replacement ttf-dejavu ...
Setting up ttf-dejavu (2.3-0ubuntu1) ...
Installing new version of config file /etc/defoma/hints/ttf-dejavu.hints ...
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.

Revision history for this message
atie (atie-at-matrix) wrote :

The above warning(?) is due to gs-common issue, but wondering why ttf-dejavu followed the routines for cjk.

Revision history for this message
Matthias Klose (doko) wrote :

> The above warning(?) is due to gs-common issue, but wondering
> why ttf-dejavu followed the routines for cjk.

the warning is related to the cjk fonts on your system.

Changed in ttf-dejavu:
status: Unconfirmed → Needs Info
Revision history for this message
Ming Hua (minghua) wrote :

On Sun, Mar 12, 2006 at 07:25:58AM -0000, Luka Renko wrote:
>
> Setting up ttf-dejavu (2.3-0ubuntu1) ...
> Installing new version of config file /etc/defoma/hints/ttf-dejavu.hints ...
> Use of uninitialized value in print at /var/lib/defoma/scripts/gs.defoma line 108.
(...)

As atie said, this is a bug in gs-common, a.k.a. bug #6614, and not
related to ttf-dejavu.

But I don't think it only appears for CJK fonts, I see them during
ttf-dejavu upgrade as well.

Ming
2006.03.18

Revision history for this message
Simos Xenitellis  (simosx) wrote :

Ming,
Shall we designate this bug as DUPLICATE of bug #6614?

Revision history for this message
Ming Hua (minghua) wrote :

On Sun, Mar 19, 2006 at 01:13:07AM -0000, Simos Xenitellis wrote:
>
> Comment:
> Ming,
> Shall we designate this bug as DUPLICATE of bug #6614?

No, that's just a side comments. I think the main focus of this bug is
the defoma hints (which is fixed by doko's upload of version 2.3), so I
don't feel marking it as duplicate of #6614 is appropriate.

I am not closing this bug yet because I still want doko to have a look
at my preinst script and arguments. I am pretty sure without the
preinst script, the breezy -> dapper upgrade is broken. But I haven't
found time to test that yet.

I'll close this bug and if I can confirm the upgrade issue, I'll open a
new bug about adding the preinst script.

Ming
2006.03.18

Revision history for this message
Ming Hua (minghua) wrote :

Fixed by 2.3-0ubuntu1. The error message issue is bug #6614.

Changed in ttf-dejavu:
status: Needs Info → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.