Wolfgang Schuster wrote:
Am 25.11.2009 um 16:27 schrieb Mika Ritola:
Hello again,
I seem to be running into all sorts of font problems. Now my document has suddenly turned bold. For example, running the following code results in "Test." being rendered in bold characters.
A few things have changed in ConTeXt font mechanism and I'm going to adapt simplefonts to the new code (will take a while) but there are now many new features available, take for example the new spec-interface which could be used to write this:
\starttypescript[Xserif][all][name]
\definefontsynonym [Serif] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-normal] [features=default] \definefontsynonym [SerifItalic] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-italic] [features=default] \definefontsynonym [SerifSlanted] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-italic] [features=default] \definefontsynonym [SerifBold] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-bold-normal] [features=default] \definefontsynonym [SerifBoldItalic] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-bold-italic] [features=default] \definefontsynonym [SerifBoldSlanted] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-bold-italic] [features=default] \definefontsynonym [SerifCaps] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-normal] [features=smallcaps]
\stoptypescript
\definefontsynonym[Serif][spec:\ctxlua{fonts.names.cleanname("\typescripttwo"}-normal-normal][features=default] I'll add \cleanfontname so that we can have \definefontsynonym[Serif][spec:\cleanfontname\typescripttwo-normal-normal][features=default] Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------