]> git.donarmstrong.com Git - lilypond.git/commitdiff
* mf/GNUmakefile: Genereate combined aybabtu info.
authorJan Nieuwenhuizen <janneke@gnu.org>
Fri, 17 Dec 2004 11:51:07 +0000 (11:51 +0000)
committerJan Nieuwenhuizen <janneke@gnu.org>
Fri, 17 Dec 2004 11:51:07 +0000 (11:51 +0000)
* 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.

ChangeLog
lily/include/open-type-font.hh
lily/open-type-font.cc
lily/system-start-delimiter.cc
mf/GNUmakefile
mf/aybabtu.pe.in
scm/framework-tex.scm
scm/output-tex.scm

index bb21ff56fea75c33ee401ead54614146be7f7a12..4c683f8775a5f38da96f2b200249d2ea12b6cbc3 100644 (file)
--- 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.
index 251868bc0ac5202734df9a4afd6c3968df516257..cc1c377148d4c907d2f88d725e96f46180b591c5 100644 (file)
@@ -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:
index e17fbc1bd09f5aa966aa044513593676b0b7da5a..ac7b2d5bb9f6903afe69f2ce85654ebe5bea3532 100644 (file)
@@ -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
 {
index 81154f3cb2efaa836779cb61ca085e0e53e1a8ab..6e3a32d03c5ec69e1789d1919b81758fe5f218f8 100644 (file)
@@ -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
index 250805566085744c7bf43145e34250317699fea8..f076eb88f3b7ce3222b8fb8963dd1743bc6a1665 100644 (file)
@@ -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)) > $@
index 2e293060ba3cbe8c68452f1b04f0a26bf03b4716..fbe376285c19f0c0c062a39c5e05987ef52a1039 100644 (file)
@@ -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");
index 2affc64649ec613b061ab83a39a606c93bbf9142..75785aa6166a1f530a3b10dd19d44c86c1da398d 100644 (file)
@@ -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"
   (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)
index 615ca5f36aab838b2c3208661ccebef636491363..8f3cb1a709a2306dd1f8120a57dd6e561141bf6d 100644 (file)
             (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!
 ;;;;;;;;
 (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))
   (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