* ly/generate-embedded-cff.ly: capitalize.
* 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.
2005-03-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * mf/GNUmakefile: generate .commonff to not confuse fontconfig.
+
+ * ly/generate-embedded-cff.ly: capitalize.
+
* lily/pango-select.cc (select_pango_font): use ::find_pango_font,
so as to register the pango font.
exit (3);
}
}
+
void test_pango();
+
static void
main_with_guile (void *, int, char **)
{
SCM result = scm_call_1 (ly_lily_module_constant ("lilypond-main"), files);
(void) result;
-
/* Unreachable. */
exit (0);
}
output_format_global += format;
}
-
static void
parse_argv (int argc, char **argv)
{
FcPattern *fcpat = fcfont->font_pattern;
char *filename = 0;
FcPatternGetString(fcpat, FC_FILE, 0, (FcChar8 **) &filename);
- char const *ps_name = FT_Get_Postscript_Name (ftface);
+ char const *ps_name_str0 = FT_Get_Postscript_Name (ftface);
+
- if (ps_name)
+ /*
+ UGH: kludge a PS name for OTF fonts.
+ */
+ String ps_name;
+ if (!ps_name_str0
+ && filename
+ && String (filename).index (".otf") >= 0)
+ {
+ String name = filename;
+ name = name.left_string (name.length () - name.index (".otf"));
+
+ int slash_idx = name.index_last ('/'); // UGh. What's happens on windows?
+ if (slash_idx >= 0)
+ name = name.right_string (name.length() - slash_idx);
+
+ String initial = name.cut_string (0,1);
+ initial.to_upper();
+ name = name.nomid_string (0,1);
+ name.to_lower();
+ ps_name = initial + name;
+ }
+ else if (ps_name_str0)
+ ps_name = ps_name_str0;
+
+ if (ps_name.length ())
{
((Pango_font *) this)->register_font_file (filename, ps_name);
pango_fc_font_unlock_face (fcfont);
SCM expr = scm_list_4 (ly_symbol2scm ("glyph-string"),
- scm_makfrom0str (ps_name),
+ scm_makfrom0str (ps_name.to_str0 ()),
scm_from_double (size),
ly_quote_scm (glyph_exprs));
/*
For Pango based backends, we take a shortcut.
*/
+ char *descr_string = pango_font_description_to_string (pango_description_);
SCM exp
= scm_list_3 (ly_symbol2scm ("utf8-string"),
- scm_makfrom0str (pango_font_description_to_string (pango_description_)),
+ scm_makfrom0str (descr_string),
scm_makfrom0str (str.to_str0 ()));
+ g_free (descr_string);
Box b (Interval (0, 0), Interval (0, 0));
b.unite (dest.extent_box ());
-
+#if 0
void test_pango()
{
int dpi = 1200;
}
}
+#endif
char * str = pango_font_description_to_string (pfd);
SCM scm_str = scm_makfrom0str (str);
- gfree (str);
+ g_free (str);
return find_pango_font (layout, scm_str, 1.0);
}
out-port)
))
-#(write-cff "emmentaler-26" "emmentaler-26.cff")
-#(write-cff "emmentaler-23" "emmentaler-23.cff")
-#(write-cff "emmentaler-20" "emmentaler-20.cff")
-#(write-cff "emmentaler-18" "emmentaler-18.cff")
-#(write-cff "emmentaler-16" "emmentaler-16.cff")
-#(write-cff "emmentaler-14" "emmentaler-14.cff")
-#(write-cff "emmentaler-13" "emmentaler-13.cff")
-#(write-cff "emmentaler-11" "emmentaler-11.cff")
-#(write-cff "aybabtu" "aybabtu.cff")
+#(write-cff "Emmentaler-26" "emmentaler-26.commonff")
+#(write-cff "Emmentaler-23" "emmentaler-23.commonff")
+#(write-cff "Emmentaler-20" "emmentaler-20.commonff")
+#(write-cff "Emmentaler-18" "emmentaler-18.commonff")
+#(write-cff "Emmentaler-16" "emmentaler-16.commonff")
+#(write-cff "Emmentaler-14" "emmentaler-14.commonff")
+#(write-cff "Emmentaler-13" "emmentaler-13.commonff")
+#(write-cff "Emmentaler-11" "emmentaler-11.commonff")
+#(write-cff "aybabtu" "aybabtu.commonff")
$(BRACES:%=$(outdir)/feta-braces-%.otf-table)
FETA_FONTS = $(FETA_MF_FILES:.mf=)
SVG_FILES = $(OTF_FILES:%.otf=%.svg) $(ALL_FONTS:%=$(outdir)/%.svg)
-CFF_FILES = $(OTF_FILES:%.otf=%.cff)
+COMMONFF_FILES = $(OTF_FILES:%.otf=%.commonff)
CFF_PS_FILES = $(OTF_FILES:%.otf=%.cff.ps)
echo $(TEXMF)
kpsewhich exbase.mf
-$(outdir)/%.cff $(outdir)/%.otf $(outdir)/%.svg: $(outdir)/%.pe
- (cd $(outdir) && fontforge -script $(notdir $<))
+$(outdir)/%.commonff $(outdir)/%.otf $(outdir)/%.svg: $(outdir)/%.pe
+ (cd $(outdir) && fontforge -script $(notdir $<) \
+ && mv $(notdir $(basename $<)).cff $(notdir $(basename $<)).commonff)
-$(CFF_PS_FILES): $(CFF_FILES)
+$(CFF_PS_FILES): $(COMMONFF_FILES)
cd $(outdir) && $(builddir)/lily/$(outconfbase)/lilypond --verbose $(abs-srcdir)/ly/generate-embedded-cff
$(outdir)/%.otf-table: $(outdir)/%.lisp $(if $(findstring brace,$<),,$(subst feta,parmesan,$<))
INSTALLATION_DIR=$(local_lilypond_datadir)/fonts/source
INSTALLATION_FILES=$(MF_FILES) $(AF_FILES)
-INSTALLATION_OUT_SUFFIXES=1 2 3 4 5 6 7 8 9
+INSTALLATION_OUT_SUFFIXES=1 2 3 4 5 6 7 9
INSTALLATION_OUT_DIR1=$(local_lilypond_datadir)/tex
INSTALLATION_OUT_FILES1=$(TEXTABLES)
INSTALLATION_OUT_DIR4=$(local_lilypond_datadir)/ps
INSTALLATION_OUT_FILES4=$(CFF_PS_FILES)
-
INSTALLATION_OUT_DIR5=$(local_lilypond_datadir)/fonts/type1
INSTALLATION_OUT_FILES5=$(PFA_FILES)
INSTALLATION_OUT_DIR7=$(local_lilypond_datadir)/ps/
INSTALLATION_OUT_FILES7=$(ENC_FILES)
-# install in fonts/cff or ps/ directory?
-INSTALLATION_OUT_DIR8=$(local_lilypond_datadir)/cff
-INSTALLATION_OUT_FILES8=$(CFF_FILES)
-
INSTALLATION_OUT_DIR9=$(local_lilypond_datadir)/svg
INSTALLATION_OUT_FILES9=$(SVG_FILES)
((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))