]> git.donarmstrong.com Git - lilypond.git/commitdiff
* input/regression/font-name.ly: show Pango fonts for
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 13 Apr 2005 14:41:27 +0000 (14:41 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Wed, 13 Apr 2005 14:41:27 +0000 (14:41 +0000)
font-name. Update example.

* lily/pango-select.cc (properties_to_pango_description): don't
convert symbol font-size to number, but use to lookup.

* python/fontextract.py (write_extracted_fonts): add VMusage 0.

* python/fontextract.py (write_extracted_fonts): new file. Extract
font resources from a PS file.

* make/ly-vars.make (DVIPS_FLAGS): don't load .map file.

ChangeLog
input/regression/font-name.ly
lily/pango-select.cc
lily/span-dynamic-performer.cc
make/ly-vars.make
python/fontextract.py

index bea50596314124504f8a698c9e7b0a6768d2f4c0..3ff9743a48304acc65ba71d601ff6e4c9544043a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2005-04-13  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+       * input/regression/font-name.ly: show Pango fonts for
+       font-name. Update example. 
+
+       * lily/pango-select.cc (properties_to_pango_description): don't
+       convert symbol font-size to number, but use to lookup.
+
+       * python/fontextract.py (write_extracted_fonts): add VMusage 0.
+
        * scm/framework-ps.scm (write-preamble): use (NAME . CONTENTS) and
        (NAME . FILE-NAME) tuples for font descriptions. 
        (write-preamble): display BeginFont DSC comments.
index 7783ec5366df979e3bcf29919c833edbdd4548a1..0a68bb6d7889c6b43592a73c11b2090ae340d956 100644 (file)
@@ -1,45 +1,31 @@
-\version "2.4.0"
+\version "2.5.19"
 
 \header {
 
-    texidoc = "Other fonts can be used by setting font-name for
-the appropriate object. This may include Postscript fonts that are
-available through (La)TeX.
-
-
-BROKEN by pango/fontconfig
-"
+    texidoc = "Other fonts can be used by setting @code{font-name} for
+the appropriate object. The string should be a Pango font description
+without size specification."
 
 
 }
 
-%{
-
- Postscript fonts are switched off by default,
- for compatibility with TeX installations that have no
- PS fonts installed.
-%}
-
-\score {
-     {
+\layout { raggedright = ##t }
 
-       %% FIXME. 
-%      \override Staff.TimeSignature  #'font-name = #"cmr17"
-       \set Score.skipBars = ##t
 
-       % use font-name putri8r for Utopia Italic :
-       
-       \override Staff.MultiMeasureRestText   #'font-name = #"cmss12"
+{
+  \override Staff.TimeSignature  #'font-name = #"Times"
+  \time 3/4
+  \set Score.skipBars = ##t
 
+                               % use font-name putri8r for Utopia Italic :
+  
+  \override Staff.MultiMeasureRestText #'font-name = #"LuxiMono"
+  R1*21^"Rest in LuxiMono"
 
-       % use "ptmb8r" for Times Roman
-       
-       c'1_\markup { \override #'(font-name . "cmdunh10")
-                         { This text is Dunhill } }
-
-            R1*21^"Wait for Utopia Italic"
-            }
-    
-    \layout { raggedright = ##t }
-
+  c'1_\markup {
+    \override #'(font-name . "Utopia Bold")
+      \override #'(font-size . 4)
+        { This text is in large Utopia Bold }
+  }
 }
+
index dea3b9d40b42e85d708c492d2336cb6c79f72d7a..708720486ecffea6a713c9452483813bb0392110 100644 (file)
@@ -40,7 +40,8 @@ properties_to_pango_description (SCM chain, Real text_size)
                                             SCM_BOOL_F);
     }
 
-  Real step = robust_scm2double (ly_symbol2scm ("font-size"), 0.0);
+  Real step = robust_scm2double (ly_chain_assoc_get (ly_symbol2scm ("font-size"), chain, SCM_BOOL_F),
+                                0.0);
   Real size = text_size * pow (2.0, step / 6.0);
 
   pango_font_description_set_size (description,
@@ -51,8 +52,10 @@ properties_to_pango_description (SCM chain, Real text_size)
 Font_metric *
 select_pango_font (Output_def *layout, SCM chain)
 {
-  PangoFontDescription *pfd = properties_to_pango_description (chain,
-                                                              point_constant * layout->get_dimension (ly_symbol2scm ("text-font-size")));
+  PangoFontDescription *pfd
+    = properties_to_pango_description (chain,
+                                      point_constant
+                                      * layout->get_dimension (ly_symbol2scm ("text-font-size")));
 
   char *str = pango_font_description_to_string (pfd);
   SCM scm_str = scm_makfrom0str (str);
index a49eb5a377737c91d64213377a830bf4c2bea329..5754244f61440528ae92693b7e41b23bb8e1f819 100644 (file)
@@ -13,7 +13,6 @@
   TODO: fold this into 1 engraver: \< and \> should also stop when
   absdyn is encountered.
 */
-
 struct Audio_dynamic_tuple
 {
   Audio_dynamic *audio_;
index 4cf95cd9139c6d64f1879b13c853ddff35ebab3b..26b8e461f1b51fd5729d1a2dbf407088eb91c9d9 100644 (file)
@@ -17,4 +17,4 @@ TEXINFO_SOURCES += $(TELY_FILES) $(ITELY_FILES) $(ITEXI_FILES)
 EXTRA_DIST_FILES +=$(TELY_FILES) $(LY_FILES) $(ITEXI_FILES) $(ITELY_FILES) $(ILY_FILES)
 
 
-DVIPS_FLAGS= -h $(notdir $(basename $<)).fonts.ps
+DVIPS_FLAGS= -h $(subst dvi,fonts.ps,$<)
index ffb06092480c097e2260abb9e2409911e08cb584..fc4022e32f2d2f7b19fd01e763566fb9ebdfbdc9 100644 (file)
@@ -81,8 +81,12 @@ def extract_fonts_from_file (extract_from_this, font_dict, filename):
                                          % (string.join (extract_from_this, ', '), filename))
 
 def write_extracted_fonts (output_file_name, font_dict):
+
+       if verbose:
+               sys.stderr.write( _('Writing fonts to %s') % output_file_name + '\n')
        output = open (output_file_name, 'w')
        output.write ('''%!PS-Adobe-3.0
+%%VMusage: 0 0 
 %%Creator: lilypond-extract-fonts
 ''')