[NTG-context] Kerning feature not working

2023-08-30 Thread Marcus Vinicius Mesquita
Dear List

In the MWE below, the kerning feature works OK for ebgaramonditalic
but not for ebgaramondregular.
How do I fix it?

I'm using ConTeXt version: 2023.08.27 13:48


\startluacode
fonts.handlers.otf.addfeature {
name = "kernit",
type = "kern",
   nocheck = true,
data = {
  [0x27E8] = { ["f"] = 300, ["fi"] = 300, ["fl"] = 300 }
}
}
\stopluacode

\definefontfeature[kernit][mode=node,kernit=yes]

\starttext
\definedfont[name:ebgaramondregular*default,kernit]

⟨f ile

⟨f lame

⟨file

⟨flame

\definedfont[name:ebgaramonditalic*default,kernit]

⟨f ile

⟨f lame

⟨file

⟨flame

\stoptext


--
Todas as coisas fatigam o corpo, salvo a música, que não fatiga nem o
corpo nem seus membros, por ser descanso da alma, primavera do
coração, distração do aflito, entretenimento do solitário, e viático
do viajante.

Kunnâsh al-Hâ'ik (Cancioneiro de al-Hâ'ik)
\startluacode
	fonts.handlers.otf.addfeature {
		name = "kernit",
		type = "kern",
   nocheck = true,
		data = {
 [0x27E8] = { ["f"] = 300, ["fi"] = 300, ["fl"] = 300 }
		}
	}
\stopluacode
\definefontfeature[kernit][mode=node,kernit=yes]

\starttext
\definedfont[name:ebgaramondregular*default,kernit]

⟨f ile

⟨f lame

⟨file

⟨flame

\definedfont[name:ebgaramonditalic*default,kernit]

⟨f ile

⟨f lame

⟨file

⟨flame

\stoptext


MWE.pdf
Description: Adobe PDF document
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : https://contextgarden.net
___

[NTG-context] Kerning/italic correction problem with TeX Gyre Bonum font

2018-03-10 Thread Mikael P. Sundqvist
Hi Hans and others!

I don't know if this is a problem with the font itself or if it is ConTeXt.
In any case, the test file below gives strange output (attached). In
particular the space/kerning after $f$ seems to be off.

Ulrike Fischer reminded me in the StackExchange chat that not so long time
ago there was some similar issue with \mathcal P discussed on this list. Is
it the same problem? (The input $f \tracinglostchars=0 \Uchar"EEEFF$)
indeed makes it look better between the $f$ and the parenthesis.)

/Mikael

%%%
\setupbodyfont[bonum]

\starttext
\startTEXpage[offset=3bp]
(Look at this $f$) and this $f$? (see also $k$?, $x$? and $z$?)

There might be more problems (like between $t$ and the parenthesis in
$e^t$) is too small.

The space between $dx$ and the bar is too small:
\startformula
\Bigl|\int_0^\pi\sin x\,dx\Bigr|,
\stopformula
Look at the $f$ and the bar:
\startformula
\Bigl|\int f\Bigr|
\stopformula
The $x$ seems to be outside the fraction:
\startformula
\frac{a^2}{1-x}
\stopformula
We add another one (in fact two) including $f$:
\startformula
f\Bigl(\frac{a+b}{2}\Bigr)
\stopformula

Also look at $\xi_0$ and $\xi_1$, the subscripts are too far away from
$\xi$. Compare with $f_0$ and $f_1$, $g_0$ and $g_1$.

With $\delta_f$ and $\delta_g$, I think it looks like the space is too big,
in particular between $\delta$ and $f$, but maybe that is a matter of taste.

\stopTEXpage
\stoptext
%%%


bonumbug.pdf
Description: Adobe PDF document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Kerning between primes and left parenthesis (again)

2017-07-31 Thread Mikael P. Sundqvist
On Mon, Jul 31, 2017 at 9:15 PM, Hans Hagen  wrote:
> On 7/31/2017 8:02 PM, Mikael P. Sundqvist wrote:
>>
>> On Mon, Jul 31, 2017 at 5:37 PM, Hans Hagen  wrote:
>>>
>>> On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote:


 On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen  wrote:
