From: Han-Wen Nienhuys Date: Wed, 13 Apr 2005 14:41:27 +0000 (+0000) Subject: * input/regression/font-name.ly: show Pango fonts for X-Git-Tag: release/2.5.19~10 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=85a4c7ec6a2381d875c9f93a0517999f192c081d;p=lilypond.git * 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. * 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. --- diff --git a/ChangeLog b/ChangeLog index bea5059631..3ff9743a48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2005-04-13 Han-Wen Nienhuys + * 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. diff --git a/input/regression/font-name.ly b/input/regression/font-name.ly index 7783ec5366..0a68bb6d78 100644 --- a/input/regression/font-name.ly +++ b/input/regression/font-name.ly @@ -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 } + } } + diff --git a/lily/pango-select.cc b/lily/pango-select.cc index dea3b9d40b..708720486e 100644 --- a/lily/pango-select.cc +++ b/lily/pango-select.cc @@ -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); diff --git a/lily/span-dynamic-performer.cc b/lily/span-dynamic-performer.cc index a49eb5a377..5754244f61 100644 --- a/lily/span-dynamic-performer.cc +++ b/lily/span-dynamic-performer.cc @@ -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_; diff --git a/make/ly-vars.make b/make/ly-vars.make index 4cf95cd913..26b8e461f1 100644 --- a/make/ly-vars.make +++ b/make/ly-vars.make @@ -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,$<) diff --git a/python/fontextract.py b/python/fontextract.py index ffb0609248..fc4022e32f 100644 --- a/python/fontextract.py +++ b/python/fontextract.py @@ -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 ''')