From e60430b10fda4c873e02361deeedc91ec33c02b0 Mon Sep 17 00:00:00 2001
From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Sat, 19 Oct 2002 15:33:50 +0000
Subject: [PATCH] * buildscripts/make-font-dir.py (sketch_p): Bugfix: only
 write encoding part. (Font_info.set_defaults): pixelsize now also defauts to
 '0'. (sketch_p): Sketch wants only first four elements of X11 font spec.

---
 ChangeLog                     |  5 +++
 buildscripts/make-font-dir.py | 68 +++++++++++++++++------------------
 scm/sketch.scm                |  2 +-
 3 files changed, 40 insertions(+), 35 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 5945b1736c..bc774de919 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2002-10-19  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+	* buildscripts/make-font-dir.py (sketch_p): Bugfix: only write
+	encoding part.
+	(Font_info.set_defaults): pixelsize now also defauts to '0'.
+	(sketch_p): Sketch wants only first four elements of X11 font spec.
+
 	* buildscripts/mf-to-table.py (parse_logfile): Bugfix. 
 
 	* mf/feta-autometric.mf: Write foundry and family to log.
diff --git a/buildscripts/make-font-dir.py b/buildscripts/make-font-dir.py
index 5248380d06..be2be389d5 100644
--- a/buildscripts/make-font-dir.py
+++ b/buildscripts/make-font-dir.py
@@ -70,7 +70,7 @@ class Font_info:
 		self.slant = 'r'
 		self.setwidth = 'normal'
 		self.style = ''
-		self.pixelsize = '' # '0'
+		self.pixelsize = '0'
 		self.pointsize = '0'
 		self.xresolution = '0'
 		self.yresolution = '0'
@@ -159,40 +159,40 @@ for filename in ls:
 	# parameter as `Font', and X11's `Weight' parameter as `Style'.
 
 	# Using X11 description/convention -- good for xfontsel:
-	# foundry: GNU
-	# family: LilyPond <basename>
-	# weight: <designsize>
-	# slant: r(oman) =upright
-	# setwidth: normal
-	# style:
-	# pixelsize: 0
-	# pointsize: 0 (20 crashes xfs, moved to style)
-	# xresolution: 0
-	# yresolution: 0
-	# spacing: p(roportional)
-	# averagewidth: 0
-	# registry: GNU
-	# encoding: fonstpecific
+	#  1 foundry: GNU
+	#  2 family: LilyPond <basename>
+	#  3 weight: <designsize>
+	#  4 slant: r(oman) =upright
+	#  5 setwidth: normal
+	#  6 style:
+	#  7 pixelsize: 0
+	#  8 pointsize: 0 (20 crashes xfs, moved to style)
+	#  9 xresolution: 0
+	# 10 yresolution: 0
+	# 11 spacing: p(roportional)
+	# 12 averagewidth: 0
+	# 13 registry: GNU
+	# 14 encoding: fonstpecific
 
 	# gives:
 	# feta20.pfa -GNU-LilyPond feta-20-r-normal--0-0-0-0-p-0-gnu-fontspecific
 
 	# However, GNOME (gtkfontsel, gnome apps) seems to want:
 
-	# foundry: GNU
-	# family: LilyPond
-	# weight:  <basename>
-	# slant: r(oman) =upright
-	# setwidth: normal
-	# style: <designsize>
-	# pixelsize: 0
-	# pointsize: 0 (20 crashes xfs, moved to style)
-	# xresolution: 0
-	# yresolution: 0
-	# spacing: p(roportional)
-	# averagewidth: 0
-	# registry: GNU
-	# encoding: fonstpecific
+	#  1 foundry: GNU
+	#  2 family: LilyPond
+	#  3 weight:  <basename>
+	#  4 slant: r(oman) =upright
+	#  5 setwidth: normal
+	#  6 style: <designsize>
+	#  7 pixelsize: 0
+	#  8 pointsize: 0 (20 crashes xfs, moved to style)
+	#  9 xresolution: 0
+	# 10 yresolution: 0
+	# 11 spacing: p(roportional)
+	# 12 averagewidth: 0
+	# 13 registry: GNU
+	# 14 encoding: fonstpecific
 
 	# which gives:
 	# feta20.pfa -GNU-LilyPond-feta-r-normal--20-0-0-0-p-0-gnu-fontspecific
@@ -226,17 +226,17 @@ for filename in ls:
 		s = string.join ([fontinfo.FontName,
 				  fontinfo.family,
 				  '%s %s' % (fontinfo.weight, fontinfo.style),
-				  string.join (fontinfo.get_X11 ()[:5], '-'),
-				  string.join (fontinfo.get_X11 ()[:-2], '-'),
+				  string.join (fontinfo.get_X11 ()[:4], '-'),
+				  string.join (fontinfo.get_X11 ()[-2:], '-'),
 				  fontinfo.name],
 				 ',')
 		print s
 
-		s = string.join ([fontinfo.FamilyName,
+		s = string.join ([fontinfo.FamilyName + fontinfo.designsize,
 				  fontinfo.family,
 				  '%s %s' % (fontinfo.weight, fontinfo.style),
-				  string.join (fontinfo.get_X11 ()[:5], '-'),
-				  string.join (fontinfo.get_X11 ()[:-2], '-'),
+				  string.join (fontinfo.get_X11 ()[:4], '-'),
+				  string.join (fontinfo.get_X11 ()[-2:], '-'),
 				  fontinfo.name],
 				 ',')
 		print s
diff --git a/scm/sketch.scm b/scm/sketch.scm
index afd94cbb03..532183942c 100644
--- a/scm/sketch.scm
+++ b/scm/sketch.scm
@@ -154,7 +154,7 @@
 ;; old scheme
 ;;(define font-alist '(("feta13" . ("feta13" . "13"))
 ;;		     ("feta20" . ("feta20" . "20"))))
-(define font-alist '(("feta13" . ("LilyPond-Feta-13" . "13"))
+(define font-alist '(("feta13" . ("LilyPond-Feta13" . "13"))
 ;;		     ("feta20" . ("LilyPond-Feta-20" . "20")
 		     ("feta20" . ("GNU-LilyPond-feta-20" . "20")
 		      )))
-- 
2.39.5