From 9e4fae1ece2757c37efc363e2b54274d9554214d Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 6 Mar 2005 14:10:32 +0000 Subject: [PATCH] * lily/pango-select.cc (select_pango_font): use ::find_pango_font, so as to register the pango font. * lily/main.cc: only look at one prefix directory, LILYPONDPREFIX overrides all. * scm/framework-ps.scm (dump-page): use output-units for landscape. --- ChangeLog | 3 +++ lily/main.cc | 1 - lily/pango-select.cc | 8 ++++++-- scm/framework-ps.scm | 6 ++++++ scm/lily-library.scm | 4 ++++ 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9ec842e416..5ce25a2d5d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2005-03-06 Han-Wen Nienhuys + * lily/pango-select.cc (select_pango_font): use ::find_pango_font, + so as to register the pango font. + * lily/font-config.cc (init_fontconfig): add prefix/{otf,type1,mf/out} to fontconfig path. diff --git a/lily/main.cc b/lily/main.cc index 2cc277b857..a843ca4f24 100644 --- a/lily/main.cc +++ b/lily/main.cc @@ -354,7 +354,6 @@ main_with_guile (void *, int, char **) call_constructors (); init_global_tweak_registry (); init_fontconfig (); - test_pango(); init_freetype (); diff --git a/lily/pango-select.cc b/lily/pango-select.cc index 489676373f..ae3e86cdb5 100644 --- a/lily/pango-select.cc +++ b/lily/pango-select.cc @@ -55,8 +55,12 @@ 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"))); - - return all_fonts_global->find_pango_font (pfd, 1.0, output_scale (layout)); + + char * str = pango_font_description_to_string (pfd); + SCM scm_str = scm_makfrom0str (str); + gfree (str); + + return find_pango_font (layout, scm_str, 1.0); } PangoStyle diff --git a/scm/framework-ps.scm b/scm/framework-ps.scm index c5e973c17c..4019a3469d 100644 --- a/scm/framework-ps.scm +++ b/scm/framework-ps.scm @@ -230,9 +230,15 @@ (a-file-name (ly:kpathsea-find-file aname)) (b-file-name (ly:kpathsea-find-file bname)) ) + (display x )(newline) (cond ((and bare-file-name (string-match "\\.pfb" bare-file-name)) (ly:pfb->pfa bare-file-name)) + ((and bare-file-name + (string-match "\\.otf" bare-file-name)) + + (display "HOI\n") + (cached-file-contents (string-regexp-substitute "otf" "cff.ps" bare-file-name))) ((and bare-file-name (string-match "\\.ttf" bare-file-name)) (ly:ttf->pfa bare-file-name)) (bare-file-name (cached-file-contents bare-file-name)) diff --git a/scm/lily-library.scm b/scm/lily-library.scm index 7f32974b7f..b7dfacfd43 100644 --- a/scm/lily-library.scm +++ b/scm/lily-library.scm @@ -290,6 +290,10 @@ possibly turned off." (cons x (cons between y)))) (fold-right conc #f lst)) + +(define-public (string-regexp-substitute a b str) + (regexp-substitute/global #f a str 'pre b 'post)) + ;;;;;;;;;;;;;;;; ; other (define (sign x) -- 2.39.2