From: Jan Nieuwenhuizen <janneke@gnu.org>
Date: Fri, 17 Dec 2004 11:51:07 +0000 (+0000)
Subject: * mf/GNUmakefile: Genereate combined aybabtu info.
X-Git-Tag: release/2.5.14~412
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=8a46cfe5f238e213a03d5b7a1cd993c9f90d07cb;p=lilypond.git

* mf/GNUmakefile: Genereate combined aybabtu info.
* mf/aybabtu.pe.in (i): Load it.

* scm/framework-tex.scm (otf-font-load-command): Bugfix: subfonts
are not symbols.

* lily/include/open-type-font.hh (count): New method.

* mf/aybabtu.pe.in: Typo.
---

diff --git a/ChangeLog b/ChangeLog
index bb21ff56fe..4c683f8775 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2004-12-17  Jan Nieuwenhuizen  <janneke@gnu.org>
 
+	* scm/framework-tex.scm (otf-font-load-command): Bugfix: subfonts
+	are not symbols.
+
 	* lily/include/open-type-font.hh (count): New method.
 
 	* mf/aybabtu.pe.in: Typo.
diff --git a/lily/include/open-type-font.hh b/lily/include/open-type-font.hh
index 251868bc0a..cc1c377148 100644
--- a/lily/include/open-type-font.hh
+++ b/lily/include/open-type-font.hh
@@ -15,7 +15,6 @@
 #include "font-metric.hh"
 
 typedef std::map<FT_UInt, FT_ULong> Index_to_charcode_map;
-typedef std::map<String, FT_ULong> Glyph_name_to_index_map;
 
 class Open_type_font : public Font_metric
 {
@@ -25,7 +24,6 @@ class Open_type_font : public Font_metric
   SCM lily_character_table_; 
   SCM lily_global_table_;
   Index_to_charcode_map index_to_charcode_map_;
-  Glyph_name_to_index_map glyph_name_to_index_map_;
   Open_type_font (FT_Face);
 
 public:
diff --git a/lily/open-type-font.cc b/lily/open-type-font.cc
index e17fbc1bd0..ac7b2d5bb9 100644
--- a/lily/open-type-font.cc
+++ b/lily/open-type-font.cc
@@ -147,9 +147,7 @@ Open_type_font::get_indexed_char (int signed_idx) const
       char name[len];
       int code = FT_Get_Glyph_Name (face_, signed_idx, name, len);
       if (code)
-	{
-	  warning ("FT_Get_Glyph_Name() returned error");
-	}
+	warning (_f ("FT_Get_Glyph_Name() returned error: %d", code));
 	
       SCM sym = ly_symbol2scm (name);
       SCM alist = scm_hashq_ref (lily_character_table_, sym, SCM_BOOL_F);
@@ -203,14 +201,6 @@ Open_type_font::index_to_charcode (int i) const
   return ((Open_type_font*) this)->index_to_charcode_map_[i];
 }
 
