]> git.donarmstrong.com Git - lilypond.git/commitdiff
(attachment_point): new function.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 12 Dec 2004 22:02:59 +0000 (22:02 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 12 Dec 2004 22:02:59 +0000 (22:02 +0000)
(load_table): read LILC table

lily/open-type-font.cc
mf/GNUmakefile

index 5d5f3501bc57515750992fe69268f6e1ca0c36d6..b72c242824304ed1d2bc7cdc51f276a5feb88a5a 100644 (file)
 #include "dimensions.hh"
 
 FT_Byte *
-load_table (char const *tag_str, FT_Face face)
+load_table (char const *tag_str, FT_Face face, FT_ULong *length)
 {
-  FT_ULong length = 0;
   FT_ULong tag = FT_MAKE_TAG(tag_str[0], tag_str[1], tag_str[2], tag_str[3]);
   
-  int error_code = FT_Load_Sfnt_Table (face, tag, 0, NULL, &length);
+  int error_code = FT_Load_Sfnt_Table (face, tag, 0, NULL, length);
   if (!error_code)
     {
-      FT_Byte*buffer = (FT_Byte*) malloc (length);
+      FT_Byte*buffer = (FT_Byte*) malloc (*length);
       if (buffer == NULL)
        error ("Not enough memory");
 
-      error_code = FT_Load_Sfnt_Table (face, tag, 0, buffer, &length );
+      error_code = FT_Load_Sfnt_Table (face, tag, 0, buffer, length );
       if (error_code)
        {
          error (_f ("Could not load %s font table", tag_str));
@@ -58,11 +57,12 @@ Open_type_font::make_otf (String str)
     }
 
 
-  FT_Byte* buffer =load_table ("LILC", otf->face_);
+  FT_ULong length = 0;
+  FT_Byte* buffer =load_table ("LILC", otf->face_, &length);
   if (buffer)
     {
-      String contents ((char const*)buffer);
-      contents = "(quote " +  contents + ")";
+      String contents ((Byte const*)buffer, length);
+      contents = "(quote (" +  contents + "))";
 
       SCM alist = scm_c_eval_string (contents.to_str0());
       otf->lily_character_table_ = alist_to_hashq (alist);
index 2ad3b6b4be80f8caf5f87935d7555bf93bd5e077..7cb5f56f1ee7f1314f9fff2c503e406c54699821 100644 (file)
@@ -25,6 +25,7 @@ FETA_FONTS = $(FETA_MF_FILES:.mf=)
 
 
 LOG_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.log)
+LISP_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.lisp)
 TEXTABLES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tex)
 AFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.afm) \
        $(AF_FILES:%.af=$(outdir)/%.afm)
@@ -48,9 +49,6 @@ foe:
        echo $(TEXMF)
        kpsewhich exbase.mf
 
-$(outdir)/feta20.otf-table:
-       cat $(outdir)/feta20.lisp $(outdir)/parmesan20.lisp > $@
-
 $(outdir)/%.otf: $(outdir)/%.pe
        (cd $(outdir) && fontforge -script $(notdir $<)) 
 
@@ -85,7 +83,7 @@ PFB_FILES = $(PFA_FILES:%.pfa=%.pfb)
 
 # Make tfm files first, log files last, 
 # so that normally log files aren't made twice
-ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(FETA_LIST_FILES)  $(OTF_TABLES) $(PFA_FILES) $(outdir)/lilypond.map $(outdir)/fonts.scale $(outdir)/Fontmap.lily $(CHEESES)
+ALL_GEN_FILES= $(TFM_FILES) $(TEXTABLES) $(AFM_FILES) $(TFM_FILES) $(LOG_FILES) $(ENC_FILES) $(LISP_FILES) $(FETA_LIST_FILES)  $(OTF_TABLES) $(PFA_FILES) $(outdir)/lilypond.map $(outdir)/fonts.scale $(outdir)/Fontmap.lily $(CHEESES)
 
 #PRE_INSTALL=$(MAKE) "$(ALL_GEN_FILES)"
 INSTALLATION_DIR=$(local_lilypond_datadir)/fonts/source
@@ -164,7 +162,7 @@ get-pfa: get-rpm-pfa
 
 ##
 ## todo: this also depends on .tfm, FIXME.
-$(outdir)/%.afm  $(outdir)/%.enc  $(outdir)/%.tex $(outdir)/%list.ly $(outdir)/%.dep: $(outdir)/%.log $(outdir)/%.tfm
+$(outdir)/%.lisp $(outdir)/%.afm  $(outdir)/%.enc  $(outdir)/%.tex $(outdir)/%list.ly $(outdir)/%.dep: $(outdir)/%.log $(outdir)/%.tfm
        $(PYTHON) $(buildscript-dir)/mf-to-table.py --lisp=$(outdir)/$(<F:.log=.lisp) --outdir=$(outdir) --dep $(outdir)/$(<F:.log=.dep)  --afm $(outdir)/$(<F:.log=.afm)  --enc $(outdir)/$(<F:.log=.enc) --tex $(outdir)/$(<F:.log=.tex) --ly $(outdir)/$(<F:.log=list.ly) $<
 
 fontdir: $(addprefix $(outdir)/, lilypond.map lilypond.sfd private-fonts fonts.scale fonts.dir Fontmap.lily)