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 \starttypescript[Xsans][all][name] \definefontsynonym [Sans] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-normal] [features=default] \definefontsynonym [SansItalic] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-italic] [features=default] \definefontsynonym [SansSlanted] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-italic] [features=default] \definefontsynonym [SansBold] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-bold-normal] [features=default] \definefontsynonym [SansBoldItalic] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-bold-italic] [features=default] \definefontsynonym [SansBoldSlanted] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-bold-italic] [features=default] \definefontsynonym [SansCaps] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-normal] [features=smallcaps] \stoptypescript \starttypescript[Xmono][all][name] \definefontsynonym [Mono] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-normal] [features=default] \definefontsynonym [MonoItalic] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-italic] [features=default] \definefontsynonym [MonoSlanted] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-italic] [features=default] \definefontsynonym [MonoBold] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-bold-normal] [features=default] \definefontsynonym [MonoBoldItalic] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-bold-italic] [features=default] \definefontsynonym [MonoBoldSlanted] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-bold-italic] [features=default] \definefontsynonym [MonoCaps] [spec:\ctxlua{tex.sprint(string.lower(string.gsub("\typescripttwo","[^a-zA-Z0-9]","")))}-normal-normal] [features=smallcaps] \stoptypescript \starttypescript[Xserif][default][size] \definebodyfont [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] [rm] [default] \stoptypescript \starttypescript[Xsans][default][size] \definebodyfont [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] [ss] [default] \stoptypescript \starttypescript [Xmono][default][size] \definebodyfont [4pt,5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,14.4pt,17.3pt] [tt] [default] \stoptypescript \starttypescript[Xserif][dtp][size] \definebodyfont [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt] [rm] [default] \stoptypescript \starttypescript[Xsans][dtp][size] \definebodyfont [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt] [ss] [default] \stoptypescript \starttypescript[Xmono][dtp][size] \definebodyfont [5pt,6pt,7pt,8pt,9pt,10pt,11pt,12pt,13pt,14pt,16pt,18pt,22pt,28pt] [tt] [default] \stoptypescript % this is the relevant part for the users \definetypeface[mainface][rm][Xserif][TeX Gyre Pagella][default] \definetypeface[mainface][ss][Xsans] [TeX Gyre Heros] [default][rscale=0.9] \definetypeface[mainface][tt][Xmono] [TeX Gyre Cursor] [default][rscale=1.1] \setupbodyfont[mainface] \starttext \rm\tf roman \it italic \bf bold \bi bolditalic \sc smallcaps \ss\tf roman \it italic \bf bold \bi bolditalic \sc smallcaps \tt\tf roman \it italic \bf bold \bi bolditalic \sc smallcaps \stoptext Wolfgang