-1.3.112.jcn3
+1.3.113.jcn2
============
+* Moved all documentation from regtest to individual example files.
+
+* Added feature to lilypond-book to write out \header texidoc string.
+
+* Reincluded simple FAQ in tarball.
+
+* Fixed lyrics with bar-enrgaver example.
+
+* Renamed LyricVoice to LyricsVoice.
+
+1.3.113.uu1
+===========
+
+* Checksums for AFM fonts: make sure that TFM and AFM files match.
+One FAQ less to be asked.
+
+* Made point-and-click switchable, default: off
+
+* Bugfix: don't make multimeasure rests from failed span-requests.
+
+* Bugfix: mark with string arguments, eg. letters..
+
+* Bugfix: direction of staccato dots.
+
+1.3.113
+=======
+
* Added stems to font for use in markup text.
* Fixed markup text kerning, see input/test/metronome.ly.
pass
+def tfm_checksum (fn):
+ s = open (fn).read ()
+ s = s[ 12 * 2 : ]
+ cs_bytes = s[:4]
+
+ shift = 24
+ cs = 0
+ for b in cs_bytes:
+ cs = cs + (ord (b) << shift)
+ shift = shift - 8
+
+ return cs
+
def parse_logfile (fn):
(autolines, deps) = read_log_file (fn)
charmetrics = []
for filenm in files:
(g,m, deps) = parse_logfile (filenm)
+ cs = tfm_checksum (re.sub ('.log$', '.tfm', filenm))
afm = open (afmfile_nm, 'w')
+
+ afm.write ("TfmCheckSum %u\n" % cs)
+
write_afm_metric (afm, g,m)
write_tex_defs (open (texfile_nm, 'w'), g, m)
write_deps (open (depfile_nm, 'wb'), deps, [texfile_nm, afmfile_nm])
Adobe_font_metric::Adobe_font_metric (AFM_Font_info * fi)
{
+ checksum_ = 0;
font_inf_ = fi;
for (int i= 256; i--;)
SCM
-Adobe_font_metric::make_afm (AFM_Font_info *fi)
+Adobe_font_metric::make_afm (AFM_Font_info *fi, unsigned int checksum)
{
Adobe_font_metric * fm = new Adobe_font_metric (fi);
-
+ fm->checksum_ = checksum;
return fm->self_scm();
}
read_afm_file (String nm)
{
FILE *f = fopen (nm.ch_C() , "r");
+ char s[2048];
+ char *check_key = "TfmCheckSum";
+ fgets (s, sizeof (s), f);
+
+ unsigned int cs = 0;
+ if (strncmp (s, check_key, strlen (check_key)) == 0)
+ {
+ sscanf (s + strlen (check_key), "%ud", &cs);
+ }
+ else
+ {
+ rewind (f);
+ }
+
AFM_Font_info * fi;
int ok = AFM_parseFile (f, &fi, ~1);
}
fclose (f);
- return Adobe_font_metric::make_afm (fi);
+ return Adobe_font_metric::make_afm (fi, cs);
}
afm_p_dict_->set (sname,val);
- scm_unprotect_object (val);
+ scm_unprotect_object (val);
+
+
+ Adobe_font_metric *afm
+ = dynamic_cast<Adobe_font_metric*> (unsmob_metrics (val) );
+ Tex_font_metric * tfm = find_tfm (name);
+
+ if (tfm->info_.checksum != afm->checksum_)
+ {
+ String s = _("Font checksum mismatch");
+ s+= "\n";
+ s += " TFM: " + to_str ((int) tfm->info_.checksum);
+ s += " AFM: " + to_str ((int) afm->checksum_);
+ s += "\n";
+ s += _(" Rebuild all AFM files, and remove all .pk and .tfm files");
+
+ error (s);
+ }
}
return dynamic_cast<Adobe_font_metric*> (unsmob_metrics (val));
String str () const;
~Adobe_font_metric ();
- static SCM make_afm (AFM_Font_info*);
+ static SCM make_afm (AFM_Font_info*, unsigned);
+ unsigned int checksum_;
protected:
Array<int> ascii_to_metric_idx_;
Dictionary<int> name_to_metric_dict_;
String str () const;
-private:
- Tex_font_metric ();
+
Tfm_info info_;
Tfm_header header_;
Array<Tex_font_char_metric> char_metrics_;
Array<int> ascii_to_metric_idx_;
+private:
+ Tex_font_metric ();
};