]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/framework-ps.scm (dump-page): use output-units for landscape.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 6 Mar 2005 10:32:11 +0000 (10:32 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 6 Mar 2005 10:32:11 +0000 (10:32 +0000)
* buildscripts/gen-emmentaler-scripts.py (i): lower case file
name.

ChangeLog
THANKS
buildscripts/gen-emmentaler-scripts.py
lily/kpath.cc
scm/encoding.scm
scm/framework-ps.scm
scm/output-ps.scm

index c57227f155d7d06856c0e9eeb5984a92b23bbde1..745c20789716b13c31e21bc81f1c5df837f753bf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2005-03-06  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * scm/framework-ps.scm (dump-page): use output-units for landscape.
+
+       * buildscripts/gen-emmentaler-scripts.py (i): lower case file
+       name.
+
 2005-03-06  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * lily/main.cc (do_chroot_jail): Small cleanups.  Avoid constant
diff --git a/THANKS b/THANKS
index bd3534e343fc1cb0a309277e782a2f33a9f72a93..f1cb56155bc3e9fbffca480bcbc29d632908afec 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -36,7 +36,6 @@ Marcus Macauley
 
 BUG HUNTERS/SUGGESTIONS
 
-
 Jose Miguel Pasini
 Alexandre Beneteau
 Andreas Scherer
@@ -56,6 +55,7 @@ Paul Scott
 Richard Schoeller
 Tapio Tuovila
 Will Oram
+Wolfgang Hoffmann
 
 Release 2.4
 ***********
index 4b0946f0c7d3a47e17a7167f66c2d50f5ac3a5f0..bf2d4b4e9456d4033a680cf6a12d6333f4e4a6a0 100644 (file)
@@ -24,7 +24,9 @@ for opt in options:
 
 for design_size in [11,13,14,16,18,20,23,26]:
        name = 'Emmentaler' 
+       filename = name.lower ()
        script = '''#!@FONTFORGE@
+
 New();
 
 # Separate Feta versioning?
@@ -63,12 +65,12 @@ LoadTableFromFile("LILF", "%(name)s-%(design_size)d.subfonts")
 LoadTableFromFile("LILC", "feta%(design_size)d.otf-table")
 LoadTableFromFile("LILY", "feta%(design_size)d.otf-gtable")
 
-Generate("%(name)s-%(design_size)d.otf");
-Generate("%(name)s-%(design_size)d.cff");
-Generate("%(name)s-%(design_size)d.svg");
+Generate("%(filename)s-%(design_size)d.otf");
+Generate("%(filename)s-%(design_size)d.cff");
+Generate("%(filename)s-%(design_size)d.svg");
 ''' % vars()
 
-       path = os.path.join (outdir, '%s-%d.pe' % (name, design_size))
+       path = os.path.join (outdir, '%s-%d.pe' % (filename, design_size))
        open (path, 'w').write (script)
 
        subfonts = ['feta%(design_size)d',
index 8140f9cfbcef4ecc9b8a08029e8a50f6c81cfe25..fed266f797f7b89aa1dfbda4cc60b39b037fbf33 100644 (file)
@@ -105,40 +105,6 @@ kpathsea_find_format (String name)
 }
 #endif
 
-String
-kpathsea_gulp_file_to_string (String name)
-{
-  String file_name = global_path.find (name);
-
-#if (KPATHSEA && HAVE_KPSE_FIND_FILE)
-  if (file_name.is_empty ())
-    {
-      char *p = kpse_find_file (name.to_str0 (), kpathsea_find_format (name),
-       true);
-      if (p)
-       file_name = p;
-      else
-       warning (_f ("kpathsea can't find file: `%s'", name));
-    }
-#endif
-
-  if (file_name.is_empty ())
-    error (_f ("can't find file: `%s'", name));
-
-  if (be_verbose_global)
-    progress_indication ("[" + file_name);
-
-  int filesize;
-  char *str = gulp_file (file_name, &filesize);
-  String string (str);
-  delete[] str;
-  
-  if (be_verbose_global)
-    progress_indication ("]");
-
-  return string;
-}
-
 
 
 void
index cf3b90040bff5157fcedddc69055198edb4b9ce6..ba9b4c7d935af33250b4d705bb6196e37340a791 100644 (file)
 ;;;; 
 ;;;; (c) 2004--2005 Jan Nieuwenhuizen <janneke@gnu.org>
 
-;; WIP
-;; encoding.ly:
-;; #(display (reencode-string "adobe" "latin1" "hellö fóebär"))
-;;
 
 
-(define-public (read-encoding-file file-name)
-  "Read .enc file, return (COMMAND-NAME . VECTOR-OF-SYMBOLS)."
-  (let* ((path (ly:kpathsea-find-file file-name))
-        (unused (if (string? path) #t (ly:warn "can't find ~s" file-name)))
-        (raw (cached-file-contents path))
-        (string (regexp-substitute/global #f "%[^\n]*" raw 'pre "" 'post))
-        (command (match:substring
-                  (string-match "/([^ \t\n\r]*)[ \t\n\r]*[[]" string) 1))
-        (encoding (match:substring (string-match "[[](.*)[]]" string) 1))
-        (ps-lst (string-tokenize encoding))
-        (lst (map (lambda (x) (string->symbol (substring x 1))) ps-lst))
-        (vector (list->vector lst)))
-    (cons command vector)))
+(define-public latin1-coding-vector #(.notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef space exclam quotedbl numbersign dollar percent ampersand quoteright parenleft parenright asterisk plus comma hyphen period slash zero one two three four five six seven eight nine colon semicolon less equal greater question at A B C D E F G H I J K L M N O P Q R S T U V W X Y Z bracketleft backslash bracketright asciicircum underscore quoteleft a b c d e f g h i j k l m n o p q r s t u v w x y z braceleft bar braceright asciitilde .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef .notdef dotlessi grave acute circumflex tilde macron breve dotaccent dieresis .notdef ring cedilla .notdef hungarumlaut ogonek caron space exclamdown cent sterling currency yen brokenbar section dieresis copyright ordfeminine guillemotleft logicalnot hyphen registered macron degree plusminus twosuperior threesuperior acute mu paragraph periodcentered cedilla onesuperior ordmasculine guillemotright onequarter onehalf threequarters questiondown Agrave Aacute Acircumflex Atilde Adieresis Aring AE Ccedilla Egrave Eacute Ecircumflex Edieresis Igrave Iacute Icircumflex Idieresis Eth Ntilde Ograve Oacute Ocircumflex Otilde Odieresis multiply Oslash Ugrave Uacute Ucircumflex Udieresis Yacute Thorn germandbls agrave aacute acircumflex atilde adieresis aring ae ccedilla egrave eacute ecircumflex edieresis igrave iacute icircumflex idieresis eth ntilde ograve oacute ocircumflex otilde odieresis divide oslash ugrave uacute ucircumflex udieresis yacute thorn ydieresis))
 
-(define (make-encoding-table encoding-vector)
-  "Return a hash table mapping names to chars. ENCODING-VECTOR is a
-vector of symbols."
 
-  (let* ((h (make-hash-table 256)))
-    
-    (for-each
-     (lambda (i)
-       (hash-set! h (vector-ref encoding-vector i)
-                 (integer->char i)))
-     (iota 256))
-
-    h))
-
-(define-public (reencode-string mapping str)
-  "Apply MAPPING, a vector of [0..256) -> char, to STR"
-  (string-map (lambda (chr)
-               (vector-ref mapping (char->integer chr)))
-             str))
-
-(define-public (make-encoding-mapping input-encoding output-encoding)
-  "Contruct a mapping by applying output-encoding after input-encoding "
-  (list->vector
-   (map
-    (lambda (byte)
-      (let ((new-char (hash-ref
-                      output-encoding (vector-ref input-encoding byte) #f)))
-                      ;;input-encoding (vector-ref output-encoding byte) #f)))
-
-       ;; substitute space for unknown characters.
-       (if (char? new-char)
-           new-char
-           #\ )))
-    (iota 256))))
-
-
-(define (get-coding-from-file file-name)
-  "Read FILE-NAME, return a list containing encoding vector and table"
-   (let* ((coding (read-encoding-file file-name))
-         (command (car coding))
-         (vector (cdr coding))
-         (table (make-encoding-table vector)))
-    (list command vector table)))
-
-;; coding-alist maps NAME -> (list FILE-NAME COMMAND VECTOR TAB)
-(define coding-alist
-  
-  (map (lambda (x)
-        (cons (car x)
-              (cons (cdr x) (delay (get-coding-from-file (cdr x))))))
-       '(
-        ;; teTeX font (output) encodings
-        ("TeX-typewriter-text" . "09fbbfac.enc") ;; cmtt10
-        ("TeX-math-symbols" . "10037936.enc") ;; cmbsy
-        ("ASCII-caps-and-digits" . "1b6d048e.enc") ;; cminch
-        ("TeX-math-italic" . "aae443f0.enc")  ;; cmmi10
-        ("TeX-extended-ASCII" . "d9b29452.enc")
-        ("TeX-text" . "cmr.enc")
-        ("TeX-text-without-f-ligatures" . "0ef0afca.enc")
-        ("Extended-TeX-Font-Encoding---Latin" . "tex256.enc")
-        ("AdobeStandardEncoding" . "8a.enc")
-        ("T1" . "tex256.enc")
-        ("adobe" . "8a.enc")
-        ;; EC-fonts-mftraced
-        ("Extended-TeX-Font-Encoding---Latin" . "EC.enc")
-        ;; lmodern, encoding flavour latin1
-        ("cork-lm" . "cork-lm.enc")
-        
-        ;; input encodings
-        ("latin1" . "latin1.enc")
-        ("cork" . "cork.enc")
-
-        ;; LilyPond FETA music font
-        ("fetaBraces" . "feta-braces-a.enc")
-        ;;("fetaDynamic" . "feta-din10.enc")
-        ;;("fetaNumber" . "feta-nummer10.enc")
-        ("fetaDynamic" . "feta-alphabet20.enc")
-        ("fetaNumber" . "feta-alphabet20.enc")
-        ("fetaMusic" . "feta20.enc")
-        ("parmesanMusic" . "parmesan20.enc"))
-       ))
-
-;; FIXME: this is broken, cannot get font encoding from font/AFM file,
-;; should use encoding from font-tree in fonts.scm
-(define (get-coding coding-name)
-  (let ((entry (assoc-get coding-name coding-alist)))
-    (if entry
-       (cons (car entry) (force (cdr entry)))
-       (if (equal? coding-name "feta-music")
-           (begin
-             (ly:warn "installation problem: deprecated encoding requested: ~S" coding-name)
-             (exit 1))
-           (let ((fallback "latin1"))
-             (ly:programming-error "no such encoding: ~S" coding-name)
-             (ly:programming-error "programming error: cross thumbs, using: ~S:" fallback)
-             (get-coding fallback))))))
-
-(define-public (get-coding-file-name coding-name)
-  (car (get-coding coding-name)))
-
-(define-public (get-coding-command coding-name)
-  (cadr (get-coding coding-name)))
-
-(define-public (get-coding-vector coding-name)
-  (caddr (get-coding coding-name)))
-
-(define-public (get-coding-table coding-name)
-  (cadddr (get-coding coding-name)))
-
-
-(define-public (decode-byte-string encoding-name str)
+(define-public (decode-byte-string str)
   "Return vector of glyphname symbols that correspond to string,
 assuming that STR is byte-coded using ENCODING-NAME."
 
-  (let* ((coding-vector (get-coding-vector encoding-name))
-        (len (string-length str))
+  (let* ((len (string-length str))
         (output-vector (make-vector len '.notdef)))
 
     (do
        ((idx 0 (1+ idx)))
        ((>= idx len) output-vector)
       (vector-set! output-vector idx
-                    (vector-ref coding-vector
+                    (vector-ref latin1-coding-vector
                                 (char->integer (string-ref str idx)))))))
index 5a9094cd91a86e3943d644fedfff972ec8ece590..c5e973c17cafe6b958a76c03901ffd7a83192301 100644 (file)
                           (aname (string-append x ".pfa"))
                           (bname (string-append x ".pfb"))
                           (cff-file-name (ly:find-file cffname))
+                          (a-file-name (ly:kpathsea-find-file aname))
+                          (b-file-name (ly:kpathsea-find-file bname))
                           )
                      (cond
                       ((and bare-file-name (string-match "\\.pfb" bare-file-name))
index 1c725c717370b7ba87255af3ac08624a819eb155..defeb0c2cf7c9b0eb4ea93dd86a7709805e8ec99 100644 (file)
   (let* ((space-length (cdar (ly:text-dimension font " ")))
         (space-move (string-append (number->string space-length)
                                    " 0.0 rmoveto "))
-        (input-enc "latin1")
-        (out-vec (decode-byte-string input-enc s)))
+        (out-vec (decode-byte-string s)))
 
     (string-append
      (ps-font-command font) " setfont "