1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-13 03:03:15 +00:00
freebsd-ports/x11-fonts/mkfontalias/files/patch-aa
Ying-Chieh Liao d6df1b049c add mkfontalias
Python script to make fonts.alias files for X

PR:		30840
Submitted by:	Stijn Hoop <stijn@win.tue.nl>
2001-10-15 14:09:21 +00:00

42 lines
1.7 KiB
Plaintext

--- mkfontalias.py.orig Wed Sep 26 12:44:13 2001
+++ mkfontalias.py Wed Sep 26 12:45:50 2001
@@ -71,22 +71,25 @@
map = _font_map.get ( name, None )
- if map:
- # Create a bunch of aliases, for each size
- for size in _font_sizes:
- # Do the 'cheating' - fallback to size if not in the cheat map
- real_size = _cheat_map.get ( size, size )
+ if not map:
+ sys.stderr.write( "Warning: unknown font with name '%s'\n" % name )
+ map = name
- name = string.join ( entries[:7] + [ str(real_size),
- str(real_size * 10) ] +
- entries[9:], '-' )
+ # Create a bunch of aliases, for each size
+ for size in _font_sizes:
+ # Do the 'cheating' - fallback to size if not in the cheat map
+ real_size = _cheat_map.get ( size, size )
- alias = string.join ( entries[:2] + [map] + entries[3:7] +
- [ str(size), str(size * 10) ] +
- _res + entries[11:], '-' )
+ name = string.join ( entries[:7] + [ str(real_size),
+ str(real_size * 10) ] +
+ entries[9:], '-' )
- # Add the entry to the aliases
- _aliases.append ( '"%s" "%s"' % (alias, name) )
+ alias = string.join ( entries[:2] + [map] + entries[3:7] +
+ [ str(size), str(size * 10) ] +
+ _res + entries[11:], '-' )
+
+ # Add the entry to the aliases
+ _aliases.append ( '"%s" "%s"' % (alias, name) )
# Boast
print 'Created %s aliases' % len(_aliases)