-#if 0
-unsigned
-Open_type_font::glyph_name_to_index (String glyph_name) const
-{
-  return ((Open_type_font*) this)->glyph_name_to_charcode_map_[glyph_name];
-}
-#endif
-
 int
 Open_type_font::count () const
 {
diff --git a/lily/system-start-delimiter.cc b/lily/system-start-delimiter.cc
index 81154f3cb2..6e3a32d03c 100644
--- a/lily/system-start-delimiter.cc
+++ b/lily/system-start-delimiter.cc
@@ -181,7 +181,6 @@ System_start_delimiter::staff_brace (Grob *me, Real y)
     {
       int cmp = (lo + hi) / 2;
       b = fm->get_indexed_char (cmp);
-      //b = fm->get_indexed_char (fm->name_to_index ("brace" + to_string (cmp)));
       if (b[Y_AXIS].is_empty () || b[Y_AXIS].length () > y)
 	hi = cmp;
       else
diff --git a/mf/GNUmakefile b/mf/GNUmakefile
index 2508055660..f076eb88f3 100644
--- a/mf/GNUmakefile
+++ b/mf/GNUmakefile
@@ -25,7 +25,11 @@ OTF_TABLES = $(addsuffix .otf-table, $(addprefix $(outdir)/feta, $(STAFF_SIZES))
  $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
 FETA_FONTS = $(FETA_MF_FILES:.mf=)
 
+$(outdir)/aybabtu.otf-table: $(BRACES:%=$(outdir)/feta-braces-%.otf-table)
+	cat $^ > $@
 
+$(outdir)/aybabtu.otf-gtable: $(BRACES:%=$(outdir)/feta-braces-%.otf-gtable)
+	echo '(foe . 0)' > $@
 
 LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log)
 LISP_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.lisp)
@@ -58,7 +62,7 @@ $(outdir)/%.otf: $(outdir)/%.pe
 $(outdir)/%.otf-table: $(outdir)/%.lisp
 	cat $< $(subst parmesan,feta,$<) > $@
 
-$(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts
+$(outdir)/aybabtu.otf: $(outdir)/aybabtu.subfonts $(outdir)/aybabtu.otf-table $(outdir)/aybabtu.otf-gtable
 
 $(outdir)/aybabtu.subfonts: 
 	 echo $(subst .mf,,$(wildcard feta-braces-[a-z].mf)) > $@
diff --git a/mf/aybabtu.pe.in b/mf/aybabtu.pe.in
index 2e293060ba..fbe376285c 100644
--- a/mf/aybabtu.pe.in
+++ b/mf/aybabtu.pe.in
@@ -37,8 +37,8 @@ PRIVATE AREA
 endloop
 
 LoadTableFromFile("LILF", "aybabtu.subfonts")
-LoadTableFromFile("LILC", "feta-braces-a.otf-table")
-LoadTableFromFile("LILY", "feta-braces-a.otf-gtable")
+LoadTableFromFile("LILC", "aybabtu.otf-table")
+LoadTableFromFile("LILY", "aybabtu.otf-gtable")
 
 Generate("aybabtu.otf");
 Generate("aybabtu.cff");
diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm
index 2affc64649..75785aa616 100644
--- a/scm/framework-tex.scm
+++ b/scm/framework-tex.scm
@@ -32,7 +32,6 @@
   (string-append
    "\\def\\" prefix (symbol->tex-key key) "{" number "}%\n"))
 
-
 (define-public (digits->letters str)
   (regexp-substitute/global
    #f "[-\\._]"
@@ -51,7 +50,6 @@
    'pre ""
    'post))
 
-
 (define-public (tex-font-command-raw name magnification)
   (string-append
    "magfont"
@@ -65,26 +63,21 @@
   (tex-font-command-raw
    (ly:font-file-name font) (ly:font-magnification font)))
 
-
 (define (otf-font-load-command paper font)
-  (let*
-      ((sub-fonts (ly:font-sub-fonts font)))
-
+  (let* ((sub-fonts (ly:font-sub-fonts font)))
     (string-append
      (apply string-append
 	    (map
 	     (lambda (sub-name)
-	       (string-append
-		"\\font\\" (tex-font-command-raw
-			    (symbol->string sub-name)
-			    (ly:font-magnification font))
-		"=" (symbol->string sub-name)
-		" scaled "
-		(ly:number->string (inexact->exact
-				    (round (* 1000
-					      (ly:font-magnification font)
-					      (ly:paper-outputscale paper)))))
-		"%\n"))
+	       (format #f "\\font\\~a=~a scaled ~a%\n"
+		       (tex-font-command-raw
+			sub-name (ly:font-magnification font))
+		       sub-name
+		       (ly:number->string
+			(inexact->exact
+			 (round (* 1000
+				   (ly:font-magnification font)
+				   (ly:paper-outputscale paper)))))))
 	     sub-fonts)))))
 
 (define (simple-font-load-command paper font)
diff --git a/scm/output-tex.scm b/scm/output-tex.scm
index 615ca5f36a..8f3cb1a709 100644
--- a/scm/output-tex.scm
+++ b/scm/output-tex.scm
@@ -56,6 +56,12 @@
 	     (scm framework-tex)
 	     (lily))
 
+;; helper functions
+(define (stderr string . rest)
+  (apply format (cons (current-error-port) (cons string rest)))
+  (force-output (current-error-port)))
+
+
 ;;;;;;;;
 ;;;;;;;; DOCUMENT ME!
 ;;;;;;;;
@@ -89,11 +95,10 @@
 (define (dashed-slur thick dash l)
   (embedded-ps (list 'dashed-slur thick dash `(quote ,l))))
 
-
 (define (named-glyph font name)
-  (let*
-      ((info  (ly:otf-font-glyph-info font name)))
-
+  (let* ((info (ly:otf-font-glyph-info font name)))
+    ;;(stderr "INFO: ~S\n" info)
+    ;;(stderr "FONT: ~S\n" font)
     (string-append "\\" (tex-font-command-raw
 			 (assoc-get 'subfont info)
 			 (ly:font-magnification font))
@@ -106,22 +111,17 @@
   (embedded-ps (list 'zigzag-line centre? zzw zzh thick dx dy)))
 
 (define (ez-ball c l b)
-  (embedded-ps (list 'ez-ball  c  l b)))
-
-
+  (embedded-ps (list 'ez-ball c l b)))
 
 (define (embedded-ps expr)
   (let ((ps-string
 	 (with-output-to-string
 	   (lambda () (ps-output-expression expr (current-output-port))))))
     (string-append "\\embeddedps{" ps-string "}")))
-  
 
 (define (repeat-slash w a t)
   (embedded-ps (list 'repeat-slash  w a t)))
 
-
-
 (define (number->dim x)
   (string-append
    ;;ugh ly:* in backend needs compatibility func for standalone output