+2004-04-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * scm/output-tex.scm (text): switch off char-mapping.
+
+ * lily/tfm.cc (coding_scheme): replace ' ' in encoding with '-',
+ because AFM's encoding field cannot have spaces.
+
2004-04-08 Jan Nieuwenhuizen <janneke@gnu.org>
* scm/output-ps.scm (define-fonts): More re/encoding tweaking.
2004-04-08 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/paper-def.cc (find_scaled_font): change to inputencoding.
+
+ * mf/cmr.enc: new file, without hi-bit ascii info.
+
* lily/bezier-bow.cc (slur_shape): make indent dependent on
width. This removes the 'hook' at the end of a long slur.
\StaffContext
minimumVerticalExtent = #'(-3. . 6)
}
+ inputencoding = #"latin1"
}
\midi {
\tempo 4 = 70
}
/*
+
+
+ ^ x x
+ |
+height <indent>
+ |
+ v x x
+
+
+
For small w, the height should be proportional to w, for w ->
infinity, the height should rise to a limit asymptotically.
r_0.
- The indent is equals the height of the slur for small slurs. For
- large slurs, this gives a certain hookiness at the end, so we
- increase the indent.
+ The indent is proportional to the height of the slur for small
+ slurs. For large slurs, this gives a certain hookiness at the end,
+ so we increase the indent.
ind = G(w)
else
{
SCM scale_var = ly_module_lookup (scope_, ly_symbol2scm ("outputscale"));
- SCM coding_var = ly_module_lookup (scope_, ly_symbol2scm ("inputcoding"));
+ SCM coding_var = ly_module_lookup (scope_, ly_symbol2scm ("inputencoding"));
m /= ly_scm2double (scm_variable_ref (scale_var));
val = Modified_font_metric::make_scaled_font_metric (scm_variable_ref (coding_var),
tfm->encoding_table_ =
scm_call_1 (ly_scheme_function ("get-coding-table"),
- scm_makfrom0str (tfm->info_.coding_scheme.to_str0 ()));
+ scm_makfrom0str (tfm->coding_scheme ().to_str0 ()));
return tfm->self_scm ();
}
String
Tex_font_metric::coding_scheme () const
{
- return info_.coding_scheme;
+ String scm = info_.coding_scheme;
+
+ for(int i = 0; i < scm.length (); i++)
+ if (scm[i] == ' ')
+ scm[i] = '-';
+
+ return scm;
}
int
AF_FILES = $(wildcard *.af)
-EXTRA_DIST_FILES += README feta.tex
+EXTRA_DIST_FILES += README feta.tex cmr.enc
# We don't use $(MF_FILES), because there's more .mf cruft here
FETA_MF_FILES = $(wildcard feta[0-9]*.mf)\
TEXTABLES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tex)
AFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.afm) \
$(AF_FILES:%.af=$(outdir)/%.afm)
-ENC_FILES = $(TEXTABLES:.tex=.enc)
+ENC_FILES = $(TEXTABLES:.tex=.enc) $(outdir)/cmr.enc
TFM_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%.tfm)
FETA_LIST_FILES = $(FETA_MF_FILES:%.mf=$(outdir)/%list.ly)
$(outdir)/%.pfa: $(outdir)/%.bla
$(MFTRACE) -I $(outdir)/ --pfa --simplify --keep-trying $(notdir $(basename $@)) && mv $(notdir $@) $(outdir)/
+$(outdir)/%.enc: %.enc
+ cp $< $@
--- /dev/null
+% Thomas Esser, Dec 2002. public domain
+%
+% Encoding for:
+% cmb10 cmbx10 cmbx12 cmbx5 cmbx6 cmbx7 cmbx8 cmbx9 cmbxsl10
+% cmdunh10 cmr10 cmr12 cmr17cmr6 cmr7 cmr8 cmr9 cmsl10 cmsl12 cmsl8
+% cmsl9 cmss10cmss12 cmss17 cmss8 cmss9 cmssbx10 cmssdc10 cmssi10
+% cmssi12 cmssi17 cmssi8cmssi9 cmssq8 cmssqi8 cmvtt10
+%
+/TeXf7b6d320Encoding [
+/Gamma /Delta /Theta /Lambda /Xi /Pi /Sigma /Upsilon /Phi /Psi /Omega
+/ff /fi /fl /ffi /ffl /dotlessi /dotlessj /grave /acute /caron /breve
+/macron /ring /cedilla /germandbls /ae /oe /oslash /AE /OE /Oslash
+/suppress /exclam /quotedblright /numbersign /dollar /percent /ampersand
+/quoteright /parenleft /parenright /asterisk /plus /comma /hyphen
+/period /slash /zero /one /two /three /four /five /six /seven /eight
+/nine /colon /semicolon /exclamdown /equal /questiondown /question /at
+/A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X
+/Y /Z /bracketleft /quotedblleft /bracketright /circumflex /dotaccent
+/quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u
+/v /w /x /y /z /endash /emdash /hungarumlaut /tilde /dieresis /suppress
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+/.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef
+] def
'(
;; teTeX
- ("TeX typewriter text" . "09fbbfac.enc") ;; cmtt10
- ("TeX math symbols" . "10037936.enc") ;; cmbsy
- ("ASCII caps and digits" . "1b6d048e.enc") ;; cminch
- ("TeX math italic" . "aae443f0.enc") ;; cmmi10
- ("TeX extended ASCII" . "d9b29452.enc")
- ("TeX text" . "f7b6d320.enc")
- ("TeX text without f-ligatures" . "0ef0afca.enc")
- ("Extended TeX Font Encoding - Latin" . "tex256.enc")
+ ("TeX-typewriter-text" . "09fbbfac.enc") ;; cmtt10
+ ("TeX-math-symbols" . "10037936.enc") ;; cmbsy
+ ("ASCII-caps-and-digits" . "1b6d048e.enc") ;; cminch
+ ("TeX-math-italic" . "aae443f0.enc") ;; cmmi10
+ ("TeX-extended-ASCII" . "d9b29452.enc")
+ ("TeX-text" . "cmr.enc")
+ ("TeX-text-without-f-ligatures" . "0ef0afca.enc")
+ ("Extended-TeX-Font-Encoding---Latin" . "tex256.enc")
("T1" . "tex256.enc")
;; FIXME: explain ploblem: need to do something to make this really safe.
(define (output-tex-string s)
- (if safe-mode?
- (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
- s))
+ (if safe-mode?
+ (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
+ s))
(define (lily-def key val)
(let ((tex-key
(define (text font s)
(let*
- ((perm (assoc-get 'char-mapping (ly:font-encoding-alist font))))
+ ((mapping #f))
+
+ ;; TODO: we'd better do this for PS only
+ ;; LaTeX gets in the way, and we need to remap
+ ;; nonprintable chars.
+
+ ; (assoc-get 'char-mapping (ly:font-encoding-alist font))))
(string-append "\\hbox{\\" (font-command font) "{}"
(output-tex-string
- (if (vector? perm)
- (reencode-string perm s)
+ (if (vector? mapping)
+ (reencode-string mapping s)
s))
"}")))