Hello, i try to use tikz: \usemodule[tikz] \usebodyfont [sansserif, 10pt] ... \starttikzpicture[] \draw (0cm, 0cm) -- (5cm, 5cm) node {vous êtes ici}; \stoptikzpicture the text in the figure is not 'sansserif' but cmr-like. How can I get the same 'sansserif' than in the body ? Thanks for your help. -- René Bastian
On Tue, Jul 21, 2009 at 14:25, R. Bastian wrote:
Hello,
i try to use tikz:
\usemodule[tikz] \usebodyfont [sansserif, 10pt] ... \starttikzpicture[] \draw (0cm, 0cm) -- (5cm, 5cm) node {vous êtes ici}; \stoptikzpicture
the text in the figure is not 'sansserif' but cmr-like.
How can I get the same 'sansserif' than in the body ?
TikZ does the following: \def\pgfutil@font@tiny{\tfxx} % How to do this correctly? \def\pgfutil@font@scriptsize{\tfxx} \def\pgfutil@font@footnotesize{\tfx} \def\pgfutil@font@small{\tfx} \def\pgfutil@font@normalsize{\tf} \def\pgfutil@font@large{\tfa} \def\pgfutil@font@Large{\tfb} \def\pgfutil@font@huge{\tfc} \def\pgfutil@font@Huge{\tfc} \def\pgfutil@font@itshape{\it} \def\pgfutil@font@bfseries{\bf} \let\pgfutil@font@normalfont=\rm \let\pgfutil@selectfont=\rm So it basically forces "\rm" switch at the beginning of every label. You get even more weird results with the following (text is LM, but math is iwona): \usemodule[tikz] \enableregime[utf-8] \usetypescript[iwona][ec] \setupbodyfont[iwona] \starttext \tikz \draw (0cm, 0cm) -- (5cm, 5cm) node {this is cm, but $math\in\Im νοnα$}; \stoptext So the question is: what command should TikZ use to switch to "normal" font? I have tried replacing \rm with \tf and then iwona started working properly. What do others think? Should we request replacing \rm by \tf in TikZ? Mojca
Mojca Miklavec wrote:
On Tue, Jul 21, 2009 at 14:25, R. Bastian wrote:
Hello,
i try to use tikz:
\usemodule[tikz] \usebodyfont [sansserif, 10pt] ... \starttikzpicture[] \draw (0cm, 0cm) -- (5cm, 5cm) node {vous êtes ici}; \stoptikzpicture
the text in the figure is not 'sansserif' but cmr-like.
How can I get the same 'sansserif' than in the body ?
TikZ does the following:
\def\pgfutil@font@tiny{\tfxx} % How to do this correctly?
\small or \txx
\def\pgfutil@font@scriptsize{\tfxx} \def\pgfutil@font@footnotesize{\tfx} \def\pgfutil@font@small{\tfx} \def\pgfutil@font@normalsize{\tf} \def\pgfutil@font@large{\tfa} \def\pgfutil@font@Large{\tfb} \def\pgfutil@font@huge{\tfc} \def\pgfutil@font@Huge{\tfc} \def\pgfutil@font@itshape{\it} \def\pgfutil@font@bfseries{\bf} \let\pgfutil@font@normalfont=\rm \let\pgfutil@selectfont=\rm
So it basically forces "\rm" switch at the beginning of every label. You get even more weird results with the following (text is LM, but math is iwona):
\usemodule[tikz] \enableregime[utf-8] \usetypescript[iwona][ec] \setupbodyfont[iwona] \starttext \tikz \draw (0cm, 0cm) -- (5cm, 5cm) node {this is cm, but $math\in\Im νοnα$}; \stoptext
So the question is: what command should TikZ use to switch to "normal" font? I have tried replacing \rm with \tf and then iwona started working properly. What do others think? Should we request replacing \rm by \tf in TikZ?
Mojca ___________________________________________________________________________________ If your question is of interest to others as well, please add an entry to the Wiki!
maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context webpage : http://www.pragma-ade.nl / http://tex.aanhet.net archive : https://foundry.supelec.fr/projects/contextrev/ wiki : http://contextgarden.net ___________________________________________________________________________________
-- ----------------------------------------------------------------- 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 -----------------------------------------------------------------
On Tue, Jul 21, 2009 at 23:22, Hans Hagen wrote:
Mojca Miklavec wrote:
TikZ does the following:
\def\pgfutil@font@tiny{\tfxx} % How to do this correctly?
\small or \txx
That was just copy-pasted from TikZ source (I have not been asking that; my diagnosis/question/suggestion was about \let\pgfutil@font@normalfont=\rm and \let\pgfutil@selectfont=\rm that should probably be changed to \tf) but since you have answered ... I think that it was desired to use something even smaller. In LaTeX there is: \tiny 5 \scriptsize 7 \footnotesize 8 \small 9 \normalsize 10 so one can choose 4 smaller sizes. In ConTeXt there is apparently (I never had to use so tiny sizes, so I never checked the details): \definebodyfontenvironment [10pt] [\s!text=10pt,\s!script=7pt,\s!scriptscript=5pt, \c!x=8pt,\c!xx=6pt,\c!big=12pt,\c!small=8pt] I suspect that the author wanted to have something even smaller than \tfxx (or better: 4 smaller sizes instead of just the current two), most probably that would be scriptscript, just that it needs a special treatment. (\switchtobodyfont[scriptscript] works to get 5pt in 10pt regime, but I'm not sure about the most efficient way.)
\def\pgfutil@font@scriptsize{\tfxx} \def\pgfutil@font@footnotesize{\tfx} \def\pgfutil@font@small{\tfx} \def\pgfutil@font@normalsize{\tf}
Mojca
Mojca Miklavec wrote:
On Tue, Jul 21, 2009 at 23:22, Hans Hagen wrote:
Mojca Miklavec wrote:
TikZ does the following:
\def\pgfutil@font@tiny{\tfxx} % How to do this correctly? \small or \txx
That was just copy-pasted from TikZ source (I have not been asking that; my diagnosis/question/suggestion was about \let\pgfutil@font@normalfont=\rm and \let\pgfutil@selectfont=\rm that should probably be changed to \tf) but since you have answered ...
I think that it was desired to use something even smaller. In LaTeX there is:
\tiny 5 \scriptsize 7 \footnotesize 8 \small 9 \normalsize 10
so one can choose 4 smaller sizes. In ConTeXt there is apparently (I never had to use so tiny sizes, so I never checked the details):
\definebodyfontenvironment [10pt] [\s!text=10pt,\s!script=7pt,\s!scriptscript=5pt, \c!x=8pt,\c!xx=6pt,\c!big=12pt,\c!small=8pt]
I suspect that the author wanted to have something even smaller than \tfxx (or better: 4 smaller sizes instead of just the current two), most probably that would be scriptscript, just that it needs a special treatment. (\switchtobodyfont[scriptscript] works to get 5pt in 10pt regime, but I'm not sure about the most efficient way.)
i don't know either ... personally i'd use a model that is tight to graphic dimensions (as baseline alignments are also an issue) anyway, the latex and context font models are too different to bother too much about mapping 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
-
Mojca Miklavec
-
R. Bastian