ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* \definefont problem with latest beta (mkiv)
@ 2008-11-11 13:37 Peter Rolf
  2008-11-11 13:48 ` Wolfgang Schuster
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Rolf @ 2008-11-11 13:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1161 bytes --]

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




[-- Attachment #2: default.tex --]
[-- Type: text/plain, Size: 191 bytes --]

\usetypescriptfile[type-cow]
\usetypescript[all][cow][default]
\usetypescript[cow][default]

\definefont [TestFont] [Cows at 40pt]

\starttext

{\TestFont Just a test.}

\stoptext

[-- Attachment #3: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-11 13:37 \definefont problem with latest beta (mkiv) Peter Rolf
@ 2008-11-11 13:48 ` Wolfgang Schuster
  2008-11-11 14:03   ` Peter Rolf
  2008-11-11 16:40   ` Peter Rolf
  0 siblings, 2 replies; 15+ messages in thread
From: Wolfgang Schuster @ 2008-11-11 13:48 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Tue, Nov 11, 2008 at 2:37 PM, Peter Rolf <indiego@gmx.net> 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.

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-11 13:48 ` Wolfgang Schuster
@ 2008-11-11 14:03   ` Peter Rolf
  2008-11-11 16:40   ` Peter Rolf
  1 sibling, 0 replies; 15+ messages in thread
From: Peter Rolf @ 2008-11-11 14:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster schrieb:
> On Tue, Nov 11, 2008 at 2:37 PM, Peter Rolf <indiego@gmx.net> 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
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-11 13:48 ` Wolfgang Schuster
  2008-11-11 14:03   ` Peter Rolf
@ 2008-11-11 16:40   ` Peter Rolf
  2008-11-11 16:51     ` Wolfgang Schuster
  1 sibling, 1 reply; 15+ messages in thread
From: Peter Rolf @ 2008-11-11 16:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Wolfgang Schuster schrieb:
> On Tue, Nov 11, 2008 at 2:37 PM, Peter Rolf <indiego@gmx.net> 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
> ___________________________________________________________________________________
> 




___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-11 16:40   ` Peter Rolf
@ 2008-11-11 16:51     ` Wolfgang Schuster
  2008-11-11 18:47       ` Peter Rolf
  0 siblings, 1 reply; 15+ messages in thread
From: Wolfgang Schuster @ 2008-11-11 16:51 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-11 16:51     ` Wolfgang Schuster
@ 2008-11-11 18:47       ` Peter Rolf
  2008-11-12  9:47         ` Taco Hoekwater
  0 siblings, 1 reply; 15+ messages in thread
From: Peter Rolf @ 2008-11-11 18:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
> ___________________________________________________________________________________
> 


___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-11 18:47       ` Peter Rolf
@ 2008-11-12  9:47         ` Taco Hoekwater
  2008-11-12 11:02           ` Peter Rolf
  0 siblings, 1 reply; 15+ messages in thread
From: Taco Hoekwater @ 2008-11-12  9:47 UTC (permalink / raw)
  To: mailing list for ConTeXt users



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
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-12  9:47         ` Taco Hoekwater
@ 2008-11-12 11:02           ` Peter Rolf
  2008-11-12 11:20             ` Hans Hagen
  2008-11-13 15:22             ` Peter Rolf
  0 siblings, 2 replies; 15+ messages in thread
From: Peter Rolf @ 2008-11-12 11:02 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-12 11:02           ` Peter Rolf
@ 2008-11-12 11:20             ` Hans Hagen
  2008-11-12 12:11               ` Peter Rolf
  2008-11-13 15:22             ` Peter Rolf
  1 sibling, 1 reply; 15+ messages in thread
From: Hans Hagen @ 2008-11-12 11:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-12 11:20             ` Hans Hagen
@ 2008-11-12 12:11               ` Peter Rolf
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Rolf @ 2008-11-12 12:11 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-12 11:02           ` Peter Rolf
  2008-11-12 11:20             ` Hans Hagen
@ 2008-11-13 15:22             ` Peter Rolf
  2008-11-13 15:50               ` Wolfgang Schuster
  2008-11-13 21:30               ` Hans Hagen
  1 sibling, 2 replies; 15+ messages in thread
From: Peter Rolf @ 2008-11-13 15:22 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 2008 bytes --]

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
> ___________________________________________________________________________________
> 



[-- Attachment #2: setstrut_mkii.pdf --]
[-- Type: application/x-pdf, Size: 9606 bytes --]

[-- Attachment #3: setstrut_mkiv.pdf --]
[-- Type: application/x-pdf, Size: 11409 bytes --]

[-- Attachment #4: setstrut.tex --]
[-- Type: text/plain, Size: 298 bytes --]

\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


[-- Attachment #5: type-microsoft-tahoma.tex --]
[-- Type: text/plain, Size: 1270 bytes --]

%% 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

[-- Attachment #6: Type: text/plain, Size: 487 bytes --]

___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-13 15:22             ` Peter Rolf
@ 2008-11-13 15:50               ` Wolfgang Schuster
  2008-11-13 16:26                 ` Peter Rolf
  2008-11-13 21:30               ` Hans Hagen
  1 sibling, 1 reply; 15+ messages in thread
From: Wolfgang Schuster @ 2008-11-13 15:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-13 15:50               ` Wolfgang Schuster
@ 2008-11-13 16:26                 ` Peter Rolf
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Rolf @ 2008-11-13 16:26 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-13 15:22             ` Peter Rolf
  2008-11-13 15:50               ` Wolfgang Schuster
@ 2008-11-13 21:30               ` Hans Hagen
  2008-11-14 13:54                 ` Peter Rolf
  1 sibling, 1 reply; 15+ messages in thread
From: Hans Hagen @ 2008-11-13 21:30 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
-----------------------------------------------------------------
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: \definefont problem with latest beta (mkiv)
  2008-11-13 21:30               ` Hans Hagen
@ 2008-11-14 13:54                 ` Peter Rolf
  0 siblings, 0 replies; 15+ messages in thread
From: Peter Rolf @ 2008-11-14 13:54 UTC (permalink / raw)
  To: mailing list for ConTeXt users

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
> ___________________________________________________________________________________
> 

___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2008-11-14 13:54 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-11 13:37 \definefont problem with latest beta (mkiv) Peter Rolf
2008-11-11 13:48 ` Wolfgang Schuster
2008-11-11 14:03   ` Peter Rolf
2008-11-11 16:40   ` Peter Rolf
2008-11-11 16:51     ` Wolfgang Schuster
2008-11-11 18:47       ` Peter Rolf
2008-11-12  9:47         ` Taco Hoekwater
2008-11-12 11:02           ` Peter Rolf
2008-11-12 11:20             ` Hans Hagen
2008-11-12 12:11               ` Peter Rolf
2008-11-13 15:22             ` Peter Rolf
2008-11-13 15:50               ` Wolfgang Schuster
2008-11-13 16:26                 ` Peter Rolf
2008-11-13 21:30               ` Hans Hagen
2008-11-14 13:54                 ` Peter Rolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).