Bug 142299 - /usr/share/a2ps/afm/make_fonts_map.sh is buggy
Summary: /usr/share/a2ps/afm/make_fonts_map.sh is buggy
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: a2ps
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Tim Waugh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2004-12-08 20:51 UTC by Michal Jaegermann
Modified: 2007-11-30 22:10 UTC (History)
0 users

Fixed In Version: 4.13b-43
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-09 13:10:19 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
minimal changes to make_fonts_map.diff (966 bytes, patch)
2004-12-08 21:23 UTC, Michal Jaegermann
no flags Details | Diff

Description Michal Jaegermann 2004-12-08 20:51:35 UTC
Description of problem:

A script /usr/share/a2ps/afm/make_fonts_map.sh has assorted
bugs.  If a font name is of an "unlucky" length it prints in
an output file:

AntykwaPoltawskiego-BoldItalicantpbi

If instead of 

   echo "$col1$col2" >> fonts.map.new

it would use

   echo "$col1 $col2" >> fonts.map.new

then the above would not happen.  Even better, even if it
would do instead something like

   printf "%-30s %s\n" "$name" "$shortname"

then all strange hacks with $many_spaces and sed would be totally
superflous and long names would just stick out to the right. Big
deal!

Also the case "A name has been cut" then would not appear.  If
internally ap2s cannot use too long names then for names over the
limit one should do 'continue' instead of 'exit 1' and such fonts
would be simply skipped.

Still another problem is that, for example, a font with t1xtt.afm
metric file happens to a have a name 't1xtt' and extraction of fonts
names in make_fonts_map.sh shorten all names which start with 't1'
to just simple 't'.  AFAIK 't1xtt' is perfectly legal font name
and one wonders what else.

Version-Release number of selected component (if applicable):
a2ps-4.13b-42

Comment 1 Michal Jaegermann 2004-12-08 21:23:55 UTC
Created attachment 108147 [details]
minimal changes to make_fonts_map.diff

Many fonts have digits in names in various places.

Comment 3 Tim Waugh 2004-12-09 13:10:19 UTC
Thanks!


Note You need to log in before you can comment on or make changes to this bug.