Hi all, what is the correct way to use another font in context? We use definetypeface and setupbodyfont (without really knowing what's going on...just copied from some example we found). When I uncomment the font statements in the following example, the Sigma symbol becomes a little circle and the the bar is rendered through z not above it? TIA, - Ralf \starttext %\definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec] %\definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec] %\setupbodyfont [charter, 9pt] $ \Sigma $ $ |z|=|\bar{z}| $ \stoptext
Try adding the line \usetypescript[serif][charter][ec] at the beginning. [BTW: your minimal example was almost visible; next time, make a bodyfont of 5pt] HTH Thomas On Jul 10, 2006, at 9:10 AM, Ralf Schmitt wrote:
\starttext
%\definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec] %\definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec] %\setupbodyfont [charter, 9pt]
$ \Sigma $ $ |z|=|\bar{z}| $
\stoptext
Thomas A. Schmitz wrote:
Try adding the line
\usetypescript[serif][charter][ec]
at the beginning.
this didn't work for me...
[BTW: your minimal example was almost visible; next time, make a bodyfont of 5pt]
I thought about making a comment on this remark. I tried 0pt font size, didn't work. Then I tried 1pt font size. And the funny thing is: With 1pt font size the output is good!!!(also with 2pt and 3pt, but not with 4pt or up, with or without the \usetypescript command.). Any insights? Am I going insane? - Ralf
On Jul 10, 2006, at 11:01 AM, Ralf Schmitt wrote:
I thought about making a comment on this remark. I tried 0pt font size, didn't work. Then I tried 1pt font size. And the funny thing is: With 1pt font size the output is good!!!(also with 2pt and 3pt, but not with 4pt or up, with or without the \usetypescript command.).
Any insights? Am I going insane?
OK, this was just a joke, but it might help us. Looks like ConTeXt can't find the math font for defined sizes. Could you try two things (in turn, not at the same time): 1. define the math font as well: \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec] and see if this solves your problem. 2. In the file $TEXMF/tex/context/user/cont-sys.rme (or cont-sys.tex, if you have that file already), uncomment the line \resetmapfiles \usetypescript [map] [base] [all] save the file to cont-sys.tex, run texhash (or sudo texhash, depending on your setup) and see if this helps. Your file compiles fine here, no problem at any size. Thomas
Thomas A. Schmitz wrote:
On Jul 10, 2006, at 11:01 AM, Ralf Schmitt wrote:
I thought about making a comment on this remark. I tried 0pt font size, didn't work. Then I tried 1pt font size. And the funny thing is: With 1pt font size the output is good!!!(also with 2pt and 3pt, but not with 4pt or up, with or without the \usetypescript command.).
Any insights? Am I going insane?
OK, this was just a joke, but it might help us. Looks like ConTeXt can't find the math font for defined sizes. Could you try two things (in turn, not at the same time):
1. define the math font as well: \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]
and see if this solves your problem.
This works.
2. In the file $TEXMF/tex/context/user/cont-sys.rme (or cont-sys.tex, if you have that file already), uncomment the line
\resetmapfiles \usetypescript [map] [base] [all]
save the file to cont-sys.tex, run texhash (or sudo texhash, depending on your setup) and see if this helps.
This doesn't work.
Your file compiles fine here, no problem at any size.
I've tested it on 3 machines and it didn't work on any of those (ubuntu dapper, debian testing, freebsd). Many thanks, - Ralf
Ralf Schmitt wrote:
Thomas A. Schmitz wrote:
1. define the math font as well: \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]
and see if this solves your problem.
This works.
Until one tries to use a bold font with \bf. This is the complete list of commands I use to circumvent that problem: \usetypescript[serif][charter][ec] \definetypeface [charter] [it] [italics] [modern] [default][encoding=ec] \definetypeface [charter] [bf] [bold] [modern] [default] [encoding=ec] \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec] \definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec] \definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec] \setupbodyfont [charter, 11pt] (Just to keep the archives complete...actually I don't understand what I'm doing (wrong?) here.) - Ralf
Ralf Schmitt wrote:
Ralf Schmitt wrote:
Thomas A. Schmitz wrote:
1. define the math font as well: \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec]
and see if this solves your problem.
This works.
Until one tries to use a bold font with \bf. This is the complete list of commands I use to circumvent that problem:
\usetypescript[serif][charter][ec] \definetypeface [charter] [it] [italics] [modern] [default][encoding=ec] \definetypeface [charter] [bf] [bold] [modern] [default] [encoding=ec] \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec] \definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec] \definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec] \setupbodyfont [charter, 11pt]
(Just to keep the archives complete...actually I don't understand what I'm doing (wrong?) here.)
\definetypeface [charter] [it] [italics] [modern] [default][encoding=ec] \definetypeface [charter] [bf] [bold] [modern] [default] [encoding=ec] does not make sense, \usetypescript[serif][charter][ec] \definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec] \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec] \definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec] \setupbodyfont [charter, 11pt] % rm si default since defined first or \setupbodyfont [charter, 11pt, rm] \setupbodyfont [charter, 11pt] ----------------------------------------------------------------- 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 -----------------------------------------------------------------
Hans Hagen wrote:
\definetypeface [charter] [it] [italics] [modern] [default][encoding=ec] \definetypeface [charter] [bf] [bold] [modern] [default] [encoding=ec]
does not make sense,
ack
\usetypescript[serif][charter][ec] \definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec] \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec] \definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec]
\setupbodyfont [charter, 11pt] % rm si default since defined first
and what is surprising to me: order does matter here. If I put the definetypeface for math mode command at the front, {\bf bold} does not work anymore. Thanks, - Ralf
Ralf Schmitt wrote:
Hans Hagen wrote:
\definetypeface [charter] [it] [italics] [modern] [default][encoding=ec] \definetypeface [charter] [bf] [bold] [modern] [default] [encoding=ec]
does not make sense,
ack
\usetypescript[serif][charter][ec] \definetypeface [charter] [rm] [serif] [charter] [default] [encoding=ec] \definetypeface [charter] [mm] [math] [modern] [default] [encoding=ec] \definetypeface [charter] [tt] [mono] [charter] [default] [encoding=ec]
\setupbodyfont [charter, 11pt] % rm si default since defined first
and what is surprising to me: order does matter here. If I put the definetypeface for math mode command at the front, {\bf bold} does not work anymore.
indeed, this is because the first one defined is the default (think of typefaces that only have ss, like optima) so, this may work when rm, tt or ss is defined first \setupbodyfont [charter, 11pt] but this is more robust \setupbodyfont [charter, rm, 11pt] 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 -----------------------------------------------------------------
participants (3)
-
Hans Hagen
-
Ralf Schmitt
-
Thomas A. Schmitz