>
>
> On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:
>
>> Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist"
>> > >:
>>
>>   Dear Hans,
>>
>>   now, in luatex 1.05, that the primes are "constructed" in new
>> manner,
>>   I wonder if there is a way to specify in a goodie file the
>> kerning
>>   between characters, in particular primes and the left
>> parenthesis?
>>
>>   I tried
>>
>>kernpairs = {
>>   [0x2032] = {[0x0028] = -1000, }, -- prime and (
>>},
>>
>>   but that does not seem to have any effect.
>>
>>   The pre-1.05 modification
>>
>>dimensions = {
>>default = {
>>[0x2044] = { xoffset = 275, width = 600 },
>>[0x2032] = { xoffset = 50, width = 290 }, --
>> prime
>>[0x2033] = { xoffset = 50, width = 690 }, --
>> double
>>   prime
>>[0x2034] = { xoffset = 50, width = 1090}, --
>> triple
>>   prime
>>[0x2057] = { xoffset = 50, width = 1490}, --
>>   quadruple prime
>>},
>>},
>>
>>   (which is a non-optimal way of solving this issue since it has
>> side
>>   effects) does not change anything anymore.
>>
>>   So, is there now a way to do this cleanly now that the mechanism
>> is
>>   changed?
>>
>>   /Mikael
>>
>>
>> Hi,
>>
>> should I interpret the silence that this is currently not possible, or
>> that you, Hans, is completely fed up with this subject? :-)
>
>
>
> you rule out the possibility that i have other things to do
>
> anyway, use
>
>   0xFE932
>
> etc instead as primes get remapped
>
> -
> Hans Hagen | PRAGMA ADE
> Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>  tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
>
>
> ___



 I'm sorry but I cannot get it to work.

 %%% my local lucida-opentype-math.lfg, located in the same directory
 as the tex file (and loaded)
 - kern_250 = { bottomright = { { kern = -250 } }, force = true }

 local function FixRadicalDisplayStyleVerticalGap(value,target,original)
   local o = original.mathparameters.RadicalVerticalGap -- 50
   return 2 * o * target.parameters.factor
 end

 return {
   name = "lucida-opentype-math",
   version = "1.00",
   comment = "Goodies that complement lucida opentype.",
   author = "Hans Hagen",
   copyright = "ConTeXt development team",
   mathematics = {
   parameters = {
   RadicalDisplayStyleVerticalGap =
 FixRadicalDisplayStyleVerticalGap,
   },
   kernpairs = {
  [0x1D44E] = {[0x1D44F] = 1000,}, -- 푎푏 demo
  [0xFE932] = {[0x0028] = 1000,} -- remapped prime and (
   },
 }
 }
 %%%

 %%% the tex file
 \setupbodyfont[lucidaot]
 \setupmathematics[kernpairs=yes]

 \starttext
 $f'(x)ab$
 \stoptext
 %%%

 The result is attached. It works ok for the pair ab, but not for prime
 and (. Is the ( also remapped (while greping for it in the source, I
 could not find any clue).

 Maybe it is better to ping the maintainers of the font?
>>>
>>>
>>> just change the dimensions
>>>
>>>  dimensions = {
>>>  default = { -- experimental values
>>>  [0x2044] = { xoffset = 275, width = 600 },
>>>  

Re: [NTG-context] Kerning between primes and left parenthesis (again)

2017-07-31 Thread Hans Hagen

On 7/31/2017 8:02 PM, Mikael P. Sundqvist wrote:

On Mon, Jul 31, 2017 at 5:37 PM, Hans Hagen  wrote:

On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote:


On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen  wrote:


On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:


Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" >:

  Dear Hans,

  now, in luatex 1.05, that the primes are "constructed" in new
manner,
  I wonder if there is a way to specify in a goodie file the kerning
  between characters, in particular primes and the left parenthesis?

  I tried

   kernpairs = {
  [0x2032] = {[0x0028] = -1000, }, -- prime and (
   },

  but that does not seem to have any effect.

  The pre-1.05 modification

   dimensions = {
   default = {
   [0x2044] = { xoffset = 275, width = 600 },
   [0x2032] = { xoffset = 50, width = 290 }, -- prime
   [0x2033] = { xoffset = 50, width = 690 }, --
double
  prime
   [0x2034] = { xoffset = 50, width = 1090}, --
triple
  prime
   [0x2057] = { xoffset = 50, width = 1490}, --
  quadruple prime
   },
   },

  (which is a non-optimal way of solving this issue since it has side
  effects) does not change anything anymore.

  So, is there now a way to do this cleanly now that the mechanism is
  changed?

  /Mikael


Hi,

should I interpret the silence that this is currently not possible, or
that you, Hans, is completely fed up with this subject? :-)



you rule out the possibility that i have other things to do

anyway, use

  0xFE932

etc instead as primes get remapped

-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
 tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net

___



I'm sorry but I cannot get it to work.

%%% my local lucida-opentype-math.lfg, located in the same directory
as the tex file (and loaded)
- kern_250 = { bottomright = { { kern = -250 } }, force = true }

local function FixRadicalDisplayStyleVerticalGap(value,target,original)
  local o = original.mathparameters.RadicalVerticalGap -- 50
  return 2 * o * target.parameters.factor
end

return {
  name = "lucida-opentype-math",
  version = "1.00",
  comment = "Goodies that complement lucida opentype.",
  author = "Hans Hagen",
  copyright = "ConTeXt development team",
  mathematics = {
  parameters = {
  RadicalDisplayStyleVerticalGap =
FixRadicalDisplayStyleVerticalGap,
  },
  kernpairs = {
 [0x1D44E] = {[0x1D44F] = 1000,}, -- 푎푏 demo
 [0xFE932] = {[0x0028] = 1000,} -- remapped prime and (
  },
}
}
%%%

%%% the tex file
\setupbodyfont[lucidaot]
\setupmathematics[kernpairs=yes]

\starttext
$f'(x)ab$
\stoptext
%%%

The result is attached. It works ok for the pair ab, but not for prime
and (. Is the ( also remapped (while greping for it in the source, I
could not find any clue).

Maybe it is better to ping the maintainers of the font?


just change the dimensions

 dimensions = {
 default = { -- experimental values
 [0x2044] = { xoffset = 275, width = 600 },
  -- [0x2032] = { yoffset = -10 },
[0xFE932] = { width = 200 },
[0xFE933] = { width = 500 },
[0xFE934] = { width = 800 },
 },
 },



-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net

Re: [NTG-context] Kerning between primes and left parenthesis (again)

2017-07-31 Thread Mikael P. Sundqvist
On Mon, Jul 31, 2017 at 5:37 PM, Hans Hagen  wrote:
> On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote:
>>
>> On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen  wrote:
>>>
>>> On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:
>>>
 Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" >:

  Dear Hans,

  now, in luatex 1.05, that the primes are "constructed" in new
 manner,
  I wonder if there is a way to specify in a goodie file the kerning
  between characters, in particular primes and the left parenthesis?

  I tried

   kernpairs = {
  [0x2032] = {[0x0028] = -1000, }, -- prime and (
   },

  but that does not seem to have any effect.

  The pre-1.05 modification

   dimensions = {
   default = {
   [0x2044] = { xoffset = 275, width = 600 },
   [0x2032] = { xoffset = 50, width = 290 }, -- prime
   [0x2033] = { xoffset = 50, width = 690 }, --
 double
  prime
   [0x2034] = { xoffset = 50, width = 1090}, --
 triple
  prime
   [0x2057] = { xoffset = 50, width = 1490}, --
  quadruple prime
   },
   },

  (which is a non-optimal way of solving this issue since it has side
  effects) does not change anything anymore.

  So, is there now a way to do this cleanly now that the mechanism is
  changed?

  /Mikael


 Hi,

 should I interpret the silence that this is currently not possible, or
 that you, Hans, is completely fed up with this subject? :-)
>>>
>>>
>>> you rule out the possibility that i have other things to do
>>>
>>> anyway, use
>>>
>>>  0xFE932
>>>
>>> etc instead as primes get remapped
>>>
>>> -
>>>Hans Hagen | PRAGMA ADE
>>>Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>>> tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
>>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>>> wiki : http://contextgarden.net
>>>
>>> ___
>>
>>
>> I'm sorry but I cannot get it to work.
>>
>> %%% my local lucida-opentype-math.lfg, located in the same directory
>> as the tex file (and loaded)
>> - kern_250 = { bottomright = { { kern = -250 } }, force = true }
>>
>> local function FixRadicalDisplayStyleVerticalGap(value,target,original)
>>  local o = original.mathparameters.RadicalVerticalGap -- 50
>>  return 2 * o * target.parameters.factor
>> end
>>
>> return {
>>  name = "lucida-opentype-math",
>>  version = "1.00",
>>  comment = "Goodies that complement lucida opentype.",
>>  author = "Hans Hagen",
>>  copyright = "ConTeXt development team",
>>  mathematics = {
>>  parameters = {
>>  RadicalDisplayStyleVerticalGap =
>> FixRadicalDisplayStyleVerticalGap,
>>  },
>>  kernpairs = {
>> [0x1D44E] = {[0x1D44F] = 1000,}, -- 푎푏 demo
>> [0xFE932] = {[0x0028] = 1000,} -- remapped prime and (
>>  },
>> }
>> }
>> %%%
>>
>> %%% the tex file
>> \setupbodyfont[lucidaot]
>> \setupmathematics[kernpairs=yes]
>>
>> \starttext
>> $f'(x)ab$
>> \stoptext
>> %%%
>>
>> The result is attached. It works ok for the pair ab, but not for prime
>> and (. Is the ( also remapped (while greping for it in the source, I
>> could not find any clue).
>>
>> Maybe it is better to ping the maintainers of the font?
>
> just change the dimensions
>
> dimensions = {
> default = { -- experimental values
> [0x2044] = { xoffset = 275, width = 600 },
>  -- [0x2032] = { yoffset = -10 },
> [0xFE932] = { width = 200 },
> [0xFE933] = { width = 500 },
> [0xFE934] = { width = 800 },
> },
> },
>
>
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
> -
> 

Re: [NTG-context] Kerning between primes and left parenthesis (again)

2017-07-31 Thread Hans Hagen

On 7/31/2017 11:21 AM, Mikael P. Sundqvist wrote:

On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen  wrote:

On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:


Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" >:

 Dear Hans,

 now, in luatex 1.05, that the primes are "constructed" in new manner,
 I wonder if there is a way to specify in a goodie file the kerning
 between characters, in particular primes and the left parenthesis?

 I tried

  kernpairs = {
 [0x2032] = {[0x0028] = -1000, }, -- prime and (
  },

 but that does not seem to have any effect.

 The pre-1.05 modification

  dimensions = {
  default = {
  [0x2044] = { xoffset = 275, width = 600 },
  [0x2032] = { xoffset = 50, width = 290 }, -- prime
  [0x2033] = { xoffset = 50, width = 690 }, -- double
 prime
  [0x2034] = { xoffset = 50, width = 1090}, -- triple
 prime
  [0x2057] = { xoffset = 50, width = 1490}, --
 quadruple prime
  },
  },

 (which is a non-optimal way of solving this issue since it has side
 effects) does not change anything anymore.

 So, is there now a way to do this cleanly now that the mechanism is
 changed?

 /Mikael


Hi,

should I interpret the silence that this is currently not possible, or
that you, Hans, is completely fed up with this subject? :-)


you rule out the possibility that i have other things to do

anyway, use

 0xFE932

etc instead as primes get remapped

-
   Hans Hagen | PRAGMA ADE
   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___


I'm sorry but I cannot get it to work.

%%% my local lucida-opentype-math.lfg, located in the same directory
as the tex file (and loaded)
- kern_250 = { bottomright = { { kern = -250 } }, force = true }

local function FixRadicalDisplayStyleVerticalGap(value,target,original)
 local o = original.mathparameters.RadicalVerticalGap -- 50
 return 2 * o * target.parameters.factor
end

return {
 name = "lucida-opentype-math",
 version = "1.00",
 comment = "Goodies that complement lucida opentype.",
 author = "Hans Hagen",
 copyright = "ConTeXt development team",
 mathematics = {
 parameters = {
 RadicalDisplayStyleVerticalGap = FixRadicalDisplayStyleVerticalGap,
 },
 kernpairs = {
[0x1D44E] = {[0x1D44F] = 1000,}, -- 푎푏 demo
[0xFE932] = {[0x0028] = 1000,} -- remapped prime and (
 },
}
}
%%%

%%% the tex file
\setupbodyfont[lucidaot]
\setupmathematics[kernpairs=yes]

\starttext
$f'(x)ab$
\stoptext
%%%

The result is attached. It works ok for the pair ab, but not for prime
and (. Is the ( also remapped (while greping for it in the source, I
could not find any clue).

Maybe it is better to ping the maintainers of the font?

just change the dimensions

dimensions = {
default = { -- experimental values
[0x2044] = { xoffset = 275, width = 600 },
 -- [0x2032] = { yoffset = -10 },
[0xFE932] = { width = 200 },
[0xFE933] = { width = 500 },
[0xFE934] = { width = 800 },
},
},


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Kerning between primes and left parenthesis (again)

2017-07-31 Thread Mikael P. Sundqvist
On Thu, Jul 20, 2017 at 2:53 PM, Hans Hagen  wrote:
> On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:
>
>> Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" > >:
>>
>> Dear Hans,
>>
>> now, in luatex 1.05, that the primes are "constructed" in new manner,
>> I wonder if there is a way to specify in a goodie file the kerning
>> between characters, in particular primes and the left parenthesis?
>>
>> I tried
>>
>>  kernpairs = {
>> [0x2032] = {[0x0028] = -1000, }, -- prime and (
>>  },
>>
>> but that does not seem to have any effect.
>>
>> The pre-1.05 modification
>>
>>  dimensions = {
>>  default = {
>>  [0x2044] = { xoffset = 275, width = 600 },
>>  [0x2032] = { xoffset = 50, width = 290 }, -- prime
>>  [0x2033] = { xoffset = 50, width = 690 }, -- double
>> prime
>>  [0x2034] = { xoffset = 50, width = 1090}, -- triple
>> prime
>>  [0x2057] = { xoffset = 50, width = 1490}, --
>> quadruple prime
>>  },
>>  },
>>
>> (which is a non-optimal way of solving this issue since it has side
>> effects) does not change anything anymore.
>>
>> So, is there now a way to do this cleanly now that the mechanism is
>> changed?
>>
>> /Mikael
>>
>>
>> Hi,
>>
>> should I interpret the silence that this is currently not possible, or
>> that you, Hans, is completely fed up with this subject? :-)
>
> you rule out the possibility that i have other things to do
>
> anyway, use
>
> 0xFE932
>
> etc instead as primes get remapped
>
> -
>   Hans Hagen | PRAGMA ADE
>   Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
>tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
> archive  : https://bitbucket.org/phg/context-mirror/commits/
> wiki : http://contextgarden.net
> ___

I'm sorry but I cannot get it to work.

%%% my local lucida-opentype-math.lfg, located in the same directory
as the tex file (and loaded)
- kern_250 = { bottomright = { { kern = -250 } }, force = true }

local function FixRadicalDisplayStyleVerticalGap(value,target,original)
local o = original.mathparameters.RadicalVerticalGap -- 50
return 2 * o * target.parameters.factor
end

return {
name = "lucida-opentype-math",
version = "1.00",
comment = "Goodies that complement lucida opentype.",
author = "Hans Hagen",
copyright = "ConTeXt development team",
mathematics = {
parameters = {
RadicalDisplayStyleVerticalGap = FixRadicalDisplayStyleVerticalGap,
},
kernpairs = {
   [0x1D44E] = {[0x1D44F] = 1000,}, -- 푎푏 demo
   [0xFE932] = {[0x0028] = 1000,} -- remapped prime and (
},
}
}
%%%

%%% the tex file
\setupbodyfont[lucidaot]
\setupmathematics[kernpairs=yes]

\starttext
$f'(x)ab$
\stoptext
%%%

The result is attached. It works ok for the pair ab, but not for prime
and (. Is the ( also remapped (while greping for it in the source, I
could not find any clue).

Maybe it is better to ping the maintainers of the font?

/Mikael


ctx-listexample36.pdf
Description: Adobe PDF document
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Kerning between primes and left parenthesis (again)

2017-07-20 Thread Hans Hagen

On 7/20/2017 7:18 AM, Mikael P. Sundqvist wrote:
Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" >:


Dear Hans,

now, in luatex 1.05, that the primes are "constructed" in new manner,
I wonder if there is a way to specify in a goodie file the kerning
between characters, in particular primes and the left parenthesis?

I tried

 kernpairs = {
[0x2032] = {[0x0028] = -1000, }, -- prime and (
 },

but that does not seem to have any effect.

The pre-1.05 modification

 dimensions = {
 default = {
 [0x2044] = { xoffset = 275, width = 600 },
 [0x2032] = { xoffset = 50, width = 290 }, -- prime
 [0x2033] = { xoffset = 50, width = 690 }, -- double
prime
 [0x2034] = { xoffset = 50, width = 1090}, -- triple
prime
 [0x2057] = { xoffset = 50, width = 1490}, --
quadruple prime
 },
 },

(which is a non-optimal way of solving this issue since it has side
effects) does not change anything anymore.

So, is there now a way to do this cleanly now that the mechanism is
changed?

/Mikael


Hi,

should I interpret the silence that this is currently not possible, or 
that you, Hans, is completely fed up with this subject? :-)

you rule out the possibility that i have other things to do

anyway, use

0xFE932

etc instead as primes get remapped

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | 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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] Kerning between primes and left parenthesis (again)

2017-07-19 Thread Mikael P. Sundqvist
Den 12 juli 2017 10:17 fm skrev "Mikael P. Sundqvist" :

Dear Hans,

now, in luatex 1.05, that the primes are "constructed" in new manner,
I wonder if there is a way to specify in a goodie file the kerning
between characters, in particular primes and the left parenthesis?

I tried

kernpairs = {
   [0x2032] = {[0x0028] = -1000, }, -- prime and (
},

but that does not seem to have any effect.

The pre-1.05 modification

dimensions = {
default = {
[0x2044] = { xoffset = 275, width = 600 },
[0x2032] = { xoffset = 50, width = 290 }, -- prime
[0x2033] = { xoffset = 50, width = 690 }, -- double prime
[0x2034] = { xoffset = 50, width = 1090}, -- triple prime
[0x2057] = { xoffset = 50, width = 1490}, -- quadruple prime
},
},

(which is a non-optimal way of solving this issue since it has side
effects) does not change anything anymore.

So, is there now a way to do this cleanly now that the mechanism is changed?

/Mikael


Hi,

should I interpret the silence that this is currently not possible, or that
you, Hans, is completely fed up with this subject? :-)

/Mikael
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

[NTG-context] Kerning between primes and left parenthesis (again)

2017-07-12 Thread Mikael P. Sundqvist
Dear Hans,

now, in luatex 1.05, that the primes are "constructed" in new manner,
I wonder if there is a way to specify in a goodie file the kerning
between characters, in particular primes and the left parenthesis?

I tried

kernpairs = {
   [0x2032] = {[0x0028] = -1000, }, -- prime and (
},

but that does not seem to have any effect.

The pre-1.05 modification

dimensions = {
default = {
[0x2044] = { xoffset = 275, width = 600 },
[0x2032] = { xoffset = 50, width = 290 }, -- prime
[0x2033] = { xoffset = 50, width = 690 }, -- double prime
[0x2034] = { xoffset = 50, width = 1090}, -- triple prime
[0x2057] = { xoffset = 50, width = 1490}, -- quadruple prime
},
},

(which is a non-optimal way of solving this issue since it has side
effects) does not change anything anymore.

So, is there now a way to do this cleanly now that the mechanism is changed?

/Mikael
___
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://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki : http://contextgarden.net
___

Re: [NTG-context] kerning with \quotation

2016-03-06 Thread Schmitz Thomas A.

> On 06 Mar 2016, at 15:56, Hans Hagen  wrote:
> 
> \setupdelimitedtext
>  [method=font]

Excellent - thanks Hans!

Thomas
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] kerning with \quotation

2016-03-06 Thread Hans Hagen

On 3/6/2016 2:19 PM, Schmitz Thomas A. wrote:

Hi all,

short example in extra big size to make the effect visible:

\setupbodyfont [termes,48pt]

\mainlanguage [de]

\starttext

„Vater“

\quotation{Vater}

\stoptext

In the first line, the character „ has a bit of kerning with the following V 
(could be even more, to my taste). With \quotation, the gap between them is 
very large. Could the kerning be applied in this case too? Or is it better to 
use the raw „? (After I have taught emacs to auto-insert \quotation{ and } when 
I type a quotation mark…)


\setupdelimitedtext
  [method=font]



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] kerning with \quotation

2016-03-06 Thread Schmitz Thomas A.
Hi all,

short example in extra big size to make the effect visible:

\setupbodyfont [termes,48pt]

\mainlanguage [de]

\starttext

„Vater“

\quotation{Vater}

\stoptext

In the first line, the character „ has a bit of kerning with the following V 
(could be even more, to my taste). With \quotation, the gap between them is 
very large. Could the kerning be applied in this case too? Or is it better to 
use the raw „? (After I have taught emacs to auto-insert \quotation{ and } when 
I type a quotation mark…)

Thomas

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Kerning and ligatures in math roman font

2015-11-09 Thread Ulrike Fischer
Am Mon, 9 Nov 2015 14:22:45 +0100 schrieb Hans Hagen:

>> Yes, one workaround is to quit math mode. The other to use fonts in
>> mode "base". But I would like to understand why workarounds are
>> needed at all.
 
> because opentype math fonts are just math fonts (simple for text, rich 
> for math)

But there is no math font involved. This latex example

\documentclass{article}
\usepackage{fontspec}
\begin{document}
VA $\mathrm{VA}$
\end{document}

uses exactly one font:



But outside math it is kerned, inside not. 

And this plain tex example doesn't use math fonts either. 

\input luaotfload.sty

\font\Urm=Arial:mode=node;script=latn;language=DFLT;+tlig;+trep;
\textfont0\Urm
\Urm VA $\fam0 VA$ %no kerning in math

\font\Urmbase=Arial:mode=base;script=latn;language=DFLT;+tlig;+trep;
\textfont0\Urmbase
\Urm VA $\fam0 VA$ %kerning in math
\bye

(I used Arial so that one can see clearly that a text font is used)

-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Kerning and ligatures in math roman font

2015-11-09 Thread Ulrike Fischer
Am Mon, 9 Nov 2015 13:13:12 +0100 schrieb Hans Hagen:

>> In this example there is no kerning and no ligatures in the math:
>>
>> \starttext
>>   WAiff $\mfunction{WAiff}$
>> \stoptext
>>
>> This is a different behaviour than with legacy math fonts.
> 
> depends what legacy is ...

I meant the fonts you would get with plaintex or pdflatex.

>> A question about this has been asked some month ago on tex.sx
>> (http://tex.stackexchange.com/questions/252493/ligatures-are-not-used-in-opentype-maths-families).
>> The problem (or feature) exist also with xetex.
>>
>> With luatex one can avoid to loose the kerning by loading as math
>> roman font a font in mode base
>> (http://tex.stackexchange.com/questions/277362/lualatex-no-kerning-within-operatorname-when-not-loading-lmodern-package/277395#277395,
>> I have no idea how to do this in context).
>>
>> Is this a luatex/xetex bug? Or a feature? How could one enable
>> kerning and/or ligatures without going back to base mode?
 
> most math fonts don't have ligatures etc ... in fact, as ligatures are a 
> language/script related feature and math is the script it makes not much 
> sense either

But the plaintex and latex examples on tex.SX don't use a math font
for operatornames like \sin or for \mathrm (which seems to be
\mfunction in context). It is a text font and it has ligatures and
kerning informations, but they are not used in math. 

Doesn't use context for \mfunction a text font too? I thought so
because it has kerning when used outside math:

\starttext
\mfunction{WAiff}

$\mfunction{WAiff}$
\stoptext

Also bad kerning in operator names is a nuisance. I don't think that
the default result of
\definemathcommand[VA][nolop]{\mfunction{VA}} is good looking. 



> in context you can do:
> 
> \setupmathematics
>[functionstyle=normal]
> 
> which will use a box which then will trigger text fonts

Yes, one workaround is to quit math mode. The other to use fonts in
mode "base". But I would like to understand why workarounds are
needed at all. 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Kerning and ligatures in math roman font

2015-11-09 Thread Hans Hagen

On 11/9/2015 2:06 PM, Ulrike Fischer wrote:


Yes, one workaround is to quit math mode. The other to use fonts in
mode "base". But I would like to understand why workarounds are
needed at all.


because opentype math fonts are just math fonts (simple for text, rich 
for math)


Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Kerning and ligatures in math roman font

2015-11-09 Thread Hans Hagen

On 11/9/2015 2:59 PM, Ulrike Fischer wrote:

Am Mon, 9 Nov 2015 14:22:45 +0100 schrieb Hans Hagen:


Yes, one workaround is to quit math mode. The other to use fonts in
mode "base". But I would like to understand why workarounds are
needed at all.



because opentype math fonts are just math fonts (simple for text, rich
for math)


But there is no math font involved. This latex example

\documentclass{article}
\usepackage{fontspec}
\begin{document}
VA $\mathrm{VA}$
\end{document}

uses exactly one font:



But outside math it is kerned, inside not.

And this plain tex example doesn't use math fonts either.

\input luaotfload.sty

\font\Urm=Arial:mode=node;script=latn;language=DFLT;+tlig;+trep;
\textfont0\Urm
\Urm VA $\fam0 VA$ %no kerning in math

\font\Urmbase=Arial:mode=base;script=latn;language=DFLT;+tlig;+trep;
\textfont0\Urmbase
\Urm VA $\fam0 VA$ %kerning in math
\bye

(I used Arial so that one can see clearly that a text font is used)


you don't enable kerning but anyhow, here is a context example:

\usemodule[oldotf]

\starttext

\showfontkerns

\font\Urm=arial:mode=node;+tlig;+trep;+kern;
\font\Urm=lmroman10-regular:mode=base;+kern;
\textfont0\Urm
\Urm VA $\fam0 VA$

\stoptext

basemode should work (no node mode in math but features are normal 
simple ... keep in mind that node lists in math are quite different)


Hans



--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Kerning and ligatures in math roman font

2015-11-09 Thread Ulrike Fischer
Am Mon, 9 Nov 2015 16:44:34 +0100 schrieb Hans Hagen:

> you don't enable kerning but anyhow, 

In text mode kerning seems to be activated by default, but it
doesn't change the output if I add it.

> here is a context example:

Curious, here I get no kerning at all for arial. I tried all sort of
variants but the distance between V and A is wider then with
plaintex and \showfontkerns give no output. 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Kerning and ligatures in math roman font

2015-11-09 Thread Ulrike Fischer
In this example there is no kerning and no ligatures in the math:

\starttext
 WAiff $\mfunction{WAiff}$
\stoptext

This is a different behaviour than with legacy math fonts. 

A question about this has been asked some month ago on tex.sx
(http://tex.stackexchange.com/questions/252493/ligatures-are-not-used-in-opentype-maths-families).
The problem (or feature) exist also with xetex. 

With luatex one can avoid to loose the kerning by loading as math
roman font a font in mode base
(http://tex.stackexchange.com/questions/277362/lualatex-no-kerning-within-operatorname-when-not-loading-lmodern-package/277395#277395,
I have no idea how to do this in context).

Is this a luatex/xetex bug? Or a feature? How could one enable
kerning and/or ligatures without going back to base mode? 


-- 
Ulrike Fischer 
http://www.troubleshooting-tex.de/

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Kerning and ligatures in math roman font

2015-11-09 Thread Hans Hagen

On 11/9/2015 12:39 PM, Ulrike Fischer wrote:

In this example there is no kerning and no ligatures in the math:

\starttext
  WAiff $\mfunction{WAiff}$
\stoptext

This is a different behaviour than with legacy math fonts.


depends what legacy is ...


A question about this has been asked some month ago on tex.sx
(http://tex.stackexchange.com/questions/252493/ligatures-are-not-used-in-opentype-maths-families).
The problem (or feature) exist also with xetex.

With luatex one can avoid to loose the kerning by loading as math
roman font a font in mode base
(http://tex.stackexchange.com/questions/277362/lualatex-no-kerning-within-operatorname-when-not-loading-lmodern-package/277395#277395,
I have no idea how to do this in context).

Is this a luatex/xetex bug? Or a feature? How could one enable
kerning and/or ligatures without going back to base mode?


most math fonts don't have ligatures etc ... in fact, as ligatures are a 
language/script related feature and math is the script it makes not much 
sense either


in context you can do:

\setupmathematics
  [functionstyle=normal]

which will use a box which then will trigger text fonts

Hans

--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] kerning with buggy libertine

2013-08-07 Thread Philipp Gesang
···date: 2013-08-05, Monday···from: Hans Hagen···

 On 8/4/2013 3:43 PM, Philipp Gesang wrote:
 Hi Hans,
 
 this is a bug report thanks to Khaled:
 
http://tex.stackexchange.com/a/126650/14066
 
 In short: the font loader applies the kerning of libertine
 version 5.3.0 even though this appears to be broken in the font.
 Context translation of the example:
 
\definefontfeature [kerning] [mode=node,smcp=yes,kern=yes]
\definefont [libertineserifsmallcaps] [file:LinLibertine_R.otf*kerning]
\definefont [libertinesanssmallcaps]  [file:LinBiolinum_R.otf*kerning]
 
\def\demotext{Vacillate Vaccine Vapour Vanish Va...}
 
\starttext
  {\libertineserifsmallcaps \demotext}\par
  {\libertinesanssmallcaps  \demotext}\par
\stoptext
 
 (Doesn’t occur in base mode.) The technical details are in the
 thread Khaled references.
 
 \showotfcomposition{file:LinLibertine_R.otf*kerning}{+1}{Va} \page
 \showotfcomposition{file:LinBiolinum_R.otf*kerning} {+1}{Va} \page
 
 You need to be more explicit (which font, where to download the
 problematic one, etc ... i downloaded the 5.3 version - i think - of
 ll). In what sense is it broken in the font?

It’s that version (5.3.0). To quote Jonathan Kew [1]:

The problem arises because the first subtable includes the
V (and T) glyphs in its coverage (as first glyph of the
pair), but then the a.sc and hyphen.sc glyphs are not
included in the ClassDef2 table, so they map to class 0, for
which the kerning is zero. [...]

The description of ClassDefFormat2 says that Any glyph not
covered by a ClassRangeRecord is assumed to belong to Class
0. If that is the case, then I think this is a font bug: any
first-glyph mentioned in a PairPosFormat2 subtable's coverage
when ClassDef2 uses format 2 will, in effect, shadow all
subsequent subtables, so the same first-glyph cannot be used
again.

And the follow up [2]:

FWIW, testing LinLibertine in IE10 on Win8, I see the same
behavior as in Firefox (using harfbuzz): the V, a.sc and
T, hyphen.sc pairs are NOT kerned.

So I believe this supports the interpretation that this is a
font bug, and we should -not- special-case Class0 as per the
experimental harfbuzz patch.

(In principle, a font could have real kerning values
specified for classN, class0, although it's most likely
that class0 will always be used for the default do-nothing
case.)


Best,
Philipp

[1] http://lists.freedesktop.org/archives/harfbuzz/2013-August/003469.html
[2] http://lists.freedesktop.org/archives/harfbuzz/2013-August/003470.html


pgpskZBCaZqPl.pgp
Description: PGP signature
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] kerning with buggy libertine

2013-08-07 Thread Hans Hagen

On 8/7/2013 10:08 AM, Philipp Gesang wrote:


It’s that version (5.3.0). To quote Jonathan Kew [1]:
And the follow up [2]:


it all makes me wonder if otf is that clear and clean and good ... font 
designers nowadays need to be programmers and close-readers-of-specs too 
(esp because it seem to take years to uncover such aspects)


anyhow, new beta ... plus some extra messages (the first concern fixing 
a luatex table ... not related to the issue but nicer anyway)


fontsotf loading  fixing kernclass table of lookup 
'pp_l_3_k_0'
fontsotf loading  fixing kernclass table of lookup 
'pp_l_3_k_1'
fontsotf loading  fixing kernclass table of lookup 
'pp_l_3_k_2'
fontsotf loading  fixing kernclass table of lookup 
'pp_l_3_k_3'


fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of A (U+00041)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of À (U+000C0)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of Á (U+000C1)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of  (U+000C2)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of à (U+000C3)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of Ä (U+000C4)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of Å (U+000C5)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of Ă (U+00102)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of V (U+00056)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of W (U+00057)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of Y (U+00059)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of Ÿ (U+00178)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of P (U+00050)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of K (U+0004B)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of X (U+00058)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of T (U+00054)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of Ţ (U+00162)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of Ť (U+00164)
fontsotf loading  lookup 'pp_l_3_k_3': ignoring further 
kerns of Ț (U+0021A)


the message is a signal for users not to complain too loudly if some 
expected kern doesn't show up


(i didn't test side effects so we might now run into other cases)

Hans

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] kerning with buggy libertine

2013-08-07 Thread Philipp Gesang
···date: 2013-08-07, Wednesday···from: Hans Hagen···

 On 8/7/2013 10:08 AM, Philipp Gesang wrote:
 
 It’s that version (5.3.0). To quote Jonathan Kew [1]:
 And the follow up [2]:
 
 it all makes me wonder if otf is that clear and clean and good ...
 font designers nowadays need to be programmers and
 close-readers-of-specs too (esp because it seem to take years to
 uncover such aspects)
 
 anyhow, new beta ... plus some extra messages (the first concern
 fixing a luatex table ... not related to the issue but nicer anyway)

Thanks, Libertine is now as broken as it should be ;-)

 fontsotf loading  fixing kernclass table of lookup
 'pp_l_3_k_0'
 fontsotf loading  fixing kernclass table of lookup
 'pp_l_3_k_1'
 fontsotf loading  fixing kernclass table of lookup
 'pp_l_3_k_2'
 fontsotf loading  fixing kernclass table of lookup
 'pp_l_3_k_3'
 
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of A (U+00041)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of À (U+000C0)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of Á (U+000C1)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of  (U+000C2)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of à (U+000C3)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of Ä (U+000C4)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of Å (U+000C5)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of Ă (U+00102)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of V (U+00056)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of W (U+00057)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of Y (U+00059)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of Ÿ (U+00178)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of P (U+00050)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of K (U+0004B)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of X (U+00058)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of T (U+00054)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of Ţ (U+00162)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of Ť (U+00164)
 fontsotf loading  lookup 'pp_l_3_k_3': ignoring
 further kerns of Ț (U+0021A)
 
 the message is a signal for users not to complain too loudly if some
 expected kern doesn't show up

As most of those go away once the font is cached it is not a big
deal anyways.

Best,
Philipp




pgpa8xdCjR0Mw.pgp
Description: PGP signature
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] kerning with buggy libertine

2013-08-05 Thread Hans Hagen

On 8/4/2013 3:43 PM, Philipp Gesang wrote:

Hi Hans,

this is a bug report thanks to Khaled:

   http://tex.stackexchange.com/a/126650/14066

In short: the font loader applies the kerning of libertine
version 5.3.0 even though this appears to be broken in the font.
Context translation of the example:

   \definefontfeature [kerning] [mode=node,smcp=yes,kern=yes]
   \definefont [libertineserifsmallcaps] [file:LinLibertine_R.otf*kerning]
   \definefont [libertinesanssmallcaps]  [file:LinBiolinum_R.otf*kerning]

   \def\demotext{Vacillate Vaccine Vapour Vanish Va...}

   \starttext
 {\libertineserifsmallcaps \demotext}\par
 {\libertinesanssmallcaps  \demotext}\par
   \stoptext

(Doesn’t occur in base mode.) The technical details are in the
thread Khaled references.


\showotfcomposition{file:LinLibertine_R.otf*kerning}{+1}{Va} \page
\showotfcomposition{file:LinBiolinum_R.otf*kerning} {+1}{Va} \page

You need to be more explicit (which font, where to download the 
problematic one, etc ... i downloaded the 5.3 version - i think - of 
ll). In what sense is it broken in the font?


Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] kerning with buggy libertine

2013-08-04 Thread Philipp Gesang
Hi Hans,

this is a bug report thanks to Khaled:

  http://tex.stackexchange.com/a/126650/14066

In short: the font loader applies the kerning of libertine
version 5.3.0 even though this appears to be broken in the font.
Context translation of the example:

  \definefontfeature [kerning] [mode=node,smcp=yes,kern=yes]
  \definefont [libertineserifsmallcaps] [file:LinLibertine_R.otf*kerning]
  \definefont [libertinesanssmallcaps]  [file:LinBiolinum_R.otf*kerning]

  \def\demotext{Vacillate Vaccine Vapour Vanish Va...}

  \starttext
{\libertineserifsmallcaps \demotext}\par
{\libertinesanssmallcaps  \demotext}\par
  \stoptext

(Doesn’t occur in base mode.) The technical details are in the
thread Khaled references.

Best regards,
Philipp


-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


pgpy5SiJrrAe1.pgp
Description: PGP signature
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] kerning info (mkiv)

2011-01-07 Thread Peter Rolf
Hi,

for a text background graphic I need the character box sizes of a given
string. I managed to collect the needed info (width, height, depth,
kerns), but there is still some flaw in the kerning part.

For example:

VATo is printed out (in the shell) as

V   12  11  0
*kerning-85721.088
A   10  11  0
*kerning-64487.424
T   10  11  0
*kerning-64487.424
o   7   7   0

The character stands in the first column, followed by width, height and
depth (in pixel). The *kerning line shows the kerning value (in sp) of
the neighbouring character pair. No problem here.

But A much longer Test graphic VATo

A   12  11  0
5   0   0
m   13  7   0
*kerning-21233.664
u   8   7   0
c   7   7   0
*kerning-21233.664
h   8   11  0
5   0   0
l   4   11  0
o   7   7   0
n   9   7   0
g   8   7   3
e   7   7   0
r   6   7   0
5   0   0
T   11  11  0
e   7   7   0
s   6   7   0
t   6   10  0
5   0   0
g   8   7   3
r   6   7   0
a   8   7   0
p   9   7   3
h   8   11  0
i   4   10  0
c   7   7   0
5   0   0
V   12  11  0
A   12  11  0
T   11  11  0
o   7   7   0

sees no kerning for VATo (although the text is printed with the
correct kerning).

What am I missing? Example code is attached.

Peter

-- http://lua-users.org/wiki/SimpleRound
local function round(num, idp)
local mult = 10^(idp or 0)
return math.floor(num * mult + 0.5) / mult
end

local function topixel(n)
local dimenfactor = 1/49336
return n*dimenfactor
end


function foo_box(text)
local s = text

local tfmdata = fonts.ids[font.current()]
if tfmdata then
local characters = tfmdata.characters

local char = { }
local lastchar
local u,width,height,depth,kerns

for i= 1,string.len(s) do
u = utf.byte(string.sub(s,i,i))
if not char[u] then
width = characters[u].width or 0
height = characters[u].height or 0
depth = characters[u].depth or 0
if lastchar then kerns = characters[lastchar].kerns
if kerns then
kern= kerns[u] or 0
if not(kern==0) then print(*kerning,kern) end
end
else kern = 0
end

char[u] = {
w = round(topixel((width+kern))),
h = round(topixel(height)),
d = round(topixel(depth)) }
end
lastchar = u
print(string.sub(s,i,i),char[u].w,char[u].h,char[u].d)
end

end
end

\registerctxluafile{box}{0.1}

\starttext

\ctxlua{foo_box(A much longer Test graphic VATo)}

\ctxlua{foo_box(VATo)}
\stoptext
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] kerning info (mkiv)

2011-01-07 Thread Taco Hoekwater

On 01/07/2011 02:48 PM, Peter Rolf wrote:

The character stands in the first column, followed by width, height and
depth (in pixel). The *kerning line shows the kerning value (in sp) of
the neighbouring character pair. No problem here.

But A much longer Test graphic VATo

sees no kerning for VATo (although the text is printed with the
correct kerning).

What am I missing? Example code is attached.


Your code only reports a kern if it happens between the first
occurrence of a certain glyph and is predecessor. After that
first attempt, the

  if not char[u] then ...

condition evaluates to false, so no further reporting is done.

In other words, your longer example fails to report anything for
the VA, AT, and To combinations because all the second
glyphs in the pairs have already been seen before in a non-kerned
combination (A, lo,  T).

You have to rethink the loop logic.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] kerning info (mkiv)

2011-01-07 Thread Peter Rolf
Am 07.01.2011 15:13, schrieb Taco Hoekwater:
 On 01/07/2011 02:48 PM, Peter Rolf wrote:
 The character stands in the first column, followed by width, height and
 depth (in pixel). The *kerning line shows the kerning value (in sp) of
 the neighbouring character pair. No problem here.

 But A much longer Test graphic VATo

 sees no kerning for VATo (although the text is printed with the
 correct kerning).

 What am I missing? Example code is attached.
 
 Your code only reports a kern if it happens between the first
 occurrence of a certain glyph and is predecessor. After that
 first attempt, the
 
   if not char[u] then ...
 
 condition evaluates to false, so no further reporting is done.
 
 In other words, your longer example fails to report anything for
 the VA, AT, and To combinations because all the second
 glyphs in the pairs have already been seen before in a non-kerned
 combination (A, lo,  T).
 
 You have to rethink the loop logic.

Ah, I see the problem now. Many thanks Taco! :-)

Best wishes,  Peter


___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Kerning messed up for Minion Pro in ConTeXt 2010.06.09

2010-06-10 Thread Hans Hagen

On 9-6-2010 10:59, Mojca Miklavec wrote:

On Wed, Jun 9, 2010 at 18:36, Michael Murphy wrote:


it looks like the kerning has gone weird for Minion Pro in the latest
ConTeXt (this is the only font I could find with the problem, all others
looked fine). I've attached a PDF to show the effect.


Just a blind guess. Some Adobe fonts use kerning groups (a set of
characters with equal kerning on left/right), while most fonts, in
particular all the Polish fonts/LM use just normal kerning (kerning
defined for each pair of characters). I suspect that only kerning of
group of characters might be broken.


test code needed

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Kerning messed up for Minion Pro in ConTeXt 2010.06.09

2010-06-10 Thread Bernhard Rosensteiner
Am 10.06.2010 um 10:32 schrieb Hans Hagen:

 On 9-6-2010 10:59, Mojca Miklavec wrote:
 On Wed, Jun 9, 2010 at 18:36, Michael Murphy wrote:
 
 it looks like the kerning has gone weird for Minion Pro in the latest
 ConTeXt (this is the only font I could find with the problem, all others
 looked fine). I've attached a PDF to show the effect.
 
 Just a blind guess. Some Adobe fonts use kerning groups (a set of
 characters with equal kerning on left/right), while most fonts, in
 particular all the Polish fonts/LM use just normal kerning (kerning
 defined for each pair of characters). I suspect that only kerning of
 group of characters might be broken.
 
 test code needed




how exactly should the test code look like? to reproduce it one needs the adobe 
fonts.
Here are links to my testing of the adobe opticals:

http://dl.dropbox.com/u/2082519/Typescript_Test.pdf
http://dl.dropbox.com/u/2082519/Typescript_Test.log

Probably this does not help much but shows that the problem is not only with 
minion pro.

best regards
Bernhard

___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Kerning messed up for Minion Pro in ConTeXt 2010.06.09

2010-06-10 Thread Hans Hagen

On 10-6-2010 1:57, Bernhard Rosensteiner wrote:

Am 10.06.2010 um 10:32 schrieb Hans Hagen:


On 9-6-2010 10:59, Mojca Miklavec wrote:

On Wed, Jun 9, 2010 at 18:36, Michael Murphy wrote:


it looks like the kerning has gone weird for Minion Pro in the latest
ConTeXt (this is the only font I could find with the problem, all others
looked fine). I've attached a PDF to show the effect.


Just a blind guess. Some Adobe fonts use kerning groups (a set of
characters with equal kerning on left/right), while most fonts, in
particular all the Polish fonts/LM use just normal kerning (kerning
defined for each pair of characters). I suspect that only kerning of
group of characters might be broken.


test code needed





how exactly should the test code look like? to reproduce it one needs the adobe 
fonts.
Here are links to my testing of the adobe opticals:

http://dl.dropbox.com/u/2082519/Typescript_Test.pdf
http://dl.dropbox.com/u/2082519/Typescript_Test.log


i reverted a change and not works ok, the problem is that we have to use 
a depricated (bit unreliable) lua function and i'd changes the code; 
however this is also unreliable ... a future version of luatex will 
circumvent this


Hans



-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | voip: 087 875 68 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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


[NTG-context] Kerning messed up for Minion Pro in ConTeXt 2010.06.09

2010-06-09 Thread Michael Murphy

Hi all,

it looks like the kerning has gone weird for Minion Pro in the latest 
ConTeXt (this is the only font I could find with the problem, all others 
looked fine). I've attached a PDF to show the effect.


--
Michael Murphy


min_kern.pdf
Description: Adobe PDF document
___
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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Kerning messed up for Minion Pro in ConTeXt 2010.06.09

2010-06-09 Thread Mojca Miklavec
On Wed, Jun 9, 2010 at 18:36, Michael Murphy wrote:

 it looks like the kerning has gone weird for Minion Pro in the latest
 ConTeXt (this is the only font I could find with the problem, all others
 looked fine). I've attached a PDF to show the effect.

Just a blind guess. Some Adobe fonts use kerning groups (a set of
characters with equal kerning on left/right), while most fonts, in
particular all the Polish fonts/LM use just normal kerning (kerning
defined for each pair of characters). I suspect that only kerning of
group of characters might be broken.

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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___


Re: [NTG-context] Kerning and Minion Pro

2009-01-18 Thread Hans Hagen

Andreas Harder wrote:


  I've a curious problem: With Palatino or Latin Modern kerning seems to
  work as intended, but what's the matter with Minion (example below)?

  This appears to be caused by the fact that in MinionPro most
  (not all, but most) of the kerning is specified via kern classes.

Than you for explanation! But, is it possible to activate kerning for 
MinionPro?


And what about the following example?

\startbuffer[KernTest]
  \startlines
Tänze,
Tanze,
Väter,
Vater,
  \stoplines
\stopbuffer

The kerned „Väter“ can't be right (with MinionPro).


i uploaded a beta that hopefully fixes it

btw, you can say:

\enabletrackers[otf.kerns]

and see what is injected between glyphs

thanks for the test files

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


Re: [NTG-context] Kerning and Minion Pro

2009-01-17 Thread Taco Hoekwater

Andreas Harder wrote:

Hello,

I've a curious problem: With Palatino or Latin Modern kerning seems to 
work as intended, but what's the matter with Minion (example below)?


This appears to be caused by the fact that in MinionPro most
(not all, but most) of the kerning is specified via kern classes.

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
___


Re: [NTG-context] Kerning and Minion Pro

2009-01-17 Thread Andreas Harder
 I've a curious problem: With Palatino or Latin Modern kerning  
seems to

 work as intended, but what's the matter with Minion (example below)?

 This appears to be caused by the fact that in MinionPro most
 (not all, but most) of the kerning is specified via kern classes.

Than you for explanation! But, is it possible to activate kerning for  
MinionPro?


And what about the following example?

\startbuffer[KernTest]
  \startlines
Tänze,
Tanze,
Väter,
Vater,
  \stoplines
\stopbuffer

The kerned „Väter“ can't be right (with MinionPro).

Greetings,
Andreas

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


Re: [NTG-context] Kerning and Minion Pro

2009-01-17 Thread Taco Hoekwater

Andreas Harder wrote:

  I've a curious problem: With Palatino or Latin Modern kerning seems to
  work as intended, but what's the matter with Minion (example below)?

  This appears to be caused by the fact that in MinionPro most
  (not all, but most) of the kerning is specified via kern classes.

Than you for explanation! But, is it possible to activate kerning for 
MinionPro?

And what about the following example?

\startbuffer[KernTest]
  \startlines
Tänze,
Tanze,
Väter,
Vater,
  \stoplines
\stopbuffer

The kerned „Väter“ can't be right (with MinionPro).


Here the blue (= base mode) actually looks correct, but that just means 
that mkiv needs a patch: the base kerns are also generated by the mkiv

font loader, after all. It probably got confused by the kerning classes.

I expect that it actually did work earlier (pre 0.31), and that what you
see now is just a regression. But it is better for me to wait for Hans'
comment than to dive into the code  and maybe spend hours on a problem
that would take him 10 seconds.

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
___


[NTG-context] Kerning and Minion Pro

2009-01-16 Thread Andreas Harder

Hello,

I've a curious problem: With Palatino or Latin Modern kerning seems to work as 
intended, but what's the matter with Minion (example below)?


\setupcolors[state=start]

% \mainlanguage[de]

\definefontfeature[basekerned][default][mode=base]
\definefontfeature[nodekerned][default][mode=node]
\definefontfeature[nonekerned][default][mode=base,kern=no]

\starttext

\startbuffer[KernTest]
 \startlines
   Av, AV,
   LT, LV, Ly,
   TA, To, Ty, Te, T.
   Va, V.,
   Ya, Yo, Y.
 \stoplines
\stopbuffer

\startTEXpage % Minion Pro
 \startoverlay
   {\vbox{\red \definedfont[name:MinionPro-Regular*nonekerned at 
100pt]\getbuffer[KernTest] }}
   {\vbox{\blue\definedfont[name:MinionPro-Regular*basekerned at 
100pt]\getbuffer[KernTest] }}
   {\vbox{\darkgray\definedfont[name:MinionPro-Regular*nodekerned at 
100pt]\getbuffer[KernTest] }}
 \stopoverlay
\stopTEXpage

\startTEXpage % Latin Modern
 \startoverlay
   {\vbox{\red \definedfont[Serif*nonekerned at 100pt]\getbuffer[KernTest] 
}}
   {\vbox{\blue\definedfont[Serif*basekerned at 100pt]\getbuffer[KernTest] 
}}
   {\vbox{\darkgray\definedfont[Serif*nodekerned at 100pt]\getbuffer[KernTest] 
}}
 \stopoverlay
\stopTEXpage

\startTEXpage % Palatino
 \startoverlay
   {\vbox{\red \definedfont[file:texgyrepagella-regular*nonekerned at 
100pt]\getbuffer[KernTest] }}
   {\vbox{\blue\definedfont[file:texgyrepagella-regular*basekerned at 
100pt]\getbuffer[KernTest] }}
   {\vbox{\darkgray\definedfont[file:texgyrepagella-regular*nodekerned at 
100pt]\getbuffer[KernTest] }}
 \stopoverlay
\stopTEXpage

\stoptext


This is luaTeX, Version snapshot-0.31.3
ConTeXt  ver: 2009.01.14 11:29 MKIV


Thanks,
   Andreas


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


Re: [NTG-context] Kerning

2008-11-14 Thread Hans Hagen
Bart C. Wise wrote:

 I tried the above code and it failed.  I looked around on the ConTeXt site 
 and 
 the web in general.  It seems like a \defineproperty[stretch] needs to be 
 declared, but I can't find it anywhere.  You'll have to excuse my ignorance, 
 but will you be explicit on how to use the \startproperty[stretch] stretch 
 \stopproperty.

hm, something is missing in the mkii file

\unprotect \definepropertyhandler \v!stretch{0} \protect

(you can also tune the 'normal effect')

consider all this a hack, since tex does not know about the right 
dimensions

in mkiv there's

\start \dosetstretch{.25em} \setuptolerance[tolerant,stretch] \input 
tufte \endgraf \stop
\start \dosetstretch{.5em} effe flink doorfietsen \stop

(not yet interfaced but it should work)

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


Re: [NTG-context] Kerning

2008-11-13 Thread Wolfgang Schuster
On Thu, Nov 13, 2008 at 7:18 AM, Bart C. Wise
[EMAIL PROTECTED] wrote:
 Wolfgang,  thanks so much for your help so far.

 I was able to take the code and make it work correctly to stretch the chapter
 title.  What I want is two lines for a chapter head.  For example,
 Line 1: Chapter One
 Line 2: Title for Chap 1

 I want line 1 to be stretched.  Everything I have tried does not work.  I can
 get the Chapter word to stretch, but not the whole line (and it should
 probably be treated as a whole line when stretching).  I was never able to get
 the chapter number (now a word) to stretch.

 So how do I grab the output for line 1 and then stretch it?

 Here's a sample of what I have without any stretching:

 \def\Myheader#1#2{%
\framedtext[width=0.60\textwidth, frame=off, align=middle]{%
\vbox{\headtext{chapter}~#1 \blank #2}}}

 \def\englishnumbers#1{
\ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
 \defineconversion[englishnumbers][\englishnumbers]

 \setupsection[chapter][conversion=englishnumbers]
 \setuphead [chapter][
command=\Myheader,
textcommand=\bfd,
 ]
 \setupheadtext[chapter=CHAPTER] % used by \headtext
 \starttext
 \chapter{Title for Chap 1}
 \processfile{tufte}
 \stoptext

\def\Myheader#1#2%
 {\framed
[width=0.60\textwidth,
frame=off,
align=middle]
{\determineheadnumber[chapter]
 
\expanded{\stretchednormalcase{CHAPTER~\convertnumber{englishnumbers}{\currentheadnumber}}}
 \blank#2}}

\def\englishnumbers#1{
  \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}

\defineconversion[englishnumbers][\englishnumbers]

\setuphead
 [chapter]
 [command=\Myheader,
  deeptextcommand=\stretchednormalcase,
  textstyle=\bfd]

 P.S. If there's a better way to do the number-word conversion, let me know.

Search for \numprint in the list archive.

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
___


Re: [NTG-context] Kerning

2008-11-13 Thread Bart C. Wise
Wolfgang,

Thanks so much for your help!  It works exactly as I desire.

Bart

On Thursday 13 November 2008 01:36:11 am Wolfgang Schuster wrote:
 On Thu, Nov 13, 2008 at 7:18 AM, Bart C. Wise

 [EMAIL PROTECTED] wrote:
  Wolfgang,  thanks so much for your help so far.
 
  I was able to take the code and make it work correctly to stretch the
  chapter title.  What I want is two lines for a chapter head.  For
  example, Line 1: Chapter One
  Line 2: Title for Chap 1
 
  I want line 1 to be stretched.  Everything I have tried does not work.  I
  can get the Chapter word to stretch, but not the whole line (and it
  should probably be treated as a whole line when stretching).  I was never
  able to get the chapter number (now a word) to stretch.
 
  So how do I grab the output for line 1 and then stretch it?
 
  Here's a sample of what I have without any stretching:
 
  \def\Myheader#1#2{%
 \framedtext[width=0.60\textwidth, frame=off, align=middle]{%
 \vbox{\headtext{chapter}~#1 \blank #2}}}
 
  \def\englishnumbers#1{
 \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
  \defineconversion[englishnumbers][\englishnumbers]
 
  \setupsection[chapter][conversion=englishnumbers]
  \setuphead [chapter][
 command=\Myheader,
 textcommand=\bfd,
  ]
  \setupheadtext[chapter=CHAPTER] % used by \headtext
  \starttext
  \chapter{Title for Chap 1}
  \processfile{tufte}
  \stoptext

 \def\Myheader#1#2%
  {\framed
 [width=0.60\textwidth,
 frame=off,
 align=middle]
 {\determineheadnumber[chapter]
 
 \expanded{\stretchednormalcase{CHAPTER~\convertnumber{englishnumbers}{\curr
entheadnumber}}} \blank#2}}

 \def\englishnumbers#1{
   \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}

 \defineconversion[englishnumbers][\englishnumbers]

 \setuphead
  [chapter]
  [command=\Myheader,
   deeptextcommand=\stretchednormalcase,
   textstyle=\bfd]

  P.S. If there's a better way to do the number-word conversion, let me
  know.

 Search for \numprint in the list archive.

 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
___


Re: [NTG-context] Kerning

2008-11-13 Thread Bart C. Wise
On Thursday 13 November 2008 12:46:27 am Hans Hagen wrote:
 Bart C. Wise wrote:
  Wolfgang,  thanks so much for your help so far.
 
  I was able to take the code and make it work correctly to stretch the
  chapter title.  What I want is two lines for a chapter head.  For
  example, Line 1: Chapter One
  Line 2: Title for Chap 1
 
  I want line 1 to be stretched.  Everything I have tried does not work.  I
  can get the Chapter word to stretch, but not the whole line (and it
  should probably be treated as a whole line when stretching).  I was never
  able to get the chapter number (now a word) to stretch.
 
  So how do I grab the output for line 1 and then stretch it?
 
  Here's a sample of what I have without any stretching:
 
  \def\Myheader#1#2{%
  \framedtext[width=0.60\textwidth, frame=off, align=middle]{%
  \vbox{\headtext{chapter}~#1 \blank #2}}}
 
  \def\englishnumbers#1{
  \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
  \defineconversion[englishnumbers][\englishnumbers]
 
  \setupsection[chapter][conversion=englishnumbers]
  \setuphead [chapter][
  command=\Myheader,
  textcommand=\bfd,
  ]
  \setupheadtext[chapter=CHAPTER] % used by \headtext
  \starttext
  \chapter{Title for Chap 1}
  \processfile{tufte}
  \stoptext
 
 
  P.S. If there's a better way to do the number-word conversion, let me
  know.
 
  On Wednesday 12 November 2008 10:17:35 am Wolfgang Schuster wrote:
  Am 12.11.2008 um 18:03 schrieb Bart C. Wise:
  Okay, it works until I place an an argument in the stretched command.
 
  def\MyChapterCommand#1#2{
\framed[align=center,frame=off,width=\textwidth]{
\vbox{
  fails--  \stretched{#2}
  works--  \stretched{This is a Test}
}
}
  \setuphead[chapter][
command=\MyChapterCommand
  }
 
 
  I get the following error when I run texexec:
 
  ! Missing \endcsname inserted.
  to be read again
\let
  \nextprocessedtoken ...oup \ifincolor \ifcsname #1
   #3\endcsname \let
  \dostopa...
 
  \dodoprocesstokens ...token \let \before \between
   \fi \let
  \nextprocessedtok...
  argument This is a test: \dostartattributes
   {\??ko \v!title }\c!style
  \c!c...
 
  \processtokens ...fore \before \doprocesstokens #5
   \lastcharacter
  \endgroup
  \stretched ... \relax \hss \relax {\hss \hss }{#1}
   \egroup
  ...
 
  How can I use the #1  #2 arguments in the stretched command?
 
  You could use it only with \deeptextcommand, here is a old mail
  with a example from Hans (you could ignore the other code).
 
  http://archive.contextgarden.net/message/20060113.102321.bf24d7ca.en.htm
 l

 look for the property mechanism

 \startproperty[stretch]stretched\stopproperty

 token processing is always tricky since the parser does not know what to
 expect; properties use a pdf trick; in mkiv we have more clever stretching



Hans,

I tried the above code and it failed.  I looked around on the ConTeXt site and 
the web in general.  It seems like a \defineproperty[stretch] needs to be 
declared, but I can't find it anywhere.  You'll have to excuse my ignorance, 
but will you be explicit on how to use the \startproperty[stretch] stretch 
\stopproperty.

Bart
___
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
___


[NTG-context] Kerning

2008-11-12 Thread Bart C. Wise
I am trying to change the spacing of a chapter title head.  I found the 
\kern command; however, I could not get that to work over a string of text.

Then I found the following code:
\def\dolist{\afterassignment\dodolist\let\next= }
\def\dodolist{\ifx\next\endlist \let\next\relax
   \else \\\let\next\dolist \fi
   \next}
\def\endlist{\endlist}
\def\track#1\by#2{\def\\{\next\kern#2}%
   \leavevmode \hbox{\expandafter\dolist#1\endlist}}

Then I tried:

def\MyChapterCommand#1#2{
\framed[align=center,frame=off,width=\textwidth]{
\vbox{
\track{This is a Test} \by{.2em}
\track #2  \by{.2em}
}
}
\setuphead[chapter][
command=\MyChapterCommand
}

The output from the \track{This is a Test} \by{.2em} works.  However, the 
second track command (\track #2 \by{0.2em}) fails.

I spent many hours last night trying to change the kerning.  What I want is 
something like: \kern{TEXT}{KERNING AMOUNT}.  

What's available, or how do I fix the track command above.  By the way,I'm 
running mkii.

Thanks,
Bart
___
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
___


Re: [NTG-context] Kerning

2008-11-12 Thread Wolfgang Schuster

Am 12.11.2008 um 16:48 schrieb Bart C. Wise:

 I am trying to change the spacing of a chapter title head.  I found  
 the
 \kern command; however, I could not get that to work over a string  
 of text.

 Then I found the following code:
 \def\dolist{\afterassignment\dodolist\let\next= }
 \def\dodolist{\ifx\next\endlist \let\next\relax
   \else \\\let\next\dolist \fi
   \next}
 \def\endlist{\endlist}
 \def\track#1\by#2{\def\\{\next\kern#2}%
   \leavevmode \hbox{\expandafter\dolist#1\endlist}}

 Then I tried:

 def\MyChapterCommand#1#2{
\framed[align=center,frame=off,width=\textwidth]{
   \vbox{
   \track{This is a Test} \by{.2em}
   \track #2  \by{.2em}
   }
   }
 \setuphead[chapter][
command=\MyChapterCommand
 }

 The output from the \track{This is a Test} \by{.2em} works.   
 However, the
 second track command (\track #2 \by{0.2em}) fails.

 I spent many hours last night trying to change the kerning.  What I  
 want is
 something like: \kern{TEXT}{KERNING AMOUNT}.

 What's available, or how do I fix the track command above.  By the  
 way,I'm
 running mkii.


Search for \stretched and \stretchednormalcase.

http://archive.contextgarden.net/message/20080815.074940.ae67f770.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
___


Re: [NTG-context] Kerning

2008-11-12 Thread Bart C. Wise
Wolfgang,

It works!

Thanks,
Bart

On Wednesday 12 November 2008 08:54:49 am Wolfgang Schuster wrote:
 Am 12.11.2008 um 16:48 schrieb Bart C. Wise:
  I am trying to change the spacing of a chapter title head.  I found
  the
  \kern command; however, I could not get that to work over a string
  of text.
 
  Then I found the following code:
  \def\dolist{\afterassignment\dodolist\let\next= }
  \def\dodolist{\ifx\next\endlist \let\next\relax
\else \\\let\next\dolist \fi
\next}
  \def\endlist{\endlist}
  \def\track#1\by#2{\def\\{\next\kern#2}%
\leavevmode \hbox{\expandafter\dolist#1\endlist}}
 
  Then I tried:
 
  def\MyChapterCommand#1#2{
 \framed[align=center,frame=off,width=\textwidth]{
  \vbox{
  \track{This is a Test} \by{.2em}
  \track #2  \by{.2em}
  }
  }
  \setuphead[chapter][
 command=\MyChapterCommand
  }
 
  The output from the \track{This is a Test} \by{.2em} works.
  However, the
  second track command (\track #2 \by{0.2em}) fails.
 
  I spent many hours last night trying to change the kerning.  What I
  want is
  something like: \kern{TEXT}{KERNING AMOUNT}.
 
  What's available, or how do I fix the track command above.  By the
  way,I'm
  running mkii.

 Search for \stretched and \stretchednormalcase.

 http://archive.contextgarden.net/message/20080815.074940.ae67f770.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
 ___


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


Re: [NTG-context] Kerning

2008-11-12 Thread Bart C. Wise
Okay, it works until I place an an argument in the stretched command.

def\MyChapterCommand#1#2{
   \framed[align=center,frame=off,width=\textwidth]{
\vbox{
fails--\stretched{#2}
works--\stretched{This is a Test}
}
}
\setuphead[chapter][
   command=\MyChapterCommand
}


I get the following error when I run texexec:

! Missing \endcsname inserted.
to be read again
   \let
\nextprocessedtoken ...oup \ifincolor \ifcsname #1
  #3\endcsname \let 
\dostopa...

\dodoprocesstokens ...token \let \before \between
  \fi \let \nextprocessedtok...
argument This is a test: \dostartattributes
  {\??ko \v!title }\c!style 
\c!c...

\processtokens ...fore \before \doprocesstokens #5
  \lastcharacter \endgroup
\stretched ... \relax \hss \relax {\hss \hss }{#1}
  \egroup
...

How can I use the #1  #2 arguments in the stretched command?

On Wednesday 12 November 2008 09:28:39 am Bart C. Wise wrote:
 Wolfgang,

 It works!

 Thanks,
 Bart

 On Wednesday 12 November 2008 08:54:49 am Wolfgang Schuster wrote:
  Am 12.11.2008 um 16:48 schrieb Bart C. Wise:
   I am trying to change the spacing of a chapter title head.  I found
   the
   \kern command; however, I could not get that to work over a string
   of text.
  
   Then I found the following code:
   \def\dolist{\afterassignment\dodolist\let\next= }
   \def\dodolist{\ifx\next\endlist \let\next\relax
 \else \\\let\next\dolist \fi
 \next}
   \def\endlist{\endlist}
   \def\track#1\by#2{\def\\{\next\kern#2}%
 \leavevmode \hbox{\expandafter\dolist#1\endlist}}
  
   Then I tried:
  
   def\MyChapterCommand#1#2{
  \framed[align=center,frame=off,width=\textwidth]{
 \vbox{
 \track{This is a Test} \by{.2em}
 \track #2  \by{.2em}
 }
 }
   \setuphead[chapter][
  command=\MyChapterCommand
   }
  
   The output from the \track{This is a Test} \by{.2em} works.
   However, the
   second track command (\track #2 \by{0.2em}) fails.
  
   I spent many hours last night trying to change the kerning.  What I
   want is
   something like: \kern{TEXT}{KERNING AMOUNT}.
  
   What's available, or how do I fix the track command above.  By the
   way,I'm
   running mkii.
 
  Search for \stretched and \stretchednormalcase.
 
  http://archive.contextgarden.net/message/20080815.074940.ae67f770.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
  _
 __ 

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


Re: [NTG-context] Kerning

2008-11-12 Thread Wolfgang Schuster

Am 12.11.2008 um 18:03 schrieb Bart C. Wise:

 Okay, it works until I place an an argument in the stretched command.

 def\MyChapterCommand#1#2{
   \framed[align=center,frame=off,width=\textwidth]{
   \vbox{
 fails--  \stretched{#2}
 works--  \stretched{This is a Test}
   }
   }
 \setuphead[chapter][
   command=\MyChapterCommand
 }


 I get the following error when I run texexec:

 ! Missing \endcsname inserted.
 to be read again
   \let
 \nextprocessedtoken ...oup \ifincolor \ifcsname #1
  #3\endcsname \let
 \dostopa...

 \dodoprocesstokens ...token \let \before \between
  \fi \let  
 \nextprocessedtok...
 argument This is a test: \dostartattributes
  {\??ko \v!title }\c!style
 \c!c...

 \processtokens ...fore \before \doprocesstokens #5
  \lastcharacter  
 \endgroup
 \stretched ... \relax \hss \relax {\hss \hss }{#1}
  \egroup
 ...

 How can I use the #1  #2 arguments in the stretched command?

You could use it only with \deeptextcommand, here is a old mail
with a example from Hans (you could ignore the other code).

http://archive.contextgarden.net/message/20060113.102321.bf24d7ca.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
___


Re: [NTG-context] Kerning

2008-11-12 Thread Bart C. Wise
Wolfgang,  thanks so much for your help so far.

I was able to take the code and make it work correctly to stretch the chapter 
title.  What I want is two lines for a chapter head.  For example,
Line 1: Chapter One
Line 2: Title for Chap 1

I want line 1 to be stretched.  Everything I have tried does not work.  I can 
get the Chapter word to stretch, but not the whole line (and it should 
probably be treated as a whole line when stretching).  I was never able to get 
the chapter number (now a word) to stretch.

So how do I grab the output for line 1 and then stretch it?

Here's a sample of what I have without any stretching:

\def\Myheader#1#2{%
\framedtext[width=0.60\textwidth, frame=off, align=middle]{%
\vbox{\headtext{chapter}~#1 \blank #2}}}

\def\englishnumbers#1{
\ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
\defineconversion[englishnumbers][\englishnumbers]

\setupsection[chapter][conversion=englishnumbers]
\setuphead [chapter][
command=\Myheader,
textcommand=\bfd,
]
\setupheadtext[chapter=CHAPTER] % used by \headtext
\starttext
\chapter{Title for Chap 1}
\processfile{tufte}
\stoptext


P.S. If there's a better way to do the number-word conversion, let me know.


On Wednesday 12 November 2008 10:17:35 am Wolfgang Schuster wrote:
 Am 12.11.2008 um 18:03 schrieb Bart C. Wise:
  Okay, it works until I place an an argument in the stretched command.
 
  def\MyChapterCommand#1#2{
\framed[align=center,frame=off,width=\textwidth]{
  \vbox{
  fails--\stretched{#2}
  works--\stretched{This is a Test}
  }
  }
  \setuphead[chapter][
command=\MyChapterCommand
  }
 
 
  I get the following error when I run texexec:
 
  ! Missing \endcsname inserted.
  to be read again
\let
  \nextprocessedtoken ...oup \ifincolor \ifcsname #1
   #3\endcsname \let
  \dostopa...
 
  \dodoprocesstokens ...token \let \before \between
   \fi \let
  \nextprocessedtok...
  argument This is a test: \dostartattributes
   {\??ko \v!title }\c!style
  \c!c...
 
  \processtokens ...fore \before \doprocesstokens #5
   \lastcharacter
  \endgroup
  \stretched ... \relax \hss \relax {\hss \hss }{#1}
   \egroup
  ...
 
  How can I use the #1  #2 arguments in the stretched command?

 You could use it only with \deeptextcommand, here is a old mail
 with a example from Hans (you could ignore the other code).

 http://archive.contextgarden.net/message/20060113.102321.bf24d7ca.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
 ___


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


Re: [NTG-context] Kerning

2008-11-12 Thread Hans Hagen
Bart C. Wise wrote:
 Wolfgang,  thanks so much for your help so far.
 
 I was able to take the code and make it work correctly to stretch the chapter 
 title.  What I want is two lines for a chapter head.  For example,
 Line 1: Chapter One
 Line 2: Title for Chap 1
 
 I want line 1 to be stretched.  Everything I have tried does not work.  I can 
 get the Chapter word to stretch, but not the whole line (and it should 
 probably be treated as a whole line when stretching).  I was never able to 
 get 
 the chapter number (now a word) to stretch.
 
 So how do I grab the output for line 1 and then stretch it?
 
 Here's a sample of what I have without any stretching:
 
 \def\Myheader#1#2{%
 \framedtext[width=0.60\textwidth, frame=off, align=middle]{%
 \vbox{\headtext{chapter}~#1 \blank #2}}}
 
 \def\englishnumbers#1{
 \ifcase#1 \or ONE\or TWO\or THREE\or FOUR\or FIVE\fi}
 \defineconversion[englishnumbers][\englishnumbers]
 
 \setupsection[chapter][conversion=englishnumbers]
 \setuphead [chapter][
 command=\Myheader,
 textcommand=\bfd,
 ]
 \setupheadtext[chapter=CHAPTER] % used by \headtext
 \starttext
 \chapter{Title for Chap 1}
 \processfile{tufte}
 \stoptext
 
 
 P.S. If there's a better way to do the number-word conversion, let me know.
 
 
 On Wednesday 12 November 2008 10:17:35 am Wolfgang Schuster wrote:
 Am 12.11.2008 um 18:03 schrieb Bart C. Wise:
 Okay, it works until I place an an argument in the stretched command.

 def\MyChapterCommand#1#2{
   \framed[align=center,frame=off,width=\textwidth]{
 \vbox{
 fails--\stretched{#2}
 works--\stretched{This is a Test}
 }
 }
 \setuphead[chapter][
   command=\MyChapterCommand
 }


 I get the following error when I run texexec:

 ! Missing \endcsname inserted.
 to be read again
   \let
 \nextprocessedtoken ...oup \ifincolor \ifcsname #1
  #3\endcsname \let
 \dostopa...

 \dodoprocesstokens ...token \let \before \between
  \fi \let
 \nextprocessedtok...
 argument This is a test: \dostartattributes
  {\??ko \v!title }\c!style
 \c!c...

 \processtokens ...fore \before \doprocesstokens #5
  \lastcharacter
 \endgroup
 \stretched ... \relax \hss \relax {\hss \hss }{#1}
  \egroup
 ...

 How can I use the #1  #2 arguments in the stretched command?
 You could use it only with \deeptextcommand, here is a old mail
 with a example from Hans (you could ignore the other code).

 http://archive.contextgarden.net/message/20060113.102321.bf24d7ca.en.html

look for the property mechanism

\startproperty[stretch]stretched\stopproperty

token processing is always tricky since the parser does not know what to 
expect; properties use a pdf trick; in mkiv we have more clever stretching


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


[NTG-context] Kerning and Scaling

2008-08-23 Thread Charles P. Schaum
Hi Folks,

I wanted to confirm that Hans is **Correct** about font fitting. In
fact, I think that scaling is superior.

One thing I did find is that one must go real easy with the scaling,
e.g., compute the difference between the size you want/need, and see
that it isn't too great, as the test shows.

This test suite, written for plain, nevertheless will work in ConText IF
you set the conditional value \havecontexttrue, which I did below.

Some of the exact font results will, however, differ between the two.
That was just my not trying to rectify differences in the default fonts
and sizes.

I found this exercise to be fun for learning about macro expansion, as
well as dealing with multiple constraints and tail recursion.

Charles

Cut Here-

%Testing insertion of kerns and stuff

\newif\ifhavecontext

%\havecontextfalse
\havecontexttrue

% Here we have two kerns that are equally smaller and larger
\newdimen\KernSmall
\newdimen\KernLarge
\KernSmall=-0.03em
\KernLarge=0.03em

% This is Knuth's length macro from the \Tex Book
\def\length#1{\count30=0 \getlength#1\end \number\count30}
\def\getlength#1{\ifx#1\end \let\next=\relax
  \else\advance\count30 by1 \let\next=\getlength\fi \next}

% This is a modified version of the length macro.
% It's existence is to stuff kerns between any two internal tokens.
\newcount\intraword
\newdimen\intrakern
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED] \def\insertium{}\else \def\insertium{\kern
\intrakern}\fi \ifnum\intraword0\insertium\fi \ifx#1\end \let\next=
\relax\else\advance\intraword [EMAIL PROTECTED]

% But who says you have to use only kerns?
[EMAIL PROTECTED]
[EMAIL PROTECTED]
[EMAIL PROTECTED] \def\insertium{}\else \def
\insertium{\StickIt}\fi \ifnum\intraword0\insertium\fi \ifx#1\end \let
\next=\relax\else\advance\intraword [EMAIL PROTECTED]
\next}}

% SDF-1 will control the scaled box to equal the negative kerning
\newdimen\SDFONE
\newdimen\fitdimone
\newdimen\fitdimtwo

\def\fitbox#1{%
\setbox30=\hbox{\InsertKern{\KernSmall}{Garbage\ in,\ garbage\ out.}}
\SDFONE=\wd30
\font\custfont=cmr10 scaled 1000
\setbox30=\hbox{\custfont#1}
\fitdimone=\SDFONE
\fitdimtwo=\wd30
\divide\fitdimtwo by 1000
\divide\fitdimone\fitdimtwo
\count30=\fitdimone
\font\custfont=cmr10 scaled \count30
\hbox{\custfont#1}
}

% Okay, and this is what it all comes to\dots
\ifhavecontext\starttext\fi

\fitbox{OK, Class\dots}\par
\bigskip

Garbage in, garbage out.\par
Ignore spaces and get Knuth's count of \length{Garbage in, garbage
out.}.\par
Count spaces and get Knuth's count of \length{Garbage\ in,\ garbage\
out.}.\par
\smallskip
This includes punctuation.\par
\bigskip

Here you can see the insertion points of the macro.\par
\InsertStuff{$_\wedge$}{Garbage\ in,\ garbage\ out.}
\medskip Hungry? Want {\bf \InsertStuff{$^{Snacks}$}{Food}}?
\medskip Warning! You can put funky stuff in the insertium, but not in
the text.\par If you do that, \TeX\ will either produce an error or give
you strange results.
\bigskip


\newdimen\compn
\newdimen\comps
\newdimen\compl

Inserting kerns does have an effect:\par
\smallskip
Length of ``Garbage in, garbage out'' is \setbox30=\hbox{Garbage in,
garbage out}\the\wd30 \compn=\wd30\par

Length of ``\InsertKern{\KernSmall}{Garbage\ in,\ garbage\ out}'' is
\setbox30=\hbox{\InsertKern{\KernSmall}{Garbage\ in,\ garbage\ out}}
\the\wd30 \comps=\wd30\par

Length of ``\InsertKern{\KernLarge}{Garbage\ in,\ garbage\ out}'' is
\setbox30=\hbox{\InsertKern{\KernLarge}{Garbage\ in,\ garbage\ out}}
\the\wd30 \compl=\wd30\par
\bigskip

Size matters\dots
\smallskip
{\tt N:} Garbage in, garbage out.\par
{\tt S:} {\InsertKern{\KernSmall}{Garbage\ in,\ garbage\ out.}\par
{\tt L:} {\InsertKern{\KernLarge}{Garbage\ in,\ garbage\ out.}\par
\bigskip

Which looks better? Scaled \the\KernSmall
\smallskip
Negative kern insertion (top) vs. font scaling (bottom):\par
\ \ \ \hbox{\InsertKern{\KernSmall}{Garbage\ in,\ garbage\ out.}}\par
\ \fitbox{Garbage in, garbage out.}
\bigskip

I had in mind something a little more radical\dots
\KernSmall=-0.07em
\ Scaled \the\KernSmall
\smallskip
Negative kern insertion (top) vs. font scaling (bottom):\par
\ \ \ \hbox{\InsertKern{\KernSmall}{Garbage\ in,\ garbage\ out.}}\par
\ \fitbox{Garbage in, garbage out.}
\bigskip

This is just sick\dots\par
\KernSmall=-0.1em
Scaled \the\KernSmall
\smallskip
Negative kern insertion (top) vs. font scaling (bottom):\par
\ \ \ \hbox{\InsertKern{\KernSmall}{Garbage\ in,\ garbage\ out.}}\par
\ \fitbox{Garbage in, garbage out.}
\smallskip
\KernSmall=-0.2em
Scaled \the\KernSmall
\smallskip
Negative kern insertion (top) vs. font scaling (bottom):\par
\ \ \ \hbox{\InsertKern{\KernSmall}{Garbage\ in,\ garbage\ out.}}\par
\ \fitbox{Garbage in, garbage out.}
\smallskip
\KernSmall=-0.3em
Scaled \the\KernSmall
\smallskip
Negative kern insertion (top) vs. font scaling (bottom):\par
\ \ \ \hbox{\InsertKern{\KernSmall}{Garbage\ in,\ garbage\ out.}}\par
\ \fitbox{Garbage in, garbage out.}


[NTG-context] kerning and TFM problems

2005-03-21 Thread Steffen Wolfrum
Hi,
I want to use OSX HelveticaNeue font.
So I open it in FontForge and - because I'd like to use the kerning 
information - generate the Font with its PFB, AFM and TFM files.

According to Bill's help page it should work by (renaming and) 
placing the phnr8r.tfm in its tfm folder, the phnr8a.afm and 
phnr8a.pfb in its respective folders (within my texfm-font tree).

Then I need a mapfile texnansi-helveticaneue.map with the line:
phnr8r HelveticaNeue 4  phnr8a.pfb texnansi.enc
And my test file looks like this:
\loadmapfile[texnansi-adobe-helveticaneue.map]
\definefontsynonym[HelveticaNeue][phnr8r][encoding=texnansi]
\definefont[MySecondFont][HelveticaNeue]
\starttext
\MySecondFont I sang of leaves, of leaves of gold, and leaves of gold 
there grew.
\stoptext

But it results in problems with the TFM file. Why?
! Font \**MySecondFont**=phnr8r at 12.0pt not loadable: Bad metric (TFM) 
file.
to be read again
   \relax
\dododefinefont ...ontspec {#2}\rawfontidentifier
  \let \localrelativefontsiz...
\redodefinefont #1#2#3-\dododefinefont {#1}{#2}
\doifsetupselse {#3} {\setup...
l.7 \MySecondFont
  I sang of leaves, of leaves of gold, and leaves of gold th...
?

Steffen
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context


Re: [NTG-context] kerning and TFM problems

2005-03-21 Thread luigi.scarso
Steffen Wolfrum wrote:
Hi,
I want to use OSX HelveticaNeue font.
So I open it in FontForge and - because I'd like to use the kerning 
information - generate the Font with its PFB, AFM and TFM files.

According to Bill's help page it should work by (renaming and) placing 
the phnr8r.tfm in its tfm folder, the phnr8a.afm and phnr8a.pfb in its 
respective folders (within my texfm-font tree).

Then I need a mapfile texnansi-helveticaneue.map with the line:
phnr8r HelveticaNeue 4  phnr8a.pfb texnansi.enc
And my test file looks like this:
\loadmapfile[texnansi-adobe-helveticaneue.map]
\definefontsynonym[HelveticaNeue][phnr8r][encoding=texnansi]
\definefont[MySecondFont][HelveticaNeue]
\starttext
\MySecondFont I sang of leaves, of leaves of gold, and leaves of gold 
there grew.
\stoptext

But it results in problems with the TFM file. Why?
! Font \**MySecondFont**=phnr8r at 12.0pt not loadable: Bad metric 
(TFM) file.
to be read again
   \relax
\dododefinefont ...ontspec {#2}\rawfontidentifier
  \let 
\localrelativefontsiz...

\redodefinefont #1#2#3-\dododefinefont {#1}{#2}
\doifsetupselse {#3} 
{\setup...
l.7 \MySecondFont
  I sang of leaves, of leaves of gold, and leaves of 
gold th...

?

Steffen
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context
Did you re-hash (mktexlsr or something similar) ?
luigi
___
ntg-context mailing list
ntg-context@ntg.nl
http://www.ntg.nl/mailman/listinfo/ntg-context