]> git.donarmstrong.com Git - lilypond.git/commitdiff
* scm/output-ps.scm (define-fonts): fix scaling.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 4 Apr 2004 22:44:58 +0000 (22:44 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 4 Apr 2004 22:44:58 +0000 (22:44 +0000)
* lily/scaled-font-metric.cc (design_size): add function.

* lily/font-metric.cc (LY_DEFINE): opps ly:font-design-size is only
partial cut&paste of ly:font-magnification.

ChangeLog
lily/font-metric.cc
lily/include/scaled-font-metric.hh
lily/scaled-font-metric.cc
lily/spring-smob.cc
scm/output-ps.scm

index ce7154f8323232cc9d834b9aacc321d5b2465fed..f3373053a81a6520ee1a8b05028f323bdff6e09a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-04-05  Han-Wen Nienhuys   <hanwen@xs4all.nl>
+
+       * scm/output-ps.scm (define-fonts): fix scaling.
+
+       * lily/scaled-font-metric.cc (design_size): add function.
+
+       * lily/font-metric.cc (LY_DEFINE): opps ly:font-design-size is only
+       partial cut&paste of ly:font-magnification.
+
 2004-04-05  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scm/output-ps.scm (define-fonts):
@@ -7,7 +16,7 @@
 
        * po/fr.po: update.
 
-       * po/nl.po: new po file.
+       * po/nl.po: update
 
        * mf/feta-beugel.mf: document why design size is not fixed.
 
index f8083f5952319fd89fd261aceee42db37ffd890f..222bd5b240188e3370d949738e658ffc0fc6fa50 100644 (file)
@@ -242,7 +242,7 @@ LY_DEFINE (ly_font_design_size,"ly:font-design-size", 1 , 0, 0,
 {
   Font_metric *fm = unsmob_metrics (font);
   SCM_ASSERT_TYPE (fm, font, SCM_ARG1, __FUNCTION__, "font-metric");
-  return gh_cdr (fm->description_);
+  return gh_double2scm  (fm->design_size ());
 }
 
 
index 71c827625076c1708b46f61bada74c2c69cd3f60..dc3f344a721883ae0c3c26e7aadb54bbf4f1e0f4 100644 (file)
@@ -24,6 +24,7 @@ struct Scaled_font_metric : public Font_metric
   virtual Offset get_indexed_wxwy (int) const;
   virtual int name_to_index (String) const;
 protected:
+  virtual Real design_size () const;
   virtual Box get_indexed_char (int)const;
   virtual Box get_ascii_char (int)const;
   Font_metric *orig_;
index b3a07b3270200529662b76b606c20a1ddbc1b244..f719592974e7d4c9e83443a3c998673f6ae04127 100644 (file)
@@ -31,6 +31,12 @@ Scaled_font_metric::make_scaled_font_metric (Font_metric*m, Real s)
   return sfm->self_scm ();
 }
 
+Real
+Scaled_font_metric::design_size () const
+{
+  return orig_->design_size ();
+}
+
 Stencil
 Scaled_font_metric::find_by_name (String s) const
 {
index d36db8c243b7818fb607f66e779780fb028a171a..e27a72e93db50dcb3e19431b7f2f73bba34bdd1a 100644 (file)
@@ -28,7 +28,6 @@ Spring_smob::mark_smob (SCM) { return SCM_UNSPECIFIED; }
 int
 Spring_smob::print_smob (SCM s, SCM p, scm_print_state *)
 {
-  Spring_smob *ss = unsmob_spring (s);
   scm_puts ("#<Spring smob>", p);
   return 1;
 }
index 942937e2dd7b32a1d81bc924f27ceb93956b3ac0..cb4836f146c106778c2a76279c13da42b7f72008 100644 (file)
      (else fontname)))
                         
   (define (font-load-command paper font)
-
-;; fontname "feta20"
-;; command "magfontGNMWomXVo"
-;; mangled "GNU-LilyPond-feta-20"
-;; designsize 0.569055118110236
-;; foo-design 20
-;; magnification 0.569055118110236
-;; ops 1.75729901757299
-;; scaling 20.0
-
-;; fontname "cmr8"
-;; command "magfontUIJQomTVo"
-;; mangled "cmr8.pfb"
-;; designsize 0.564574183197548
-;; foo-design 8
-;; magnification 0.564574183197548
-;; ops 1.75729901757299
-;; scaling 7.87450656184296
-    
     (let* ((command (font-command font))
           (fontname (ly:font-name font))
           (mangled (possibly-mangle-fontname fontname))
           (encoding (assoc-get fontname font-encoding-alist))
           (designsize (ly:font-design-size font))
           (magnification (* (ly:font-magnification font)))
-          (foo-design (fontname->designsize fontname))
           (ops (ly:paper-lookup paper 'outputscale))
-          ;; FIXME this magic is about right ...
-          (scaling (* ops ops magnification designsize foo-design)))
+          (scaling (* ops magnification designsize)) )
 
       (if
        #f