Hi. First of all: mkii format generation still fails here because of [context.mkii] \loadmkiifile{core-swd} I added the mkii suffix here to make it run. ---- Back to the subject. When using mkiv there is a problem in finding the map files of my fonts. Instead of the expanded value of \defaultencoding (here texnansi, set in cont-sys.tex) the prefix 'default' is used here. [..] fonts : using map file: default-microsoft-arial luaTeX warning (file default-microsoft-arial.map): cannot open font map file fonts : using map file: default-microsoft-sansserif luaTeX warning (file default-microsoft-sansserif.map): cannot open font map file fonts : using map file: default-microsoft-trebuchet luaTeX warning (file default-microsoft-trebuchet.map): cannot open font map file fonts : using map file: default-microsoft-tahoma luaTeX warning (file default-microsoft-tahoma.map): cannot open font map file ---- Mkii works fine with these fonts (TTF). I made a small test file, but I'm not sure if the font is choosen wisely (T1). Anyhow, it shows the way how I use the upper named fonts in my macros. Regards, Peter \usetypescriptfile[type-cow] \usetypescript[all][cow][default] \usetypescript[cow][default] \definefont [TestFont] [Cows at 40pt] \starttext {\TestFont Just a test.} \stoptext
On Tue, Nov 11, 2008 at 2:37 PM, Peter Rolf
Hi.
First of all: mkii format generation still fails here because of
[context.mkii] \loadmkiifile{core-swd}
I added the mkii suffix here to make it run. ----
Back to the subject. When using mkiv there is a problem in finding the map files of my fonts. Instead of the expanded value of \defaultencoding (here texnansi, set in cont-sys.tex) the prefix 'default' is used here.
[..] fonts : using map file: default-microsoft-arial
luaTeX warning (file default-microsoft-arial.map): cannot open font map file fonts : using map file: default-microsoft-sansserif
luaTeX warning (file default-microsoft-sansserif.map): cannot open font map file fonts : using map file: default-microsoft-trebuchet
luaTeX warning (file default-microsoft-trebuchet.map): cannot open font map file fonts : using map file: default-microsoft-tahoma
luaTeX warning (file default-microsoft-tahoma.map): cannot open font map file ----
Mkii works fine with these fonts (TTF). I made a small test file, but I'm not sure if the font is choosen wisely (T1). Anyhow, it shows the way how I use the upper named fonts in my macros.
You should write new typescripts/files for MkIV because you could use Truetype fonts without map and tfm files. Wolfgang
Wolfgang Schuster schrieb:
On Tue, Nov 11, 2008 at 2:37 PM, Peter Rolf
wrote: Hi.
First of all: mkii format generation still fails here because of
[context.mkii] \loadmkiifile{core-swd}
I added the mkii suffix here to make it run. ----
Back to the subject. When using mkiv there is a problem in finding the map files of my fonts. Instead of the expanded value of \defaultencoding (here texnansi, set in cont-sys.tex) the prefix 'default' is used here.
[..] fonts : using map file: default-microsoft-arial
luaTeX warning (file default-microsoft-arial.map): cannot open font map file fonts : using map file: default-microsoft-sansserif
luaTeX warning (file default-microsoft-sansserif.map): cannot open font map file fonts : using map file: default-microsoft-trebuchet
luaTeX warning (file default-microsoft-trebuchet.map): cannot open font map file fonts : using map file: default-microsoft-tahoma
luaTeX warning (file default-microsoft-tahoma.map): cannot open font map file ----
Mkii works fine with these fonts (TTF). I made a small test file, but I'm not sure if the font is choosen wisely (T1). Anyhow, it shows the way how I use the upper named fonts in my macros.
You should write new typescripts/files for MkIV because you could use Truetype fonts without map and tfm files.
Thanks Wolfgang. I'll try... :)
Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Wolfgang Schuster schrieb:
On Tue, Nov 11, 2008 at 2:37 PM, Peter Rolf
wrote: Hi.
First of all: mkii format generation still fails here because of
[context.mkii] \loadmkiifile{core-swd}
I added the mkii suffix here to make it run. ----
Back to the subject. When using mkiv there is a problem in finding the map files of my fonts. Instead of the expanded value of \defaultencoding (here texnansi, set in cont-sys.tex) the prefix 'default' is used here.
[..] fonts : using map file: default-microsoft-arial
luaTeX warning (file default-microsoft-arial.map): cannot open font map file fonts : using map file: default-microsoft-sansserif
luaTeX warning (file default-microsoft-sansserif.map): cannot open font map file fonts : using map file: default-microsoft-trebuchet
luaTeX warning (file default-microsoft-trebuchet.map): cannot open font map file fonts : using map file: default-microsoft-tahoma
luaTeX warning (file default-microsoft-tahoma.map): cannot open font map file ----
Mkii works fine with these fonts (TTF). I made a small test file, but I'm not sure if the font is choosen wisely (T1). Anyhow, it shows the way how I use the upper named fonts in my macros.
You should write new typescripts/files for MkIV because you could use Truetype fonts without map and tfm files.
Yes, this works and is also faster. But now I have a different positioning (text baseline is too low, plus bigger interline spacing), caused by a too big strut height. A direct font switch like \TestFont doesn't change the strut height nor the interline spacing. So I always add \TestFont\setstrut\setupinterlinespace after each font switch. Doesn't work anymore in mkiv. More code to adapt?
Wolfgang ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Am 11.11.2008 um 17:40 schrieb Peter Rolf:
You should write new typescripts/files for MkIV because you could use Truetype fonts without map and tfm files.
Yes, this works and is also faster. But now I have a different positioning (text baseline is too low, plus bigger interline spacing), caused by a too big strut height. A direct font switch like \TestFont doesn't change the strut height nor the interline spacing. So I always add
\TestFont\setstrut\setupinterlinespace
after each font switch. Doesn't work anymore in mkiv. More code to adapt?
This was discussed last week, if you need the same baseline distance use the value from MkII or use a fix distance like 12pt. http://archive.contextgarden.net/message/20081105.030003.aa31c1e4.en.html Wolfgang
Wolfgang Schuster schrieb:
Am 11.11.2008 um 17:40 schrieb Peter Rolf:
You should write new typescripts/files for MkIV because you could use Truetype fonts without map and tfm files.
Yes, this works and is also faster. But now I have a different positioning (text baseline is too low, plus bigger interline spacing), caused by a too big strut height. A direct font switch like \TestFont doesn't change the strut height nor the interline spacing. So I always add
\TestFont\setstrut\setupinterlinespace
after each font switch. Doesn't work anymore in mkiv. More code to adapt?
This was discussed last week, if you need the same baseline distance use the value from MkII or use a fix distance like 12pt.
http://archive.contextgarden.net/message/20081105.030003.aa31c1e4.en.html
I followed that one. But my problem is more the *wrong strut height*, e.g. using a \totalstrut value of 12pt with a 8pt font. The strut height is simply not adapted to the actual font size anymore (even if I use \setstrut). When you place the text at a fixed position (e.g. a button), it is shifted down due to the too big strut. The wrong looking 'interline space' is just another result of that (although the white space comes from the big strut). Anyway, thanks for your help. Best wishes, Peter
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Peter Rolf wrote:
I followed that one. But my problem is more the *wrong strut height*, e.g. using a \totalstrut value of 12pt with a 8pt font. The strut height is simply not adapted to the actual font size anymore (even if I use \setstrut).
I can understand why you think this is a different problem, but both struts and interline spaces depend on the value of "1ex", which has changed in an incompatible way. Perhaps you should post a complete minimal example. Best wishes, Taco
Taco Hoekwater schrieb:
Peter Rolf wrote:
I followed that one. But my problem is more the *wrong strut height*, e.g. using a \totalstrut value of 12pt with a 8pt font. The strut height is simply not adapted to the actual font size anymore (even if I use \setstrut).
I can understand why you think this is a different problem, but both struts and interline spaces depend on the value of "1ex", which has changed in an incompatible way. Perhaps you should post a complete minimal example.
But (unless the font data is really bad) we are talking about slight differences. And you can't call a 12.6pt strut for a 8pt font a slight change. :) I will (try to) make a minimal example...
Best wishes, Taco ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Peter Rolf wrote:
Taco Hoekwater schrieb:
Peter Rolf wrote:
I followed that one. But my problem is more the *wrong strut height*, e.g. using a \totalstrut value of 12pt with a 8pt font. The strut height is simply not adapted to the actual font size anymore (even if I use \setstrut). I can understand why you think this is a different problem, but both struts and interline spaces depend on the value of "1ex", which has changed in an incompatible way. Perhaps you should post a complete minimal example.
But (unless the font data is really bad) we are talking about slight differences. And you can't call a 12.6pt strut for a 8pt font a slight change. :)
I will (try to) make a minimal example...
\showstruts \start \tf \setstrut tf:\strut \tfa \setstrut tfa:\strut \tfb \setstrut tfb:\strut \tfc \setstrut tfc:\strut \tfd \setstrut tfd:\strut \stop \start \small \tf \setstrut tf:\strut \tfa \setstrut tfa:\strut \tfb \setstrut tfb:\strut \tfc \setstrut tfc:\strut \tfd \setstrut tfd:\strut \stop looks ok to me (at least on my machine) ----------------------------------------------------------------- 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 schrieb:
Peter Rolf wrote:
Taco Hoekwater schrieb:
Peter Rolf wrote:
I followed that one. But my problem is more the *wrong strut height*, e.g. using a \totalstrut value of 12pt with a 8pt font. The strut height is simply not adapted to the actual font size anymore (even if I use \setstrut). I can understand why you think this is a different problem, but both struts and interline spaces depend on the value of "1ex", which has changed in an incompatible way. Perhaps you should post a complete minimal example.
But (unless the font data is really bad) we are talking about slight differences. And you can't call a 12.6pt strut for a 8pt font a slight change. :)
I will (try to) make a minimal example...
\showstruts \start \tf \setstrut tf:\strut \tfa \setstrut tfa:\strut \tfb \setstrut tfb:\strut \tfc \setstrut tfc:\strut \tfd \setstrut tfd:\strut \stop \start \small \tf \setstrut tf:\strut \tfa \setstrut tfa:\strut \tfb \setstrut tfb:\strut \tfc \setstrut tfc:\strut \tfd \setstrut tfd:\strut \stop
looks ok to me (at least on my machine)
same here. strut adapting works also with a ms font (ttf). so no general but a special (and maybe private) problem. we will see.
----------------------------------------------------------------- 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________
Peter Rolf schrieb:
Taco Hoekwater schrieb:
Peter Rolf wrote:
I followed that one. But my problem is more the *wrong strut height*, e.g. using a \totalstrut value of 12pt with a 8pt font. The strut height is simply not adapted to the actual font size anymore (even if I use \setstrut). I can understand why you think this is a different problem, but both struts and interline spaces depend on the value of "1ex", which has changed in an incompatible way. Perhaps you should post a complete minimal example.
But (unless the font data is really bad) we are talking about slight differences. And you can't call a 12.6pt strut for a 8pt font a slight change. :)
I will (try to) make a minimal example...
Looks like this is font related. I have tried the attached example with LM and there where no noticible differences (not at first sight). Same example with Tahoma and things go the wrong way. Regards, Peter
Best wishes, Taco ___________________________________________________________________________________ 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 ___________________________________________________________________________________
___________________________________________________________________________________ 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 ___________________________________________________________________________________
\usetypescriptfile[type-microsoft-tahoma] \ifnum\contextmarkmode=4 \usetypescript[tahoma] \else \usetypescript[ms] [tahoma] \fi \setupbodyfont[tahoma] \starttext \startTEXpage \showstruts \tfd \setstrut \framed[strut=no]{\ruledhbox{\begstrut tfd: qgjyQWT\endstrut}} \stopTEXpage \stoptext %% TTF (part of Windows XP) \ifnum\contextmarkmode=4 \starttypescript [sans] [tahoma] \setups[font:fallback:sans] \definefontsynonym [Sans] [Tahoma] \definefontsynonym [SansBold] [Tahoma-Bold] \stoptypescript \starttypescript [sans] [tahoma] \definefontsynonym [Tahoma] [file:tahoma] [features=default] \definefontsynonym [Tahoma-Bold] [file:tahomabd] [features=default] \stoptypescript \starttypescript [tahoma] \definetypeface [\typescriptone] [ss] [sans] [tahoma] [default] \stoptypescript \else \starttypescript [map] [tahoma] [\defaultencoding] \loadmapfile [\defaultencoding-microsoft-tahoma.map] \stoptypescript % sans tahoma \starttypescript [sans] [tahoma] [name] \setups[font:fallback:sans] \definefontsynonym [Sans] [Tahoma] \definefontsynonym [SansBold] [Tahoma-Bold] \stoptypescript % sans microsoft tahoma \starttypescript [sans] [tahoma] [\defaultencoding] \definefontsynonym [Tahoma] [\defaultencoding-tahoma] [encoding=\defaultencoding] \definefontsynonym [Tahoma-Bold] [\defaultencoding-tahomabd] [encoding=\defaultencoding] \stoptypescript \starttypescript [ms] [tahoma] \definetypeface [tahoma] [ss] [sans] [tahoma] [default] [encoding=\defaultencoding] \stoptypescript \fi \endinput
Am 13.11.2008 um 16:22 schrieb Peter Rolf:
Peter Rolf schrieb:
Taco Hoekwater schrieb:
Peter Rolf wrote:
I followed that one. But my problem is more the *wrong strut height*, e.g. using a \totalstrut value of 12pt with a 8pt font. The strut height is simply not adapted to the actual font size anymore (even if I use \setstrut). I can understand why you think this is a different problem, but both struts and interline spaces depend on the value of "1ex", which has changed in an incompatible way. Perhaps you should post a complete minimal example.
But (unless the font data is really bad) we are talking about slight differences. And you can't call a 12.6pt strut for a 8pt font a slight change. :)
I will (try to) make a minimal example...
Looks like this is font related. I have tried the attached example with LM and there where no noticible differences (not at first sight). Same example with Tahoma and things go the wrong way.
The output for Tahoma in MkIV is correct but it is different from MkIV because MkII use the values for the lineheight from Latin modern and MkIV use the values from Tahoma. \usetypescriptfile[type-microsoft-tahoma] \usetypescript[tahoma] \setupbodyfont[10pt] \starttext \the\dimexpr1ex\relax \switchtobodyfont[tahoma,10pt] \the\dimexpr1ex\relax \stoptext Try \setupstrut[fit] or \setfontstrut in your document. Wolfgang
Wolfgang Schuster schrieb:
Am 13.11.2008 um 16:22 schrieb Peter Rolf:
Peter Rolf schrieb:
Taco Hoekwater schrieb:
Peter Rolf wrote:
I followed that one. But my problem is more the *wrong strut height*, e.g. using a \totalstrut value of 12pt with a 8pt font. The strut height is simply not adapted to the actual font size anymore (even if I use \setstrut). I can understand why you think this is a different problem, but both struts and interline spaces depend on the value of "1ex", which has changed in an incompatible way. Perhaps you should post a complete minimal example.
But (unless the font data is really bad) we are talking about slight differences. And you can't call a 12.6pt strut for a 8pt font a slight change. :)
I will (try to) make a minimal example...
Looks like this is font related. I have tried the attached example with LM and there where no noticible differences (not at first sight). Same example with Tahoma and things go the wrong way.
The output for Tahoma in MkIV is correct but it is different from MkIV because MkII use the values for the lineheight from Latin modern and MkIV use the values from Tahoma.
\usetypescriptfile[type-microsoft-tahoma]
\usetypescript[tahoma] \setupbodyfont[10pt]
\starttext
\the\dimexpr1ex\relax
\switchtobodyfont[tahoma,10pt]
\the\dimexpr1ex\relax
\stoptext
Try \setupstrut[fit] or \setfontstrut in your document.
Sometimes I'm slow on the uptake... :D Many thanks Wolfgang!
Wolfgang
___________________________________________________________________________________ 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 ___________________________________________________________________________________
Peter Rolf wrote:
Peter Rolf schrieb:
Taco Hoekwater schrieb:
Peter Rolf wrote:
I followed that one. But my problem is more the *wrong strut height*, e.g. using a \totalstrut value of 12pt with a 8pt font. The strut height is simply not adapted to the actual font size anymore (even if I use \setstrut). I can understand why you think this is a different problem, but both struts and interline spaces depend on the value of "1ex", which has changed in an incompatible way. Perhaps you should post a complete minimal example.
But (unless the font data is really bad) we are talking about slight differences. And you can't call a 12.6pt strut for a 8pt font a slight change. :)
I will (try to) make a minimal example...
Looks like this is font related. I have tried the attached example with LM and there where no noticible differences (not at first sight). Same example with Tahoma and things go the wrong way.
nothing wrong ... it's just that afm2tfm (or whatever you use for mkii) uses some funny method for calculating the ex height in mkiv we use the xheight spec from the font (defined in the font in this case) or the height of an 'x' \showstruts 2.8ex: \the\dimexpr2.8ex\par \strut qgjyQWT\par 1ex: \the\dimexpr 1ex\par \setbox0\hbox{x}ht(x):\the\ht0\par 2.8*ht(x): \the\dimexpr2.8\ht0 if you look at the font it's pretty clear that it has a large x-height so you can best use a different interline specification, like x\strut qgjyQWT\par \setupinterlinespace[line=1.2\bodyfontsize] x\strut qgjyQWT\par you might even want to change the height:depth ratio (keep in mind that we cannot predict these things, so it always is a matter of tuning ----------------------------------------------------------------- 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 schrieb:
Peter Rolf wrote:
Peter Rolf schrieb:
Taco Hoekwater schrieb:
Peter Rolf wrote:
I followed that one. But my problem is more the *wrong strut height*, e.g. using a \totalstrut value of 12pt with a 8pt font. The strut height is simply not adapted to the actual font size anymore (even if I use \setstrut). I can understand why you think this is a different problem, but both struts and interline spaces depend on the value of "1ex", which has changed in an incompatible way. Perhaps you should post a complete minimal example.
But (unless the font data is really bad) we are talking about slight differences. And you can't call a 12.6pt strut for a 8pt font a slight change. :)
I will (try to) make a minimal example...
Looks like this is font related. I have tried the attached example with LM and there where no noticible differences (not at first sight). Same example with Tahoma and things go the wrong way.
nothing wrong ... it's just that afm2tfm (or whatever you use for mkii) uses some funny method for calculating the ex height
in mkiv we use the xheight spec from the font (defined in the font in this case) or the height of an 'x'
\showstruts 2.8ex: \the\dimexpr2.8ex\par \strut qgjyQWT\par 1ex: \the\dimexpr 1ex\par \setbox0\hbox{x}ht(x):\the\ht0\par 2.8*ht(x): \the\dimexpr2.8\ht0
if you look at the font it's pretty clear that it has a large x-height so you can best use a different interline specification, like
x\strut qgjyQWT\par \setupinterlinespace[line=1.2\bodyfontsize] x\strut qgjyQWT\par
you might even want to change the height:depth ratio (keep in mind that we cannot predict these things, so it always is a matter of tuning
I see clear now. Would have been much faster, if I hadn't interrupted this problem by screwing on my new computer (sorry, I couldn't resist). Anyhow I need to rethink my font concept. If I have to setup all these parameters, the simple \definefont isn't sufficient anymore. Probably an external defined \setup will do best. Thanks to all of you who helped me with this problem, also for your patience :) Best wishes, Peter
----------------------------------------------------------------- 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 ----------------------------------------------------------------- ___________________________________________________________________________________ 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 ___________________________________________________________________________________
participants (4)
-
Hans Hagen
-
Peter Rolf
-
Taco Hoekwater
-
Wolfgang Schuster