(otf-name-mangling): Remove.
* lily/pango-font.cc (Pango_font): Use font string iso font
filename for utf8-text.
* buildscripts/gen-emmentaler-scripts.py: Remove designsize from
name.
+2005-01-09 Jan Nieuwenhuizen <janneke@gnu.org>
+
+ * scm/output-gnome.scm (utf8-string): New function.
+ (otf-name-mangling): Remove.
+
+ * lily/pango-font.cc (Pango_font): Use font string iso font
+ filename for utf8-text.
+
+ * buildscripts/gen-emmentaler-scripts.py: Remove designsize from
+ name.
+
2005-01-08 Graham Percival <gperlist@shaw.ca>
* Documentation/user/notation.itely: add info about
New();
# Separate Feta versioning?
-# Naming: * expose LilyPond20/LilyPond rather than %(name)s
# * using 20 as Weight works for gnome-font-select widget: gfs
-SetFontNames("%(name)s-%(design_size)d", "%(name)s", "%(name)s %(design_size)d", "%(design_size)d", "GNU GPL", "@TOPLEVEL_VERSION@");
+SetFontNames("%(name)s", "%(name)s", "%(name)s %(design_size)d", "%(design_size)d", "GNU GPL", "@TOPLEVEL_VERSION@");
MergeFonts("feta%(design_size)d.pfa");
MergeFonts("parmesan%(design_size)d.pfa");
For Pango based backends, we take a shortcut.
*/
SCM exp
- = scm_list_3 (ly_symbol2scm ("utf-8-string"),
- scm_makfrom0str (pango_font_description_to_filename (pango_description_)),
+ = scm_list_3 (ly_symbol2scm ("utf8-string"),
+ scm_makfrom0str (pango_font_description_to_string (pango_description_)),
scm_makfrom0str (str.to_str0 ()));
- return Stencil (dest.extent_box (),
- exp);
+ Box b (Interval (0, 0), Interval (0, 0));
+ b.unite (dest.extent_box ());
+ return Stencil (b, exp);
}
#if 0
{
programming_error ("Stencil::moved_to_edge: adding empty stencil.");
his_extent = 0.0;
- SCM_ASSERT_TYPE(0, SCM_EOL, SCM_ARG1, __FUNCTION__, "");
+ SCM_ASSERT_TYPE (0, SCM_EOL, SCM_ARG1, __FUNCTION__, "");
}
else
his_extent = i[-d];
String str = ly_scm2string (markup);
Font_metric *fm = select_encoded_font (layout, props);
- return fm->text_stencil (str).smobbed_copy();
+ return fm->text_stencil (str).smobbed_copy ();
}
(postprocess-output book framework-ps-module filename (ly:output-formats))
))
+(if (not (defined? 'nan?))
+ (define (nan? x) #f))
+(if (not (defined? 'inf?))
+ (define (inf? x) #f))
+
(define-public (output-preview-framework basename book scopes fields )
(let* ((filename (format "~a.ps" basename))
(outputter (ly:make-paper-outputter filename
(list (+ #xe0 x)
(+ #x80 (quotient y #x40))
(+ #x80 (modulo y #x40))))))
- (else (begin (stderr "programming-error: utf-8 too big:~x\n" i)
+ (else (begin (stderr "programming-error: utf8 too big:~x\n" i)
(list (integer->char 32))))))
(define (integer->utf8-string integer)
(map (lambda (x) (char->utf8-string x)) (string->list string))))
(define (music-font? font)
- (let ((encoding (ly:font-encoding font))
- (family (font-family font)))
- (or (memq encoding '(fetaMusic fetaBraces))
- (string=? (substring family 0 (min (string-length family) 10))
- "emmentaler"))))
-
-;; FIXME
-(define-public (otf-name-mangling font family)
- ;; Hmm, family is emmentaler20/26?
- (if (string=? (substring family 0 (min (string-length family) 10))
- "emmentaler")
- (string-append "LilyPond " (substring family 10))
- (if (string=? family "aybabtu")
- "LilyPondBraces"
- family)))
+ (let ((family (font-family font)))
+ (string=? (substring family 0 (min (string-length family) 10))
+ "emmentaler")))
(define (pango-font-name font)
(debugf "FONT-NAME:~S:~S\n" (ly:font-name font) (ly:font-design-size font))
- (debugf "FONT-FAMILY:~S:~S\n" (font-family font) (otf-name-mangling font (font-family font)))
- (otf-name-mangling font (font-family font)))
+ ;;(debugf "FONT-FAMILY:~S:~S\n" (font-family font) (otf-name-mangling font (font-family font)))
+ (font-family font))
(define (pango-font-size font)
(let* ((designsize (ly:font-design-size font))
;; ugh, experimental sizing
;; where does factor ops come from?
;; Hmm, design size: 26/20
- (ops 2.60)
+ ;;(ops 2.60)
+ (ops output-scale)
- (scaling (* ops magnification designsize)))
+ (scaling (* 1.5 ops magnification designsize)))
(debugf "OPS:~S\n" ops)
(debugf "scaling:~S\n" scaling)
(debugf "magnification:~S\n" magnification)
#:join-style 'round)))
(define (text font s)
+ (stderr "FONT:~S\n" font)
+ (stderr "FONT:~S\n" (pango-font-name font))
(make <gnome-canvas-text>
#:parent (canvas-root)
(integer->utf8-string s)
(string->utf8-string s))))
+(define (utf8-string pango-font-description string)
+ (make <gnome-canvas-text>
+ #:parent (canvas-root)
+ #:x 0.0 #:y 0.0
+ #:anchor 'west
+ #:font pango-font-description
+ ;;#:size-points
+ #:size-set #t
+ #:text string))