[NTG-context] Re: Inconsistent behavior: \addfontfeature and CLD local function

2023-08-20 Thread Hamid,Idris
Ok, understood. Thank you for the explanation.

Best wishes
Idris

--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
On Aug 20, 2023, 9:45 AM -0600, Hans Hagen , wrote:
** Caution: EXTERNAL Sender **

On 8/20/2023 5:33 PM, Hamid,Idris wrote:
Dear gang,

For \addfeature and the like, a virtual font feature defined in terms of a CLD 
local function behaves differently from other font features. MWE:

==
\startluacode
local function squeeze(tfmdata)
for k, v in next, tfmdata.characters do
v.width = 1.75 * (v.height or 0)
v.depth = 1.75 * (v.depth or 0)
end
end

local specification = {
name = "sqtfm",
description = "test",
manipulators = {
base = squeeze,
node = squeeze,
}
}
because much more has to be done to satisfy the backend (liek advance
with and such) .. you cannot just change dimensions on the fly for
characters that could potentially be shared just as you can't change
glyph dimension mid document

Hans

-
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | 
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pragma-ade.nl%2F=05%7C01%7CIdris.Hamid%40colostate.edu%7C2e50b62ee65c41cb704308dba1947214%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638281431156972904%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=SE09abKBexjImz73ucHLxz4Wv6reS75qYg88LrdNOrg%3D=0
 | 
https://nam10.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.pragma-pod.nl%2F=05%7C01%7CIdris.Hamid%40colostate.edu%7C2e50b62ee65c41cb704308dba1947214%7Cafb58802ff7a4bb1ab21367ff2ecfc8b%7C0%7C0%7C638281431156972904%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C=HDd8xwSOEAqmBG04WkLwG2NBE8JXlAeGWKVI9iqIU1A%3D=0
-

___
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] Re: Inconsistent behavior: \addfontfeature and CLD local function

2023-08-20 Thread Hans Hagen

On 8/20/2023 5:33 PM, Hamid,Idris wrote:

Dear gang,

For \addfeature and the like, a virtual font feature defined in terms of a CLD 
local function behaves differently from other font features. MWE:

==
\startluacode
local function squeeze(tfmdata)
 for k, v in next, tfmdata.characters do
 v.width = 1.75 * (v.height or 0)
 v.depth  = 1.75 * (v.depth  or 0)
 end
end

local specification = {
 name= "sqtfm",
 description = "test",
 manipulators = {
 base = squeeze,
 node = squeeze,
 }
}
because much more has to be done to satisfy the backend (liek advance 
with and such) .. you cannot just change dimensions on the fly for 
characters that could potentially be shared just as you can't change 
glyph dimension mid document


Hans

-
  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 / 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] Inconsistent behavior: \addfontfeature and CLD local function

2023-08-20 Thread Hamid,Idris
Dear gang,

For \addfeature and the like, a virtual font feature defined in terms of a CLD 
local function behaves differently from other font features. MWE:

==
\startluacode
local function squeeze(tfmdata)
for k, v in next, tfmdata.characters do
v.width = 1.75 * (v.height or 0)
v.depth  = 1.75 * (v.depth  or 0)
end
end

local specification = {
name= "sqtfm",
description = "test",
manipulators = {
base = squeeze,
node = squeeze,
}
}

fonts.handlers.otf.features.register(specification)
\stopluacode

\definefontfeature[forceno]
  [mode=node,
   script=latn]


\definefontfeature[forceyes]
  [mode=node,
   script=latn,
   smcp=force,
   sqtfm=force]
   % smcp=yes,
   % sqtfm=yes]

\showglyphs

\startTEXpage[offset=1em]
\definedfont[texgyretermes-regular*forceyes]
% \definedfont[texgyretermes-regular*forceno]
% \addfeature{forceyes}

abcdefg
\stopTEXpage
==
 You may toggle these lines:

\definedfont[texgyretermes-regular*forceyes]
% \definedfont[texgyretermes-regular*forceno]
% \addfeature{forceyes}

With
\definedfont[texgyretermes-regular*forceyes]
active we get the expected result: small caps plus some negative squeeze (= 
spread in this case).

With
\definedfont[texgyretermes-regular*forceno]
\addfeature{forceyes}
active we get an *unexpected* result: small caps but no negative squeeze.

(Similar results occur if we toggle the "=force" lines with the "=yes" lines, 
but the larger project of which this is the MWE uses the force key.)

Clue: A CLD with a feature defined via fonts.handlers.otf.addfeature doesn't 
seem to have this problem:

==

\startluacode
local function squeeze(tfmdata)
for k, v in next, tfmdata.characters do
v.width = 1.75 * (v.height or 0)
v.depth  = 1.75 * (v.depth  or 0)
end
end

local specification = {
name= "sqtfm",
description = "test",
manipulators = {
base = squeeze,
node = squeeze,
}
}

fonts.handlers.otf.features.register(specification)

fonts.handlers.otf.addfeature {
name = "stest",
type = "substitution",
data = {
a = "X",
b = "P",
}
}
\stopluacode

\definefontfeature[forceno]
  [mode=node,
   script=latn]


\definefontfeature[forceyes]
  [mode=node,
   script=latn,
   % % smcp=force,
   sqtfm=force,
   stest=force]
   % % smcp=yes,
   % sqtfm=yes,
   % stest=yes]

\showglyphs

\startTEXpage[offset=1em]
\definedfont[texgyretermes-regular*forceyes]
% \definedfont[texgyretermes-regular*forceno]
% \addfeature{forceyes}

abcdefg
\stopTEXpage
==

So only the local-function feature appears to exhibit this inconsistency.

What is the explanation for this inconsistent behavior?
Is there a way to get the expected result for \addfeature etc.?

Thank you in advance.

Best wishes
Idris

--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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
___

Re: [NTG-context] move glyph vertically

2022-12-22 Thread Hans Hagen via ntg-context

On 12/22/2022 12:54 PM, Pablo Rodriguez via ntg-context wrote:

Dear list,

I have the following sample:

   \startluacode
fonts.handlers.otf.addfeature {
name = "gpos_test",
type = "single",
data = {
  [ '¿' ] = 1000,
  [ '¡' ] = 1000,
}
}
   \stopluacode
   \definefontfeature[ktest][gpost_tes=yes]

   \starttext
   \startTEXpage[offset=1em]
   \feature[+][gpos_test]
   ¿? ¡!
   \stopTEXpage
   \stoptext

This tries to move vertically the opening question and exclamation
marks, so they are at the same height that its closing counterparts.

I thought there may be a GPOS feature that could achieve this, but I
must admit I have no idea about how to achive it.

In my document, this should only work with the slanted feature.

Could anyone tell me how could I move vertically single glyphs?

Many thanks for your help,

typos

  \definefontfeature[ktest][gpost_tes=yes]

and wrong feature name

  \feature[+][gpos_test]

so:

\startluacode
   fonts.handlers.otf.addfeature {
   name = "gpos_test",
   type = "single",
   data = {
 [ '¿' ] = { 0, 400 },
 [ '¡' ] = { 0, 400 },
   }
   }
\stopluacode

\definefontfeature[ktest][gpos_test=yes]

\starttext
  \startTEXpage[offset=1em]
  \ruledhbox{¿? xx ¡!}
  \addfeature{ktest}
  \ruledhbox{¿? xx ¡!}
  \stopTEXpage
\stoptext



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


Re: [NTG-context] STIX2 font issues with freshly installed LMTX

2022-01-05 Thread Heinrich Paeßens via ntg-context
Hi there

Issue solved by deleting the context-internal fonts and recurring on the 
system-wide installed fonts … never mind ;-)

 
<https://www.dropbox.com/s/g31kwg14tcs5621/Untitled_Test%20-compressed.pdf?dl=0>

Happy New Year
Heinrich

> 
>> On 3 Jan 2022, at 21:46, Heinrich Paeßens > <mailto:paess...@me.com>> wrote:
>>> 
>>> Hi there
>>> 
>>> as a newcomer in ConTeXt I installed according to 
>>> 
>>> https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS/ 
>>> <https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS/>
>>> 
>>> and using TeXShop on macos as advised.
>>> 
>>> However, I like to use STIX2-Fonts for Text and Math and hence my MWE to 
>>> test which fonts are going to be embedded (CLI pdffonts):
>>> 
>>> -
>>> \setupbodyfont[stixtwo]
>>> \starttext
>>> 
>>> Test ß 1lIjJuQ \% § \& ?! VERSAL-ẞ- \|> --- 1234567890 --- //
>>> 
>>> \placeformula[eqn:def-m]
>>> \startformula
>>> m = \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
>>> \stopformula
>>> \stoptext
>>> -
>>> 
>>> Unfortunately the compiler throws an error — why is there a check of 
>>> STIX2-fonts versions, why is that important?
>>> 
>>> I checked and found 
>>> 
>>> /Users/hp/Library/Fonts/STIXTwoText-Regular.otf Version 2.12 b168
>>> /Users/hp/Library/context-osx-64/tex/texmf/fonts/opentype/public/stix2-otf/STIXTwoText-Regular.otf
>>>  Version 2.11 b159
>>> 
>>> Could you please advise for a work around?
>>> 
>>> from the log:
>>> 
>>> -
>>> fonts   > otf loading > loading 'stixtwotext-regular.otf', hash 
>>> 'stixtwotext-regular'
>>> otf reader  > unknown version '
>>> 
>>> 
>>> 
>>> ' in file 'stixtwotext-regular.otf'
>>> fonts   > otf loading > loading done
>>> fonts   > otf loading > saving 'stixtwotext-regular.otf' in cache
>>> system  > lua > compiling 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
>>>  into 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
>>> system  > lua > dumping 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
>>>  into 
>>> '/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
>>>  stripped
>>> fonts   > otf loading > loading, optimizing, packing and caching 
>>> time 0.002
>>> lua error   > lua error on line 1 in file ./Untitled.tex:
>>> 
>>> registered function call [1129]: 
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: attempt to 
>>> index a nil value (upvalue 'descriptions')
>>> stack traceback:
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: in 
>>> local 'prepare_ligature'
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:770: in 
>>> upvalue 'addfeature'
>>> ...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:899: in 
>>> local 'enhancer'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1269: in 
>>> upvalue 'enhance'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1291: in 
>>> field 'apply'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:263: in 
>>> field 'load'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:602: in 
>>> upvalue 'otftotfm'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:630: in 
>>> function <...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:629>
>>> (...tail calls...)
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:378: in 
>>> function <...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:366>
>>> (...tail calls...)
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:484: in 
>>> field 'read'
>>> ...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1336: in 
>>> function <...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1193>
>>> (...tail calls...)
>>>  1 >>  \setupbodyfont[stixtwo]
>>> -
>>> 
>>> Many thanks for your support.
>>> Kind regards
>>> 
>>> Heinrich Paeßens 
>>> Mobile +49 1512 123 9876 
>>> Business Card 
>>> <https://www.paessens.tel/img/heinrich-paessens_bc-2021-03-11_signed.pdf>
>>> 
>> 
> 

___
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] STIX2 font issues with freshly installed FMTX

2022-01-03 Thread Heinrich Paeßens via ntg-context
Hi there

as a newcomer in ConTeXt I installed according to 

https://wiki.contextgarden.net/Installing_ConTeXt_LMTX_on_MacOS/

and using TeXShop on macos as advised.

However, I like to use STIX2-Fonts for Text and Math and hence my MWE to test 
which fonts are going to be embedded (CLI pdffonts):

-
\setupbodyfont[stixtwo]
\starttext

Test ß 1lIjJuQ \% § \& ?! VERSAL-ẞ- \|> --- 1234567890 --- //

\placeformula[eqn:def-m]
\startformula
m = \frac{m_0}{\sqrt{1-\frac{v^2}{c^2}}}
\stopformula
\stoptext
-

Unfortunately the compiler throws an error — why is there a check of 
STIX2-fonts versions, why is that important?

I checked and found 

/Users/hp/Library/Fonts/STIXTwoText-Regular.otf Version 2.12 b168
/Users/hp/Library/context-osx-64/tex/texmf/fonts/opentype/public/stix2-otf/STIXTwoText-Regular.otf
 Version 2.11 b159

Could you please advise for a work around?

from the log:

-
fonts   > otf loading > loading 'stixtwotext-regular.otf', hash 
'stixtwotext-regular'
otf reader  > unknown version '



' in file 'stixtwotext-regular.otf'
fonts   > otf loading > loading done
fonts   > otf loading > saving 'stixtwotext-regular.otf' in cache
system  > lua > compiling 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
 into 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
system  > lua > dumping 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tma'
 into 
'/Users/hp/Library/context-osx-64/tex/texmf-cache/luametatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/otl/stixtwotext-regular.tmd'
 stripped
fonts   > otf loading > loading, optimizing, packing and caching time 
0.002
lua error   > lua error on line 1 in file ./Untitled.tex:

registered function call [1129]: 
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: attempt to 
index a nil value (upvalue 'descriptions')
stack traceback:
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:325: in 
local 'prepare_ligature'
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:770: in 
upvalue 'addfeature'
...-64/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:899: in 
local 'enhancer'
...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1269: in 
upvalue 'enhance'
...-64/tex/texmf-context/tex/context/base/mkxl/font-con.lmt:1291: in 
field 'apply'
...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:263: in 
field 'load'
...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:602: in 
upvalue 'otftotfm'
...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:630: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/font-otl.lmt:629>
(...tail calls...)
...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:378: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:366>
(...tail calls...)
...-64/tex/texmf-context/tex/context/base/mkxl/font-def.lmt:484: in 
field 'read'
...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1336: in 
function <...-64/tex/texmf-context/tex/context/base/mkxl/font-ctx.lmt:1193>
(...tail calls...)
 1 >>  \setupbodyfont[stixtwo]
-

Many thanks for your support.
Kind regards

Heinrich Paeßens 
Mobile +49 1512 123 9876 
Business Card 
<https://www.paessens.tel/img/heinrich-paessens_bc-2021-03-11_signed.pdf>

___
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] font feature

2021-07-08 Thread Hans Hagen

On 7/8/2021 9:46 AM, Thomas A. Schmitz wrote:


Hi all,

is it possible to subtract a featureset that has been applied to a 
fontfamily? MWE:


\definefontfeature
   [f:frac]
   [frac=yes,onum=no,pnum=no]

\definefontfeature
   [f:onum]
   [onum=yes,pnum=yes]

\definefontfamily [test] [serif] [AntykwaTorunska] [features=f:onum]
\definefontfamily [test] [sans]  [Myriad Pro]
\definefontfamily [test] [mono]  [DejaVu Sans Mono]
\definefontfamily [test] [math]  [Xits Math]

\setupbodyfont[test,12pt]

\starttext

Mozarts erster Satz ist ein
{\subtractfeature[f:test]\addfeature[f:frac]4/4}-Takt, Beethoven wählt 
einen Dreiertakt, Mozarts Romanze ist ein 3/8-Takt, Beethoven wählt 
einen 2/4,
Mozarts Rondo ist eine Gavotte im 2/2-Takt, Beethoven schreibt ein 
Jagdrondo im 6/8-Takt.


\stoptext

If I comment out the part [features=f:onum], I get the fractions that 
I'm looking for, but it seems that I can't get the same effect with 
\subtractfeature and \addfeature. I'm confused...
you forgot the 'default' so you basically force basemode which is does 
permanent features .. add/subtract works only in node mode


\definefontfeature
  [f:onum]
  [onum=yes,pnum=yes]

\definefontfamily [test] [serif] [AntykwaTorunska] 
[features={default,f:onum}]

\definefontfamily [test] [sans]  [Myriad Pro]
\definefontfamily [test] [mono]  [DejaVu Sans Mono]
\definefontfamily [test] [math]  [Xits Math]

\setupbodyfont[test,12pt]

\starttext
test 1 2 3 test 1/2 \subtractfeature[f:onum] test 1 2 3 test 1/2
\stoptext




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


[NTG-context] font feature

2021-07-08 Thread Thomas A. Schmitz


Hi all,

is it possible to subtract a featureset that has been applied to a 
fontfamily? MWE:


\definefontfeature
  [f:frac]
  [frac=yes,onum=no,pnum=no]

\definefontfeature
  [f:onum]
  [onum=yes,pnum=yes]

\definefontfamily [test] [serif] [AntykwaTorunska] [features=f:onum]
\definefontfamily [test] [sans]  [Myriad Pro]
\definefontfamily [test] [mono]  [DejaVu Sans Mono]
\definefontfamily [test] [math]  [Xits Math]

\setupbodyfont[test,12pt]

\starttext

Mozarts erster Satz ist ein
{\subtractfeature[f:test]\addfeature[f:frac]4/4}-Takt, Beethoven wählt 
einen Dreiertakt, Mozarts Romanze ist ein 3/8-Takt, Beethoven wählt 
einen 2/4,
Mozarts Rondo ist eine Gavotte im 2/2-Takt, Beethoven schreibt ein 
Jagdrondo im 6/8-Takt.


\stoptext

If I comment out the part [features=f:onum], I get the fractions that 
I'm looking for, but it seems that I can't get the same effect with 
\subtractfeature and \addfeature. I'm confused...


Thanks and all best

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


Re: [NTG-context] oldstyle numerals in STIX Two Math

2020-10-21 Thread Alan Bowen
Thanks, Hraban.That’s a helpful start

 I guess the challenge now is to get STIX Two Math to use the oldstyle
numerals in STIX Two Text (by adapting code that Wolgang gave me for using
 oldstyle numerals with TexGyre Math). When I ran

mtxrun --script fonts --list --info stixtwotext, I got

mtx-fonts   |   onum cyrl dflt

mtx-fonts   |dflt dflt

mtx-fonts   |grek dflt

mtx-fonts   |latn dflt rom trk

Sadly, I have no idea what this means or how it might help in identifying
the Unicode range of the oldstyle numerals in STIX Two Text. And that is
something I need to take advantage of Wolfgang’s code.

Alan


On Wed, Oct 21, 2020 at 10:31 AM Henning Hraban Ramm  wrote:

>
>
> > Am 21.10.2020 um 15:59 schrieb Alan Bowen :
> >
> > I am trying to get the STIX Two fonts to display oldstyle numerals.
> >
> > I have the oldstyle numerals in STIX Two Text, the problem is the math
> font.
> >
> > So far, my mwe is:
> > \definefontfamily[mainface][rm][STIX Two Text][] %onum=yes does not seem
> to work
> > \definefontfamily[mainface][mm][STIX Two Math][]
> > \definefontfeature[f:oldstyle][onum=yes]
> >
> > \setupbodyfont[mainface, 18pt]
> > \addfeature{f:oldstyle}
> >
> > \starttext
> > 123456789
> > \blank[big]
> > $\sqrt{2} + 1234$
> > \stoptext
> >
> > Any pointers will be greatly appreciated.
>
> mtxrun --script fonts --list --info stixtwomath
>
> shows that STIX Two Math doesn’t provide the onum feature.
>
> Hraban
>
> ___
> 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
>
> ___
>
___
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] oldstyle numerals in STIX Two Math

2020-10-21 Thread Henning Hraban Ramm


> Am 21.10.2020 um 15:59 schrieb Alan Bowen :
> 
> I am trying to get the STIX Two fonts to display oldstyle numerals. 
> 
> I have the oldstyle numerals in STIX Two Text, the problem is the math font.
> 
> So far, my mwe is:
> \definefontfamily[mainface][rm][STIX Two Text][] %onum=yes does not seem to 
> work
> \definefontfamily[mainface][mm][STIX Two Math][]
> \definefontfeature[f:oldstyle][onum=yes]
> 
> \setupbodyfont[mainface, 18pt]
> \addfeature{f:oldstyle}
> 
> \starttext
> 123456789
> \blank[big]
> $\sqrt{2} + 1234$
> \stoptext
> 
> Any pointers will be greatly appreciated.

mtxrun --script fonts --list --info stixtwomath

shows that STIX Two Math doesn’t provide the onum feature.

Hraban
___
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] oldstyle numerals in STIX Two Math

2020-10-21 Thread Alan Bowen
I am trying to get the STIX Two fonts to display oldstyle numerals.

I have the oldstyle numerals in STIX Two Text, the problem is the math font.

So far, my mwe is:
\definefontfamily[mainface][rm][STIX Two Text][] %onum=yes does not seem to
work
\definefontfamily[mainface][mm][STIX Two Math][]
\definefontfeature[f:oldstyle][onum=yes]

\setupbodyfont[mainface, 18pt]
\addfeature{f:oldstyle}

\starttext
123456789
\blank[big]
$\sqrt{2} + 1234$
\stoptext

Any pointers will be greatly appreciated.

Alan
___
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] issue with optical bounds (OpenType)

2018-12-09 Thread Hans Hagen

On 12/9/2018 1:34 PM, Pablo Rodriguez wrote:

On 12/7/18 11:25 PM, Hans Hagen wrote:

On 12/7/2018 9:14 PM, Pablo Rodriguez wrote:

[...]
The issue is that, although opbd values are used, that results from opbd
and from single placement in addfeature are different (although LuaTeX
reports the same values for lfbd).


because you implement it as kerning and not as opbd (protrusion is not
kerning) ... you can try to change the name to "lfbd" (if you would
enable lfbd as feature for sure you would get funny kerning so opbd
picks up from those instead)


If protrusion has to apply other values than the ones besides opbd, the
values for optical bounds aren’t reliable for accurate glyph
positioning. Sorry, but otherwise there is no need for optical margins
in OpenType (standard protrusion would be all that is needed).

Kerning might be selectively applied, such as in:

 \startluacode
 fonts.handlers.otf.addfeature {
 name = "leftbounds",
 type = "single",
 data = {
 Ἠ = { -212, 0, -212, 0 },
 Ὧ = { -196, 0, -196, 0 },
 }
 }
 \stopluacode
 \definefontfeature[default][default][protrusion=quality]
 \definefontfeature[leftbounds][leftbounds=yes]
 \setupfirstline
[alternative=word, n=1, style={\feature[+][leftbounds]}]
 \showframe
 \setuplayout[page]
 \definefontfamily[mainface][rm][Typographica Old Standard]
 \definefontfamily[mainface][tt][Latin Modern Mono]
 \setupbodyfont[mainface, 300pt]
 \setupalign[hanging]
 \startbuffer
 «a\par
 «b\par
 Ω\par
 Ὧ\par
 Ἠ\par
 \stopbuffer
 \starttext
 \setupparagraphintro[each][\setfirstline]
 \getbuffer
 \stoptext

At least to get Greek hanging diacritics, I think this is the way to go.
It would be extremely useful to enable a \setuplineintro for verse.

It would be also useful to have a function that substracts the width of
two given glyphs. (This is exactly the amount to get hanging diacritics
properly kerned.)

you confuse mechanism:

- protrusion only happen at the start and end of the line
- kerning (like single does) happens everywhere

so, you need to extend "lfbd" and not use some own kerning feature 
"leftbounds" which applyu it everywhere while "lfbd" is treated special 
i.e. sets the protrusion values (when "opbd" is enabled) ... no other 
way to do this


Hans

-
  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] issue with optical bounds (OpenType)

2018-12-09 Thread Pablo Rodriguez
On 12/7/18 11:25 PM, Hans Hagen wrote:
> On 12/7/2018 9:14 PM, Pablo Rodriguez wrote:
>> [...]
>> The issue is that, although opbd values are used, that results from opbd
>> and from single placement in addfeature are different (although LuaTeX
>> reports the same values for lfbd).
> 
> because you implement it as kerning and not as opbd (protrusion is not 
> kerning) ... you can try to change the name to "lfbd" (if you would 
> enable lfbd as feature for sure you would get funny kerning so opbd 
> picks up from those instead)

If protrusion has to apply other values than the ones besides opbd, the
values for optical bounds aren’t reliable for accurate glyph
positioning. Sorry, but otherwise there is no need for optical margins
in OpenType (standard protrusion would be all that is needed).

Kerning might be selectively applied, such as in:

\startluacode
fonts.handlers.otf.addfeature {
name = "leftbounds",
type = "single",
data = {
Ἠ = { -212, 0, -212, 0 },
Ὧ = { -196, 0, -196, 0 },
}
}
\stopluacode
\definefontfeature[default][default][protrusion=quality]
\definefontfeature[leftbounds][leftbounds=yes]
\setupfirstline
   [alternative=word, n=1, style={\feature[+][leftbounds]}]
\showframe
\setuplayout[page]
\definefontfamily[mainface][rm][Typographica Old Standard]
\definefontfamily[mainface][tt][Latin Modern Mono]
\setupbodyfont[mainface, 300pt]
\setupalign[hanging]
\startbuffer
«a\par
«b\par
Ω\par
Ὧ\par
Ἠ\par
\stopbuffer
\starttext
\setupparagraphintro[each][\setfirstline]
\getbuffer
\stoptext

At least to get Greek hanging diacritics, I think this is the way to go.
It would be extremely useful to enable a \setuplineintro for verse.

It would be also useful to have a function that substracts the width of
two given glyphs. (This is exactly the amount to get hanging diacritics
properly kerned.)

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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] issue with optical bounds (OpenType)

2018-12-07 Thread Hans Hagen

On 12/7/2018 9:14 PM, Pablo Rodriguez wrote:

On 12/7/18 8:15 PM, Hans Hagen wrote:

On 12/7/2018 7:54 PM, Pablo Rodriguez wrote:

Shouldn’t be the output from both methods be exactly the same?


maybe you need to choose a script and/or language


Many thanks for your reply, Hans.

I modified the font myself and the Greek script is required and selected
(with the Latin script, that OT opbd property doesn’t work at all).

The issue is that, although opbd values are used, that results from opbd
and from single placement in addfeature are different (although LuaTeX
reports the same values for lfbd).
because you implement it as kerning and not as opbd (protrusion is not 
kerning) ... you can try to change the name to "lfbd" (if you would 
enable lfbd as feature for sure you would get funny kerning so opbd 
picks up from those instead)



Hans

-
  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] issue with optical bounds (OpenType)

2018-12-07 Thread Pablo Rodriguez
On 12/7/18 8:15 PM, Hans Hagen wrote:
> On 12/7/2018 7:54 PM, Pablo Rodriguez wrote:
>> Shouldn’t be the output from both methods be exactly the same?
> 
> maybe you need to choose a script and/or language

Many thanks for your reply, Hans.

I modified the font myself and the Greek script is required and selected
(with the Latin script, that OT opbd property doesn’t work at all).

The issue is that, although opbd values are used, that results from opbd
and from single placement in addfeature are different (although LuaTeX
reports the same values for lfbd).

Just in case it helps,

Pablo
-- 
http://www.ousia.tk
___
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] Problem loading font KFGQPC Uthman Taha Naskh font

2016-08-21 Thread Hans Hagen

On 8/21/2016 12:53 PM, Mohammad Hossein Bateni wrote:

Hello,

The code snippet at the end used to work a few months ago when I
reported a rendering bug.  But now the font does not load and I see the
following error.  (It's not an issue with simplefonts because
\definedfont[KFGQPCUthmanTahaNaskh*arabic] does not work either.  the
font is published here
<http://fonts.qurancomplex.gov.sa/wp-content/uploads/2012/06/UthmanTN1-Ver10.zip>.


no error here



close source> 3 > 4 >
/Users/bateni/context/tex/texmf-modules/tex/context/third/simplefonts/t-simplefonts.mkiv

lua error   > lua error on line 4 in file /private/tmp/test-q.tex:

...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: bad
argument #2 to '__div' (invalid replacement value)
stack traceback:
[C]: in function '__div'
...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: in
function 'splitter'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:159: in
function 'addfeature'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:730: in
function 'enhancer'
...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1269: in
function 'enhance'
...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1291: in
function 'apply'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:246: in
function 'load'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:538: in
function 'otftotfm'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:566: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:565>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:304: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:492: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:418: in
function 'read'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1172: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1059>
(...tail calls...)

 1 \setuppapersize[A5]
 2
 3 \usemodule[simplefonts]
 4 >>  \setmainfont[KFGQPC Uthman Taha Naskh][features=arabic,range=arabic]
 5 \setcharacterstripping[1]
 6 \setupinterlinespace[line=7ex]
 7
 8 \setupdirections[bidi=on,method=one]
 9 \setupalign[r2l]
10
11
12 \starttext
13
14 \tfb


Thanks,
~MHB
On Sat, Apr 30, 2016 at 1:06 PM, Hans Hagen <pra...@wxs.nl
<mailto:pra...@wxs.nl>> wrote:

On 4/29/2016 12:00 PM, Mohammad Hossein Bateni wrote:

Actually the MWE may help:

\usemodule[simplefonts]
\setmainfont[KFGQPC Uthman Taha Naskh][features=arabic,range=arabic]
\setcharacterstripping[1]

\setupdirections[bidi=on,method=one]
\setupalign[r2l]

\starttext
\tfb

الْحَمْدُ

\stoptext


i made a fix but as i'm on a very slow line i'm not sure when an
update is on the garden

Hans


-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
  tel: 038 477 53 69 | www.pragma-ade.com
<http://www.pragma-ade.com> | www.pragma-pod.nl
<http://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 <mailto:ntg-context@ntg.nl> /
http://www.ntg.nl/mailman/listinfo/ntg-context
<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/
<http://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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___




--

-
  Hans Hagen | PRAGMA ADE
  Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
   tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
-
___
If yo

[NTG-context] Problem loading font KFGQPC Uthman Taha Naskh font

2016-08-21 Thread Mohammad Hossein Bateni
Hello,

The code snippet at the end used to work a few months ago when I reported a
rendering bug.  But now the font does not load and I see the following
error.  (It's not an issue with simplefonts because
\definedfont[KFGQPCUthmanTahaNaskh*arabic] does not work either.  the font
is published here
<http://fonts.qurancomplex.gov.sa/wp-content/uploads/2012/06/UthmanTN1-Ver10.zip>
.


close source> 3 > 4 >
/Users/bateni/context/tex/texmf-modules/tex/context/third/simplefonts/t-simplefonts.mkiv

lua error   > lua error on line 4 in file /private/tmp/test-q.tex:

...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: bad
argument #2 to '__div' (invalid replacement value)
stack traceback:
[C]: in function '__div'
...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: in
function 'splitter'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:159: in
function 'addfeature'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:730: in
function 'enhancer'
...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1269: in
function 'enhance'
...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1291: in
function 'apply'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:246: in
function 'load'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:538: in
function 'otftotfm'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:566: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:565>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:304: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:492: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:418: in
function 'read'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1172: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1059>
(...tail calls...)

 1 \setuppapersize[A5]
 2
 3 \usemodule[simplefonts]
 4 >>  \setmainfont[KFGQPC Uthman Taha Naskh][features=arabic,range=arabic]
 5 \setcharacterstripping[1]
 6 \setupinterlinespace[line=7ex]
 7
 8 \setupdirections[bidi=on,method=one]
 9 \setupalign[r2l]
10
11
12 \starttext
13
14 \tfb


Thanks,
~MHB
On Sat, Apr 30, 2016 at 1:06 PM, Hans Hagen <pra...@wxs.nl> wrote:

> On 4/29/2016 12:00 PM, Mohammad Hossein Bateni wrote:
>
>> Actually the MWE may help:
>>
>> \usemodule[simplefonts]
>> \setmainfont[KFGQPC Uthman Taha Naskh][features=arabic,range=arabic]
>> \setcharacterstripping[1]
>>
>> \setupdirections[bidi=on,method=one]
>> \setupalign[r2l]
>>
>> \starttext
>> \tfb
>>
>> الْحَمْدُ
>>
>> \stoptext
>>
>
> i made a fix but as i'm on a very slow line i'm not sure when an update is
> on the garden
>
> Hans
>
>
> -
>   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/list
> info/ntg-context
> webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
> archive  : http://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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Error in loading font Samim

2016-08-07 Thread Mohammad Hossein Bateni
Please ignore my last message.  It seems to be working fine now.  Probably
a bad setup on my part.  I will ping again if I run into the same issue
again.

On Sun, Aug 7, 2016 at 10:12 PM, Mohammad Hossein Bateni <bat...@gmail.com>
wrote:

> Hello,
>
> I believe this worked fine in June's beta but now gives an error.
>
>
> \starttext
> \definedfont[Samim]
> سلام
> \stoptext
>
>
> I got the font originally from here
> <https://github.com/rastikerdar/samim-font/releases/download/v0.11.0/samim-font-v0.11.0.zip>,
> but then removed the MATH table because it was causing an error at the time
> to get the attached version.
>
> Now the above code gives the following error:
>
>
> ...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: bad
> argument #2 to '__div' (invalid replacement value)
> stack traceback:
> [C]: in function '__div'
> ...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: in
> function 'splitter'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:159: in
> function 'addfeature'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:730: in
> function 'enhancer'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1269: in
> function 'enhance'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1291: in
> function 'apply'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:246: in
> function 'load'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:538: in
> function 'otftotfm'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:566: in
> function <...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:565>
> (...tail calls...)
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:304: in
> function 'loadfont'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:492: in
> function 'loadfont'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:418: in
> function 'read'
> ...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1172: in
> function <...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.
> lua:1059>
>
>
> Could you advise me on how to get over this issue?  As far as I know, the
> font lacks Latin characters and is restricted to the Arabic/Farsi
> characters.  In a more complicated example, I used dejavusans as fallback
> but the above MWE seemed fine, as far as I remember.
>
> Thanks,
> MHB
>
>
>
>
___
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] Error in loading font Samim

2016-08-07 Thread Mohammad Hossein Bateni
Hello,

I believe this worked fine in June's beta but now gives an error.


\starttext
\definedfont[Samim]
سلام
\stoptext


I got the font originally from here
<https://github.com/rastikerdar/samim-font/releases/download/v0.11.0/samim-font-v0.11.0.zip>,
but then removed the MATH table because it was causing an error at the time
to get the attached version.

Now the above code gives the following error:


...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: bad
argument #2 to '__div' (invalid replacement value)
stack traceback:
[C]: in function '__div'
...ntext/tex/texmf-context/tex/context/base/mkiv/l-lpeg.lua:290: in
function 'splitter'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:159: in
function 'addfeature'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otc.lua:730: in
function 'enhancer'
...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1269: in
function 'enhance'
...ext/tex/texmf-context/tex/context/base/mkiv/font-con.lua:1291: in
function 'apply'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:246: in
function 'load'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:538: in
function 'otftotfm'
...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:566: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-otl.lua:565>
(...tail calls...)
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:304: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:492: in
function 'loadfont'
...ext/tex/texmf-context/tex/context/base/mkiv/font-def.lua:418: in
function 'read'
...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1172: in
function <...ext/tex/texmf-context/tex/context/base/mkiv/font-ctx.lua:1059>


Could you advise me on how to get over this issue?  As far as I know, the
font lacks Latin characters and is restricted to the Arabic/Farsi
characters.  In a more complicated example, I used dejavusans as fallback
but the above MWE seemed fine, as far as I remember.

Thanks,
MHB


Samim.ttf
Description: application/font-ttf
___
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] Problems with ttc-fonts

2016-05-01 Thread Hans Hagen

On 4/29/2016 9:51 AM, Ulrike Fischer wrote:

I was playing with the addfeature handler mentioned here
https://mailman.ntg.nl/pipermail/ntg-context/2016/083952.html and
run into a problem with ttc-fonts:

\starttext
\directlua{
fonts.handlers.otf.addfeature {
name = "oneb",
{
type = "substitution",
data = {
["1"] = "period",
},
},
"feature test",
}
}
\font\test= name:LatinModernRoman:+oneb \test

1234567890

\font\test= name:cambria:+oneb \test

1234567890

\stoptext

This gives:

.234567890
p234567890

So with latin modern it works fine, while with cambria the first
letter of the substituation is used.


I found the reason for that (side effect of utf conversion that takes 
the first character) of 'period'.



The used fonts are:

filename=lmroman10-bold.otf filetype=otf format=otf
foundname=D:/context-minimals/context/tex/texmf/fonts/opentype/public/lm/lmroman10-bold.otf
usedmethod=database

filename=c:/windows/fonts/cambria.ttc format=ttc
foundname=c:/windows/fonts/cambria.ttc usedmethod=direct

(I have no idea why the bold version of lm is used, but I don't care
now)

Looking at the tma I see one difference between both fonts:
glyphs in cambria have no "name". A typical entry looks like this

  [46]={
   ["boundingbox"]={ 109, 0, 311, 232 },
   ["index"]=484,
   ["unicode"]=46,
   ["width"]=420,
  },

while with latin modern it looks like this:

  [46]={
   ["boundingbox"]={ 81, 0, 237, 156 },
   ["index"]=88,
   ["name"]="period",
   ["unicode"]=46,
   ["width"]=319,
  },

Is is normal that glyph of ttc-fonts have no name data? If yes how
should one do substituations in such fonts?


i need to check it but some fonts have no sane glyph names (so we 
discard them) and there is also an standard name set (so no need for 
names then).


I uploaded a version that fixes the 'p' issue and falls back on agl 
names as well.


Hans

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

Re: [NTG-context] Problems with ttc-fonts

2016-04-29 Thread Hans Hagen

On 4/29/2016 9:51 AM, Ulrike Fischer wrote:

I was playing with the addfeature handler mentioned here
https://mailman.ntg.nl/pipermail/ntg-context/2016/083952.html and
run into a problem with ttc-fonts:

\starttext
\directlua{
fonts.handlers.otf.addfeature {
name = "oneb",
{
type = "substitution",
data = {
["1"] = "period",
},
},
"feature test",
}
}
\font\test= name:LatinModernRoman:+oneb \test

1234567890

\font\test= name:cambria:+oneb \test

1234567890

\stoptext

This gives:

.234567890
p234567890

So with latin modern it works fine, while with cambria the first
letter of the substituation is used.

The used fonts are:

filename=lmroman10-bold.otf filetype=otf format=otf
foundname=D:/context-minimals/context/tex/texmf/fonts/opentype/public/lm/lmroman10-bold.otf
usedmethod=database

filename=c:/windows/fonts/cambria.ttc format=ttc
foundname=c:/windows/fonts/cambria.ttc usedmethod=direct

(I have no idea why the bold version of lm is used, but I don't care
now)

Looking at the tma I see one difference between both fonts:
glyphs in cambria have no "name". A typical entry looks like this

  [46]={
   ["boundingbox"]={ 109, 0, 311, 232 },
   ["index"]=484,
   ["unicode"]=46,
   ["width"]=420,
  },

while with latin modern it looks like this:

  [46]={
   ["boundingbox"]={ 81, 0, 237, 156 },
   ["index"]=88,
   ["name"]="period",
   ["unicode"]=46,
   ["width"]=319,
  },

Is is normal that glyph of ttc-fonts have no name data? If yes how
should one do substituations in such fonts?


you can use the unicode number instead (unless i made a mistake)

Hans

-
  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] Problems with ttc-fonts

2016-04-29 Thread Ulrike Fischer
I was playing with the addfeature handler mentioned here
https://mailman.ntg.nl/pipermail/ntg-context/2016/083952.html and
run into a problem with ttc-fonts:

\starttext
\directlua{
fonts.handlers.otf.addfeature {
name = "oneb",
{
type = "substitution",
data = {
["1"] = "period",
},
},
"feature test",
}
}
\font\test= name:LatinModernRoman:+oneb \test

1234567890

\font\test= name:cambria:+oneb \test

1234567890

\stoptext

This gives:

.234567890
p234567890

So with latin modern it works fine, while with cambria the first
letter of the substituation is used. 

The used fonts are:

filename=lmroman10-bold.otf filetype=otf format=otf
foundname=D:/context-minimals/context/tex/texmf/fonts/opentype/public/lm/lmroman10-bold.otf
usedmethod=database

filename=c:/windows/fonts/cambria.ttc format=ttc
foundname=c:/windows/fonts/cambria.ttc usedmethod=direct

(I have no idea why the bold version of lm is used, but I don't care
now)

Looking at the tma I see one difference between both fonts:
glyphs in cambria have no "name". A typical entry looks like this

  [46]={
   ["boundingbox"]={ 109, 0, 311, 232 },
   ["index"]=484,
   ["unicode"]=46,
   ["width"]=420,
  },  

while with latin modern it looks like this:

  [46]={
   ["boundingbox"]={ 81, 0, 237, 156 },
   ["index"]=88,
   ["name"]="period",
   ["unicode"]=46,
   ["width"]=319,
  },
  
Is is normal that glyph of ttc-fonts have no name data? If yes how
should one do substituations in such fonts? 



-- 
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] adding font feature tnum in the TOC

2016-03-29 Thread Willi Egger
Hello Wolfgang,

indeed if one uses pagella it is true what you say.
If I use Seravek, which has oldstuyle figures also, then it does not work in 
the same way.

I tested with \addfeature[oldstyle] which is defined as 
\definefontfeature[oldstyle][default][sript=latn,onum=yes]

With this feature enabled I get oldstyle figures in the text but proportional 
numbers in de TOC, not oldstyle.

Normally I have oldstyle not enabled. So when i use the + instead of the = then 
I get tabular figures.

May be that there is something organized differently in the two fonts?

Thank you for your solution.

Willi

> On 29 mrt. 2016, at 20:36, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:
> 
>> Willi Egger 29. März 2016 um 20:29
>> Hello Wolfgang,
>> 
>> I used your solution. However I think instead of an “=“ it should be “+”.
> No, the = was intentional because I had to get rid of the onum setting.
> 
> 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  : http://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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] adding font feature tnum in the TOC

2016-03-29 Thread Wolfgang Schuster

Willi Egger <mailto:cont...@boede.nl>
29. März 2016 um 20:38
I underrstand this, however then I do not get tabular figures…

Do you want them for oldstyle figures or lining figures.

\definefontfeature [onum+pnum] [onum=yes,lnum=no,pnum=yes,tnum=no]
\definefontfeature [onum+tnum] [onum=yes,lnum=no,pnum=no,tnum=yes]
\definefontfeature [lnum+pnum] [onum=no,lnum=yes,pnum=yes,tnum=no]
\definefontfeature [lnum+tnum] [onum=no,lnum=yes,pnum=no,tnum=yes]

\setupbodyfont[pagella]

\starttext

\starttabulate[|f{\addfeature{onum+pnum}}r|f{\addfeature{onum+tnum}}r|f{\addfeature{lnum+pnum}}r|f{\addfeature{lnum+tnum}}r|]
\dorecurse{100}{\NC \vrule\threedigits{##1}\vrule \NC 
\vrule\threedigits{##1}\vrule \NC \vrule\threedigits{##1}\vrule \NC 
\vrule\threedigits{##1}\vrule \NC\NR}

\stoptabulate

\stoptext

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

Re: [NTG-context] adding font feature tnum in the TOC

2016-03-29 Thread Willi Egger
Hello Wolfgang,

I used your solution. However I think instead of an “=“ it should be “+”.

I wikified this issue.

Kind regards

Willi
> On 29 mrt. 2016, at 17:48, Willi Egger <cont...@boede.nl> wrote:
> 
> Wolfgang!
> 
> Many thanks for this! - I get the result I wanted to.
> 
> Kind regards
> 
> Willi
>> On 29 mrt. 2016, at 17:33, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
>> wrote:
>> 
>>> Willi Egger  29. März 2016 um 15:11
>>> Hi,
>>> 
>>> hm, I am a little puzzled…
>>> 
>>> If I am correct then one should be able to enable the font feature tnum for 
>>> the page-numbers with “pagecommand=“.
>>> 
>>> I have 
>>> 
>>> \setuphead
>>> [section]
>>> [aftersection=\page, textstyle=\bfd, numberstyle=\bfd, align=middle, 
>>> after={\godown[-1\lineheight]}, number=no]
>>> 
>>> \setuplist[section][pagecommand={\addfeature[tnum]#1\subtractfeature[tnum]}]
>>> 
>>> However if I do this then I get the pagenumber prefixed with ‘section’ e.g. 
>>> 
>>> bbb bar buch bühne section3
>>> 
>>> What am I doing in the wrong way?
>> \setuplist[chapter][pagestyle={\feature[=][tabularnumbers]}]
>> 
>> \definefontfeature[default][default][onum=yes]
>> 
>> \setupbodyfont[pagella]
>> 
>> \starttext
>> 
>> \setcounter[userpage][100]
>> 
>> \completecontent
>> 
>> \dorecurse{20}{\expanded{\chapter{Chapter \recurselevel}}}
>> 
>> \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
>> ___
> 
> ___
> 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
> ___

___
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] adding font feature tnum in the TOC

2016-03-29 Thread Willi Egger
Wolfgang!

Many thanks for this! - I get the result I wanted to.

Kind regards

Willi
> On 29 mrt. 2016, at 17:33, Wolfgang Schuster <schuster.wolfg...@gmail.com> 
> wrote:
> 
>> Willi Egger  29. März 2016 um 15:11
>> Hi,
>> 
>> hm, I am a little puzzled…
>> 
>> If I am correct then one should be able to enable the font feature tnum for 
>> the page-numbers with “pagecommand=“.
>> 
>> I have 
>> 
>> \setuphead
>> [section]
>> [aftersection=\page, textstyle=\bfd, numberstyle=\bfd, align=middle, 
>> after={\godown[-1\lineheight]}, number=no]
>> 
>> \setuplist[section][pagecommand={\addfeature[tnum]#1\subtractfeature[tnum]}]
>> 
>> However if I do this then I get the pagenumber prefixed with ‘section’ e.g. 
>> 
>> bbb bar buch bühne section3
>> 
>> What am I doing in the wrong way?
> \setuplist[chapter][pagestyle={\feature[=][tabularnumbers]}]
> 
> \definefontfeature[default][default][onum=yes]
> 
> \setupbodyfont[pagella]
> 
> \starttext
> 
> \setcounter[userpage][100]
> 
> \completecontent
> 
> \dorecurse{20}{\expanded{\chapter{Chapter \recurselevel}}}
> 
> \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
> ___

___
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] adding font feature tnum in the TOC

2016-03-29 Thread Wolfgang Schuster

Willi Egger <mailto:cont...@boede.nl>
29. März 2016 um 15:11
Hi,

hm, I am a little puzzled…

If I am correct then one should be able to enable the font feature 
tnum for the page-numbers with “pagecommand=“.


I have

\setuphead
[section]
[aftersection=\page, textstyle=\bfd, numberstyle=\bfd, align=middle, 
after={\godown[-1\lineheight]}, number=no]


\setuplist[section][pagecommand={\addfeature[tnum]#1\subtractfeature[tnum]}]

However if I do this then I get the pagenumber prefixed with ‘section’ 
e.g.


bbb bar buch bühne section3

What am I doing in the wrong way?

\setuplist[chapter][pagestyle={\feature[=][tabularnumbers]}]

\definefontfeature[default][default][onum=yes]

\setupbodyfont[pagella]

\starttext

\setcounter[userpage][100]

\completecontent

\dorecurse{20}{\expanded{\chapter{Chapter \recurselevel}}}

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

[NTG-context] adding font feature tnum in the TOC

2016-03-29 Thread Willi Egger
Hi,

hm, I am a little puzzled…

If I am correct then one should be able to enable the font feature tnum for the 
page-numbers with “pagecommand=“.

I have 

\setuphead
[section]
[aftersection=\page, textstyle=\bfd, numberstyle=\bfd, align=middle, 
after={\godown[-1\lineheight]}, number=no]

\setuplist[section][pagecommand={\addfeature[tnum]#1\subtractfeature[tnum]}]

However if I do this then I get the pagenumber prefixed with ‘section’ e.g. 

bbb bar buch bühne  section3

What am I doing in the wrong way?


Kind regards

Willi
___
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] em-/en-dashes and newotf

2015-07-14 Thread Rik Kabel

On 2015-07-12 12:52, Hans Hagen wrote:

On 7/12/2015 6:42 PM, Rik Kabel wrote:

On 2015-07-12 10:38, Pablo Rodriguez wrote:

On 07/12/2015 04:12 PM, Hans Hagen wrote:

[...]
maybe some file is not loaded ... i uploaded a variant that might work
better

Many thanks for the new beta.

I’m afraid that this sample doesn’t work with latest beta either:

 \usemodule[newotf]

 \definefontfeature[noliga][liga=no]

 \starttext
 \startTEXpage[offset=1em]
 fiflff no--liga:
 \addfeature[noliga]fiflff

 --- em--dash
 \stopTEXpage
 \stoptext

I may be wrong, but I think that the non-deactivated OpenType 
feature is

related to the non-activated em- and en-dashes.

To the list members: could you test the sample above and tell em- and
en-dashes work and if no-liga disables ligatures? Adding architecture
may help.

I’m on Linux 32bits.

Many thanks for your help,


Pablo

Same result as Pablo: the ligatures remain even with liga=no, and the
hyphens are not replaced by appropriate dashes. Win64 8.1 with ConTeXt
2015.07.12 15:40 build and LuaTeX 0.80.1 rev 5274. My texmf-local
contains only a locally-updated version of t-smartref.mkvi.

I also have other problems with newotf and definefontfeature that I will
put in a separate message.


i just checked the distribution on a vm and it works ok so best first 
figure out why the tex ligs don't show up (when that relevant file is 
not loaded well other overloads might also fail so that can be the 
reason then for other issues)


Hans


Thank you, Hans, for the fixes to feature handling in 2015-07-15 10:37. 
Now both the dashes and ligatures in this thread and the failed build 
with script=hebr (whatever the relationship to the particular script) 
work as expected.


--
Rik
___
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] em-/en-dashes and newotf

2015-07-12 Thread Pablo Rodriguez
On 07/12/2015 04:12 PM, Hans Hagen wrote:
 [...]
 maybe some file is not loaded ... i uploaded a variant that might work 
 better

Many thanks for the new beta.

I’m afraid that this sample doesn’t work with latest beta either:

\usemodule[newotf]

\definefontfeature[noliga][liga=no]

\starttext
\startTEXpage[offset=1em]
fiflff no--liga:
\addfeature[noliga]fiflff

--- em--dash
\stopTEXpage
\stoptext

I may be wrong, but I think that the non-deactivated OpenType feature is
related to the non-activated em- and en-dashes.

To the list members: could you test the sample above and tell em- and
en-dashes work and if no-liga disables ligatures? Adding architecture
may help.

I’m on Linux 32bits.

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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] em-/en-dashes and newotf

2015-07-12 Thread Axel Kielhorn

 Am 12.07.2015 um 16:38 schrieb Pablo Rodriguez oi...@gmx.es:
 
 On 07/12/2015 04:12 PM, Hans Hagen wrote:
 [...]
 maybe some file is not loaded ... i uploaded a variant that might work 
 better
 
 Many thanks for the new beta.
 
 I’m afraid that this sample doesn’t work with latest beta either:
 
\usemodule[newotf]
 
\definefontfeature[noliga][liga=no]
 
\starttext
\startTEXpage[offset=1em]
fiflff no--liga:
\addfeature[noliga]fiflff
 
--- em--dash
\stopTEXpage
\stoptext
 
 I may be wrong, but I think that the non-deactivated OpenType feature is
 related to the non-activated em- and en-dashes.
 
 To the list members: could you test the sample above and tell em- and
 en-dashes work and if no-liga disables ligatures? Adding architecture
 may help.

I’m using 
current version: 2015.07.12 00:00
on MacOSX 10.10

I get ligatures in both cases and neither em nor en dash.

Now I have
current version: 2015.07.12 15:40
still on MacOSX 10.10

No ligatures in the second case and both en and em dash.

Axel


___
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] em-/en-dashes and newotf

2015-07-12 Thread Rik Kabel

On 2015-07-12 10:38, Pablo Rodriguez wrote:

On 07/12/2015 04:12 PM, Hans Hagen wrote:

[...]
maybe some file is not loaded ... i uploaded a variant that might work
better

Many thanks for the new beta.

I’m afraid that this sample doesn’t work with latest beta either:

 \usemodule[newotf]

 \definefontfeature[noliga][liga=no]

 \starttext
 \startTEXpage[offset=1em]
 fiflff no--liga:
 \addfeature[noliga]fiflff

 --- em--dash
 \stopTEXpage
 \stoptext

I may be wrong, but I think that the non-deactivated OpenType feature is
related to the non-activated em- and en-dashes.

To the list members: could you test the sample above and tell em- and
en-dashes work and if no-liga disables ligatures? Adding architecture
may help.

I’m on Linux 32bits.

Many thanks for your help,


Pablo
Same result as Pablo: the ligatures remain even with liga=no, and the 
hyphens are not replaced by appropriate dashes. Win64 8.1 with ConTeXt 
2015.07.12 15:40 build and LuaTeX 0.80.1 rev 5274. My texmf-local 
contains only a locally-updated version of t-smartref.mkvi.


I also have other problems with newotf and definefontfeature that I will 
put in a separate message.


--
Rik Kabel
___
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] em-/en-dashes and newotf

2015-07-12 Thread Hans Hagen

On 7/12/2015 6:42 PM, Rik Kabel wrote:

On 2015-07-12 10:38, Pablo Rodriguez wrote:

On 07/12/2015 04:12 PM, Hans Hagen wrote:

[...]
maybe some file is not loaded ... i uploaded a variant that might work
better

Many thanks for the new beta.

I’m afraid that this sample doesn’t work with latest beta either:

 \usemodule[newotf]

 \definefontfeature[noliga][liga=no]

 \starttext
 \startTEXpage[offset=1em]
 fiflff no--liga:
 \addfeature[noliga]fiflff

 --- em--dash
 \stopTEXpage
 \stoptext

I may be wrong, but I think that the non-deactivated OpenType feature is
related to the non-activated em- and en-dashes.

To the list members: could you test the sample above and tell em- and
en-dashes work and if no-liga disables ligatures? Adding architecture
may help.

I’m on Linux 32bits.

Many thanks for your help,


Pablo

Same result as Pablo: the ligatures remain even with liga=no, and the
hyphens are not replaced by appropriate dashes. Win64 8.1 with ConTeXt
2015.07.12 15:40 build and LuaTeX 0.80.1 rev 5274. My texmf-local
contains only a locally-updated version of t-smartref.mkvi.

I also have other problems with newotf and definefontfeature that I will
put in a separate message.


i just checked the distribution on a vm and it works ok so best first 
figure out why the tex ligs don't show up (when that relevant file is 
not loaded well other overloads might also fail so that can be the 
reason then for other issues)


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] em-/en-dashes and newotf

2015-07-12 Thread Otared Kavian
Hi Pablo,On my installation everything seems to work fine: Context version2015.07.12 15:40
		
	
	
		
			
Please see the attached file.Best regards: OK

			
		

newotf-ligatures.pdf
Description: Adobe PDF document
On 12 Jul 2015, at 11:38, Pablo Rodriguez oi...@gmx.es wrote:On 07/12/2015 04:12 PM, Hans Hagen wrote:[...]maybe some file is not loaded ... i uploaded a variant that might work betterMany thanks for the new beta.I’m afraid that this sample doesn’t work with latest beta either: \usemodule[newotf] \definefontfeature[noliga][liga=no] \starttext \startTEXpage[offset=1em] fiflff no--liga: \addfeature[noliga]fiflff --- em--dash \stopTEXpage \stoptextI may be wrong, but I think that the non-deactivated OpenType feature isrelated to the non-activated em- and en-dashes.To the list members: could you test the sample above and tell em- anden-dashes work and if no-liga disables ligatures? Adding architecturemay help.I’m on Linux 32bits.Many thanks for your help,Pablo-- http://www.ousia.tk___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-contextwebpage : http://www.pragma-ade.nl / http://tex.aanhet.netarchive : http://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  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] OT features and newotf

2015-07-11 Thread Pablo Rodriguez
Dear list,

I’m afraid that features don’t work with newotf:

\usemodule[newotf]

\definefontfeature[noliga][liga=no]

\starttext
\startTEXpage[offset=1em]
fiflff

\addfeature[noliga]fiflff
\stopTEXpage
\stoptext

Is this a bug or am I missing something?

Many thanks for your help,


Pablo
-- 
http://www.ousia.tk
___
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] \os

2014-08-03 Thread Joshua Krämer
On 2014-08-02, 22:36, Procházka Lukáš wrote:

 OK, thanks for explanation.
 
 This means that one has to switch to \os only when a number is to be
 printed.
 
 So when I want all numbers in the document to be old-style (and also
 ligatures etc. be kept), I have to:
 
 1) switch to {\os } when writing a number manually,
 
 2) define old-style-making-commands wherever numbers are generated
 automatically, i.e. e.g.:

Just do it the way Wolfgang said, using features:


\definefontfeature [default] [default] [lnum=yes, onum=no]
\definefontfamily [latinmodern] [serif] [Latin Modern Roman]
\setupbodyfont[latinmodern, 12pt]

\definefontfeature[oldstyle][lnum=no, onum=yes]

\starttext

Regular figures: 0123456789

{\addfeature[oldstyle] Local oldstyle figures: 0123456789}

\stoptext


This way, lining figures are enabled by default, and you can change to
oldstyle figures locally.  if you wna tit the other way round, just
change the default feature to onum=yes, lnum=no and create a new
feature for local lining figures with onum=no, lnum=yes.

Kind regards,
Joshua


___
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] Selectfont: extend and slant features

2014-02-26 Thread Joshua Krämer
Dear list,

the (fake) extend and slant features seem to be missing with Selectfont.
Will they be made available sometimes in the future?  Or am I simply
doing something wrong?  With simplefonts, they work.


\definefontfeature [mainfeature] [default] [onum=yes]
\definefontfeature [testfeature] [onum=no, extend=2, slant=0.25]

\definefontfamily [mainfamily] [serif] [Latin Modern Roman]
  [features={mainfeature}]

\setupbodyfont [mainfamily, 50pt]

\starttext

1236

\addfeature [testfeature]

1236

\stoptext


Kind regards,
Joshua Krämer


___
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] Selectfont: extend and slant features

2014-02-26 Thread Wolfgang Schuster

Am 26.02.2014 um 18:18 schrieb Joshua Krämer joshua.krae...@gmail.com:

 Dear list,
 
 the (fake) extend and slant features seem to be missing with Selectfont.
 Will they be made available sometimes in the future?  Or am I simply
 doing something wrong?  With simplefonts, they work.
 
 
 \definefontfeature [mainfeature] [default] [onum=yes]
 \definefontfeature [testfeature] [onum=no, extend=2, slant=0.25]
 
 \definefontfamily [mainfamily] [serif] [Latin Modern Roman]
  [features={mainfeature}]
 
 \setupbodyfont [mainfamily, 50pt]
 
 \starttext
 
 1236
 
 \addfeature [testfeature]
 
 1236
 
 \stoptext


1. The problem is unrelated to the \definefontfamily command.

\definefontfeature [default] [default] [onum=yes]
\definefontfeature [testfeature] [onum=no,extend=2,slant=0.25]

\setupbodyfont [modern, 50pt]

\starttext

1236

{\feature[+][testfeature]1236}

\stoptext

2. When you apply your “testfeature” to a certain font alternative (e.g. 
italic) it will work.

\definefontfeature [mainfeature] [default] [onum=yes]
\definefontfeature [testfeature] [onum=no,extend=2,slant=0.25]

\definefontfamily [mainfamily] [serif] [Latin Modern Roman] 
[features=mainfeature,it={style:regular,features:{mainfeature,testfeature}}]
 
\setupbodyfont [mainfamily,50pt]

\starttext

1236

{\it 1236}

\stoptext

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


[NTG-context] wrong \sc i with Palatino Linotype

2014-02-17 Thread Pablo Rodriguez
Dear list,

I have noticed that ConTeXt (beta from 2014.02.14 17:07) has a problem
with Palatino Linotype.

Here the sample:

\definefontfeature[capstosc][c2sc=yes]
\definefontfamily[mainface][serif][Palatino Linotype]
\setupbodyfont[mainface]
\starttext
{\addfeature[capstosc] AEIOU}

\sc aeiou
\stoptext

All vowels are fine, but the i is a dotted small cap i. The regular
small cap i is defined as i.sc (and the dotted small cap i is defined
as i.sc too). But FontForge applies both c2sc and smcp substitutions
fine.

Is there any way to solve this?

Many thanks for your help,

Pablo
-- 
http://www.ousia.tk
___
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] wrong \sc i with Palatino Linotype

2014-02-17 Thread Jan Tosovsky
On 2014-02-17 Pablo Rodriguez wrote:
 
 I have noticed that ConTeXt (beta from 2014.02.14 17:07) has a problem
 with Palatino Linotype.
 
 Here the sample:
 
 \definefontfeature[capstosc][c2sc=yes]
 \definefontfamily[mainface][serif][Palatino Linotype]
 \setupbodyfont[mainface]
 \starttext
 {\addfeature[capstosc] AEIOU}
 
 \sc aeiou
 \stoptext
 
 All vowels are fine, but the i is a dotted small cap i. The regular
 small cap i is defined as i.sc (and the dotted small cap i is defined
 as i.sc too). But FontForge applies both c2sc and smcp substitutions
 fine.
 

It seems to be a regression as this example now produces a dot as well:
http://wiki.contextgarden.net/Palatino_Linotype_under_MKIV

(in ConTeXt 2013.12.20 it was Ok)

Jan

___
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] tnum and aligncharacter=yes

2013-10-21 Thread Wolfgang Schuster

Am 21.10.2013 um 00:55 schrieb Hans Hagen pra...@wxs.nl:

 On 10/21/2013 7:44 AM, Peter Münster wrote:
 Hi,
 
 aligncharacter=yes does not work with \addfeature[with-tnum]:
 
 --8---cut here---start-8---
 \definefontfeature[with-tnum][default][tnum=yes]
 \definefontfamily[mainface][sans][Alwyn New]
 \setupbodyfont[mainface]
 \setupTABLE[alignmentcharacter=., aligncharacter=yes]
 \starttext
 \startbuffer
   \bTABLE \bTR \bTD 111.111 \eTD \eTR \bTR \bTD 444.444 \eTD \eTR \eTABLE
 \stopbuffer
 \getbuffer\addfeature[with-tnum]\getbuffer
 \stoptext
 --8---cut here---end---8---
 
 Please find attached the pdf file.
 
 How could I solve this problem please?
 
 when making examples, use fonts that are available ... (as I have no time to 
 find a variant on my system that has a similar problem as the font used by 
 you)


You can use Constantia for the example.

\definefontfeature[tnum][tnum=yes]

\definefontfamily[mainface][sans][Constantia]

\setupbodyfont[mainface]

\startbuffer
\bTABLE[alignmentcharacter=., aligncharacter=yes]
\bTR
\bTD 111.111 \eTD
\eTR
\bTR
\bTD 444.444 \eTD
\eTR
\eTABLE
\stopbuffer

\starttext

\getbuffer

\feature[+][tnum]

\getbuffer

\stoptext

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


[NTG-context] tnum and aligncharacter=yes

2013-10-21 Thread Peter Münster
Hi,

aligncharacter=yes does not work with \addfeature[with-tnum]:

--8---cut here---start-8---
\definefontfeature[with-tnum][default][tnum=yes]
\definefontfamily[mainface][sans][Alwyn New]
\setupbodyfont[mainface]
\setupTABLE[alignmentcharacter=., aligncharacter=yes]
\starttext
\startbuffer
  \bTABLE \bTR \bTD 111.111 \eTD \eTR \bTR \bTD 444.444 \eTD \eTR \eTABLE
\stopbuffer
\getbuffer\addfeature[with-tnum]\getbuffer
\stoptext
--8---cut here---end---8---

Please find attached the pdf file.

How could I solve this problem please?

TIA for any hints,
-- 
   Peter


test.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] tnum and aligncharacter=yes

2013-10-21 Thread Hans Hagen

On 10/21/2013 7:44 AM, Peter Münster wrote:

Hi,

aligncharacter=yes does not work with \addfeature[with-tnum]:

--8---cut here---start-8---
\definefontfeature[with-tnum][default][tnum=yes]
\definefontfamily[mainface][sans][Alwyn New]
\setupbodyfont[mainface]
\setupTABLE[alignmentcharacter=., aligncharacter=yes]
\starttext
\startbuffer
   \bTABLE \bTR \bTD 111.111 \eTD \eTR \bTR \bTD 444.444 \eTD \eTR \eTABLE
\stopbuffer
\getbuffer\addfeature[with-tnum]\getbuffer
\stoptext
--8---cut here---end---8---

Please find attached the pdf file.

How could I solve this problem please?


when making examples, use fonts that are available ... (as I have no 
time to find a variant on my system that has a similar problem as the 
font used by you)


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] tnum and aligncharacter=yes

2013-10-21 Thread Hans Hagen

On 10/21/2013 8:04 AM, Wolfgang Schuster wrote:


Am 21.10.2013 um 00:55 schrieb Hans Hagen pra...@wxs.nl:


On 10/21/2013 7:44 AM, Peter Münster wrote:

Hi,

aligncharacter=yes does not work with \addfeature[with-tnum]:

--8---cut here---start-8---
\definefontfeature[with-tnum][default][tnum=yes]
\definefontfamily[mainface][sans][Alwyn New]
\setupbodyfont[mainface]
\setupTABLE[alignmentcharacter=., aligncharacter=yes]
\starttext
\startbuffer
   \bTABLE \bTR \bTD 111.111 \eTD \eTR \bTR \bTD 444.444 \eTD \eTR \eTABLE
\stopbuffer
\getbuffer\addfeature[with-tnum]\getbuffer
\stoptext
--8---cut here---end---8---

Please find attached the pdf file.

How could I solve this problem please?


% \setupbodyfont[pagella]

\definefontfeature[oldstylenumbers][onum=yes]
\definefontfeature[inlinenumbers]  [lnum=yes,tnum=no]
\definefontfeature[tabularnumbers] [tnum=yes,lnum=no]

\definefontfamily[mainface][sans][Constantia]
\setupbodyfont[mainface]

\starttext

\setupTABLE
  [alignmentcharacter=.,
   aligncharacter=yes]

\startbuffer
\bTABLE
\bTR \bTD  11.111 \eTD \eTR
\bTR \bTD   2.2   \eTD \eTR
\bTR \bTD 444.444 \eTD \eTR
\eTABLE
\par
1234567890\par
00\par
11\par
44
\blank
\stopbuffer

\start
inlinenumbers:\crlf
\addfeature[inlinenumbers]
\getbuffer
\stop

\start
tabularnumbers:\crlf
\addfeature[tabularnumbers]
\getbuffer
\stop

\start
oldstylenumbers:\crlf
\addfeature[oldstylenumbers]
\getbuffer
\stop

\start
oldstylenumbers + inlinenumbers:\crlf
\addfeature[oldstylenumbers]
\addfeature[inlinenumbers]
\getbuffer
\stop

\start
oldstylenumbers + tabularnumbers:\crlf
\addfeature[oldstylenumbers]
\addfeature[tabularnumbers]
\getbuffer
\stop

\stoptext

-
  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] Bold Small Caps

2013-06-25 Thread Sietse Brouwer
Malte wrote:
 Thank you. However, I am getting an undefined control sequence here:

 l.4 {\bf This is bold {\feature
[+][f:smallcaps] and bold small caps} and 
 jus...

 However, the wiki page http://wiki.contextgarden.net/Featuresets
 confirms your syntax. What am I missing?

The version you are using? The `\feature[+][...]` syntax has been
around only since about March 2013; before that you had to use
`\addfeature[...]`. Does that explain the error you're getting?

Cheers,
Sietse
___
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] LuaTeX has troubles with contextual kern

2013-04-25 Thread Georg Duffner

Hi,

Am 2013-04-24 12:46, schrieb Hans Hagen:

On 4/24/2013 11:07 AM, Georg Duffner wrote:

Hi,

in EB Garamond I have some contextual lookups in the kern feature with
which LuaTeX in context standalone (updated today in the morning) seems
to have problems (the issue is not new, I’ve already reported it in
january but perhaps that was a bit too confusing).

The test document is:

\definefontfeature[default][default][mode=base]


you want node mode, so mode=node


I'm sorry, I forgot to mention it, I’ve already tested with mode=node, 
the result is exactly the same.



\definefontsynonym[ebg][file:EBGaramond12-Regular.otf]
\definefontfeature[ss20][ss20=yes]
\definefontfeature[iota1][cv81=1]
\definefontfeature[iota2][cv81=2]
\definefontfeature[altcirc][cv80=1]
\define\test{Tì αᾟα\par}
\starttext
\definedfont[ebg*default at 12pt]\test
\addfeature{ss20}\test
\addfeature{iota1}\test
\addfeature{iota2}\test
\addfeature{altcirc}\test
\stoptext

The font is at
http://www.georgduffner.at/ebgaramond/fonts/EBGaramond12-Regular.otf

The corresponding lookups in the kern.fea roughly contain

 pos T' 145 i.dotless gravecomb;

which increases the right sidebearing of T by 145 before i.dotless
followed by gravecomb


maybe you also need to enable lfbd and rtbd?


lfbd and rtbd don’t make sense here, they are meant to by activated by 
opbd and only should affect left and right line-ends. They are the 
Opentype equivalents to protrusion settings. This is about simple 
kerning in the text (btw, there are experimental lfbd and rtbd settings 
in the font). This example is a standard kerning lookup (cf. 
http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html#6.a 
http://www.adobe.com/devnet/opentype/afdko/topic_feature_file_syntax.html#6.h 
and http://glyphsapp.com/blog/contextual-kerning/ )



and

 pos Eta' 218 0 218 0 uni0345.cap @grk_tlAcc2;
 pos Eta' 218 0 418 0 uni0345.cap1 @grk_tlAcc2;
 pos Eta' 218 0 558 0 uni0345.cap2 @grk_tlAcc2;

where @grk_tlAcc2 contains the accents attached at the top left of the
glyph and which means that Eta is positioned at 218 inside its bounding
box and the bounding box is expanded by the third value between , on
the condition that it’s followed by uni0345.cap* and the said accents.


ok, so that is effectively changing the advance width


Yes.


ss20 does a full decomposition of all composed glyphs so I can replace
any component by an alternate glyph. Their order corresponds to
canonical decomposition.

Attached you find the pdf output and a pdf from a parallel xelatex test
which shows the desired result:

\documentclass[12pt]{minimal}
\usepackage{fontspec}
\setmainfont{EB Garamond}
\newcommand{\test}{Tì αᾟα\par}
\begin{document}
\test
\addfontfeature{RawFeature=+ss20}\test
\addfontfeature{CharacterVariant=81:1}\test
\addfontfeature{CharacterVariant=81:2}\test
\addfontfeature{CharacterVariant=80}\test
\end{document}


I don't know what \addfontfeature does in xetex (probably accumulative)
but in context you can best use the \feature command: \feature[+][iota1]
as \addfeature cum suis were somewhat experimental features related to
oriental tex.


I’m a bit confused. As I don’t use context yet (this time I did for 
reporting a bug upon which I stumbled when using lualatex) I looked up 
the necessary commands in the newly presented Fonts out of ConTeXt 
where on p. 41 the commands \addfeature and \subtractfeature are used.


In xelatex, \addfontfeature is defined by the package fontspec and does 
indeed accumulate features (much like I thought, \addfeature does in 
context) but without the need to be defined in the preamble and without 
the advantage to define feature sets.


Best regards,
Georg
___
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] LuaTeX has troubles with contextual kern

2013-04-24 Thread Georg Duffner

Hi,

in EB Garamond I have some contextual lookups in the kern feature with 
which LuaTeX in context standalone (updated today in the morning) seems 
to have problems (the issue is not new, I’ve already reported it in 
january but perhaps that was a bit too confusing).


The test document is:

\definefontfeature[default][default][mode=base]
\definefontsynonym[ebg][file:EBGaramond12-Regular.otf]
\definefontfeature[ss20][ss20=yes]
\definefontfeature[iota1][cv81=1]
\definefontfeature[iota2][cv81=2]
\definefontfeature[altcirc][cv80=1]
\define\test{Tì αᾟα\par}
\starttext
\definedfont[ebg*default at 12pt]\test
\addfeature{ss20}\test
\addfeature{iota1}\test
\addfeature{iota2}\test
\addfeature{altcirc}\test
\stoptext

The font is at 
http://www.georgduffner.at/ebgaramond/fonts/EBGaramond12-Regular.otf


The corresponding lookups in the kern.fea roughly contain

pos T' 145 i.dotless gravecomb;

which increases the right sidebearing of T by 145 before i.dotless 
followed by gravecomb


and

pos Eta' 218 0 218 0 uni0345.cap @grk_tlAcc2;
pos Eta' 218 0 418 0 uni0345.cap1 @grk_tlAcc2;
pos Eta' 218 0 558 0 uni0345.cap2 @grk_tlAcc2;

where @grk_tlAcc2 contains the accents attached at the top left of the 
glyph and which means that Eta is positioned at 218 inside its bounding 
box and the bounding box is expanded by the third value between , on 
the condition that it’s followed by uni0345.cap* and the said accents.


ss20 does a full decomposition of all composed glyphs so I can replace 
any component by an alternate glyph. Their order corresponds to 
canonical decomposition.


Attached you find the pdf output and a pdf from a parallel xelatex test 
which shows the desired result:


\documentclass[12pt]{minimal}
\usepackage{fontspec}
\setmainfont{EB Garamond}
\newcommand{\test}{Tì αᾟα\par}
\begin{document}
\test
\addfontfeature{RawFeature=+ss20}\test
\addfontfeature{CharacterVariant=81:1}\test
\addfontfeature{CharacterVariant=81:2}\test
\addfontfeature{CharacterVariant=80}\test
\end{document}

Best regards,
Georg


contextual_kerning.pdf
Description: Adobe PDF document


contextual_kerning_xtx.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] LuaTeX has troubles with contextual kern

2013-04-24 Thread Hans Hagen

On 4/24/2013 11:07 AM, Georg Duffner wrote:

Hi,

in EB Garamond I have some contextual lookups in the kern feature with
which LuaTeX in context standalone (updated today in the morning) seems
to have problems (the issue is not new, I’ve already reported it in
january but perhaps that was a bit too confusing).

The test document is:

\definefontfeature[default][default][mode=base]


you want node mode, so mode=node


\definefontsynonym[ebg][file:EBGaramond12-Regular.otf]
\definefontfeature[ss20][ss20=yes]
\definefontfeature[iota1][cv81=1]
\definefontfeature[iota2][cv81=2]
\definefontfeature[altcirc][cv80=1]
\define\test{Tì αᾟα\par}
\starttext
\definedfont[ebg*default at 12pt]\test
\addfeature{ss20}\test
\addfeature{iota1}\test
\addfeature{iota2}\test
\addfeature{altcirc}\test
\stoptext

The font is at
http://www.georgduffner.at/ebgaramond/fonts/EBGaramond12-Regular.otf

The corresponding lookups in the kern.fea roughly contain

 pos T' 145 i.dotless gravecomb;

which increases the right sidebearing of T by 145 before i.dotless
followed by gravecomb


maybe you also need to enable lfbd and rtbd?


and

 pos Eta' 218 0 218 0 uni0345.cap @grk_tlAcc2;
 pos Eta' 218 0 418 0 uni0345.cap1 @grk_tlAcc2;
 pos Eta' 218 0 558 0 uni0345.cap2 @grk_tlAcc2;

where @grk_tlAcc2 contains the accents attached at the top left of the
glyph and which means that Eta is positioned at 218 inside its bounding
box and the bounding box is expanded by the third value between , on
the condition that it’s followed by uni0345.cap* and the said accents.


ok, so that is effectively changing the advance width


ss20 does a full decomposition of all composed glyphs so I can replace
any component by an alternate glyph. Their order corresponds to
canonical decomposition.

Attached you find the pdf output and a pdf from a parallel xelatex test
which shows the desired result:

\documentclass[12pt]{minimal}
\usepackage{fontspec}
\setmainfont{EB Garamond}
\newcommand{\test}{Tì αᾟα\par}
\begin{document}
\test
\addfontfeature{RawFeature=+ss20}\test
\addfontfeature{CharacterVariant=81:1}\test
\addfontfeature{CharacterVariant=81:2}\test
\addfontfeature{CharacterVariant=80}\test
\end{document}


I don't know what \addfontfeature does in xetex (probably accumulative) 
but in context you can best use the \feature command: \feature[+][iota1] 
as \addfeature cum suis were somewhat experimental features related to 
oriental tex.


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] wiki page for \feature

2013-03-22 Thread Sietse Brouwer
Dear Idris,

I have merged your output graphic into the article --- perhaps a bit
large, but I wanted to be sure the features were legible. Thank you
for including the PDF, that made things easier.

I have taken the liberty of moving the page title to [[Featuresets]]
---easier to remember, I think, and easier to link to. I've updated
your redirects, of cours. [[Open Type Font Features]], [[Open Type
Fonts and Featuresets in MkIV]], and [[Font features]] all redirect
there.

http://wiki.contextgarden.net/Featuresets#Sample_file_with_examples

Thank-you for writing this article, it is much appreciated.
Sietse

On 22 March 2013 00:01, Idris Samawi Hamid ادريس   سماوي حامد
isha...@colostate.edu wrote:
 Dear gang,

 I made a wiki page for \feature et al:

 http://wiki.contextgarden.net/Open_Type_Fonts_and_Featuresets_in_MkIV

 Towards the end we need a graphical sample of the sample file, but I do not
 know how to do that. See

 ===
 Now let us review the results:

 [output/graphic here]
 ===

 I have to move on to other projects so I'm leaving completion and
 improvement to others in the community. Here is the sample file (needs
 latest beta! pdf attached as well) that needs graphical output on the page:

 ==
 \definefontfeature
   [schola-preset]
   [mode=node,script=latn,language=dflt,kern=yes,liga=yes,lnum=yes]

  \starttypescript [serif] [schola-preset] [name]
  \definefontsynonym [Serif]
 [name:texgyreschola-regular.otf][features=schola-preset]
  \stoptypescript

  \starttypescript [serif] [schola-preset] [size]
 \definebodyfont
  [35.8pt,29.8pt,24.8pt,20.7pt,17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt]
  [rm]
  [tf=Serif sa 1]
  \stoptypescript

  \starttypescript [schola-default]
  \definebodyfontenvironment
   [schola-default]
   [default]
   [interlinespace=2.7ex]
 \definetypeface [schola-default] [rm] [serif] [schola-preset]
 [schola-preset] % [default]
  \stoptypescript

  \usetypescript[schola-default]
  \setupbodyfont[schola-default,12pt]

 \definefontfeature[f:smallcaps] [smcp=yes]
 \definefontfeature[f:thinimacron]   [ss04=yes]
 \definefontfeature[f:upsidedown][dlig=yes]


 \definefontfeature[f:newstyle]  [onum=no]
 \definefontfeature[f:nocaps][smcp=no]
 \definefontfeature[f:wideimacron]   [ss04=no]
 \definefontfeature[f:rightsideup]   [dlig=no]


 \definefontfeature[f:ligatures] [liga=yes]
 \definefontfeature[f:noligatures]   [liga=no]

 \definefontfeature[f:oldstyle]  [onum=yes,lnum=no]

 \definefontfeature[f:oldstyleupsidedown][onum=yes,dlig=yes]
 \definefontfeature[f:newstylerightsideup]   [onum=no,dlig=no]

 \definefontfeature[f:oldstylewmacron]   [ss04=no,onum=yes]
 \definefontfeature[f:newstylesmallcaps] [smcp=yes,onum=no]

 \startTEXpage[offset=10pt]

 \define\SAMPLE{123 Idrīs ?` !` VA fi}

 \SAMPLE\blank

 \feature[+][f:oldstyle] \SAMPLE \blank
 \feature[more][f:thinimacron]   \SAMPLE \blank
 \addfeature[f:upsidedown]   \SAMPLE \blank

 \feature[+][f:smallcaps]\SAMPLE \blank
 \addfeature[f:wideimacron]  \SAMPLE \blank

 \feature[-][f:upsidedown]   \SAMPLE \blank

 \feature[=][f:oldstyleupsidedown]\SAMPLE \blank

 \feature[!][f:smallcaps]\SAMPLE \blank

 \feature[] \SAMPLE \blank
 \stopTEXpage
 ==

 Thanks and best wishes
 Idris
 --
 Professor Idris Samawi Hamid
 Department of Philosophy
 Colorado State University
 Fort Collins, CO 80523
 ___
 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
 ___
___
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] wiki page for \feature

2013-03-21 Thread Idris Samawi Hamid ادريس سماوي حامد

Dear gang,

I made a wiki page for \feature et al:

http://wiki.contextgarden.net/Open_Type_Fonts_and_Featuresets_in_MkIV

Towards the end we need a graphical sample of the sample file, but I do  
not know how to do that. See


===
Now let us review the results:

[output/graphic here]
===

I have to move on to other projects so I'm leaving completion and  
improvement to others in the community. Here is the sample file (needs  
latest beta! pdf attached as well) that needs graphical output on the page:


==
\definefontfeature
  [schola-preset]
  [mode=node,script=latn,language=dflt,kern=yes,liga=yes,lnum=yes]

 \starttypescript [serif] [schola-preset] [name]
 \definefontsynonym [Serif]  
[name:texgyreschola-regular.otf][features=schola-preset]

 \stoptypescript

 \starttypescript [serif] [schola-preset] [size]
\definebodyfont
 [35.8pt,29.8pt,24.8pt,20.7pt,17.3pt,14.4pt,12pt,11pt,10pt,9pt,8pt]
 [rm]
 [tf=Serif sa 1]
 \stoptypescript

 \starttypescript [schola-default]
 \definebodyfontenvironment
  [schola-default]
  [default]
  [interlinespace=2.7ex]
\definetypeface [schola-default] [rm] [serif] [schola-preset]  
[schola-preset] % [default]

 \stoptypescript

 \usetypescript[schola-default]
 \setupbodyfont[schola-default,12pt]

\definefontfeature[f:smallcaps] [smcp=yes]
\definefontfeature[f:thinimacron]   [ss04=yes]
\definefontfeature[f:upsidedown][dlig=yes]


\definefontfeature[f:newstyle]  [onum=no]
\definefontfeature[f:nocaps][smcp=no]
\definefontfeature[f:wideimacron]   [ss04=no]
\definefontfeature[f:rightsideup]   [dlig=no]


\definefontfeature[f:ligatures] [liga=yes]
\definefontfeature[f:noligatures]   [liga=no]

\definefontfeature[f:oldstyle]  [onum=yes,lnum=no]

\definefontfeature[f:oldstyleupsidedown][onum=yes,dlig=yes]
\definefontfeature[f:newstylerightsideup]   [onum=no,dlig=no]

\definefontfeature[f:oldstylewmacron]   [ss04=no,onum=yes]
\definefontfeature[f:newstylesmallcaps] [smcp=yes,onum=no]

\startTEXpage[offset=10pt]

\define\SAMPLE{123 Idrīs ?` !` VA fi}

\SAMPLE\blank

\feature[+][f:oldstyle] \SAMPLE \blank
\feature[more][f:thinimacron]   \SAMPLE \blank
\addfeature[f:upsidedown]   \SAMPLE \blank

\feature[+][f:smallcaps]\SAMPLE \blank
\addfeature[f:wideimacron]  \SAMPLE \blank

\feature[-][f:upsidedown]   \SAMPLE \blank

\feature[=][f:oldstyleupsidedown]\SAMPLE \blank

\feature[!][f:smallcaps]\SAMPLE \blank

\feature[]  \SAMPLE \blank
\stopTEXpage
==

Thanks and best wishes
Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523

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

[NTG-context] \feature

2013-03-17 Thread Hans Hagen

Hi,

After some experimenting, I settled on the next interface for dynamic 
features:


The is also a generic command \type {\feature} that takes two arguments. 
Below we show all calls, with long and short variants:


\starttyping
\addfeature[f:mine] \feature [more][f:mine] \feature[+][f:mine]
\subtractfeature   [f:mine] \feature [less][f:mine] \feature[-][f:mine]
\replacefeature[f:mine] \feature  [new][f:mine] \feature[=][f:mine]
\resetandaddfeature[f:mine] \feature[local][f:mine] \feature[!][f:mine]
\revivefeature [f:mine] \feature  [old][f:mine] \feature[][f:mine]
\resetfeature   \feature[reset] \feature[]
\stoptyping

Each variant also accepts \type {{}} instead of \type {[]} so that they 
can conveniently be used in square bracket arguments.


This mechanism replaces \addff cum suis, although for a while they will 
stay around (mapped onto add and subtract).


Idris is testing it (as he used this kind of trickery extensively for 
complex arabic) and he make a nice wiki page.


We can think of a predefined set of simple features.

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] new trickery

2013-03-15 Thread Hans Hagen

On 3/15/2013 5:18 AM, Idris Samawi Hamid ادريس   سماوي حامد wrote:

On Thu, 14 Mar 2013 20:08:38 -0600, Idris Samawi Hamid ادريس   سماوي
حامد isha...@colostate.edu wrote:


To round it off I guess we need a replacement for \subfs as well.


Hmm, it seems that \subfs functionality is built in through the same
mechanism. Will study this some more...


a new beta, this time with:

\setupbodyfont[pagella]

\starttext

\definefontfeature[f:smallcaps][smcp=yes]
\definefontfeature[f:nocaps]   [smcp=no]
\definefontfeature[f:oldstyle] [onum=yes]
\definefontfeature[f:newstyle] [onum=no]

% \enabletrackers[fonts.features]

\startTEXpage[offset=10pt]
\start
fijn fietsen 123
\type{[+os]}\feature{f:oldstyle}
fijn fietsen 123
\type{[+sc]}\feature{f:smallcaps}
fijn fietsen 123
\type{[+ns]}\feature{f:newstyle}
fijn fietsen 123
\type{[+nc]}\feature{f:nocaps}
fijn fietsen 123
\stop
\par
\start
fijn fietsen 123
\type{[+os]}\addfeature{f:oldstyle}
fijn fietsen 123
\type{[+sc]}\addfeature{f:smallcaps}
fijn fietsen 123
\type{[-os]}\subtractfeature{f:oldstyle}
fijn fietsen 123
\type{[-sc]}\subtractfeature{f:smallcaps}
fijn fietsen 123
\stop
\par
\start
fijn fietsen 123
\type{[+os]}\addfeature{f:oldstyle}
fijn fietsen 123
\type{[+sc]}\addfeature{f:smallcaps}
fijn fietsen 123
\type{[=os]}\replacefeature{f:oldstyle}
fijn fietsen 123
\type{[=sc]}\replacefeature{f:smallcaps}
fijn fietsen 123
\stop
\par
\start
fijn fietsen 123
\type{[+os]}\addfeature[f:oldstyle]
fijn fietsen 123
\type{[+sc]}\addfeature[f:smallcaps]
fijn fietsen 123
\type{[reset]}\resetfeature
fijn fietsen 123
\type{[+os]}\addfeature[f:oldstyle]
fijn fietsen 123
\type{[+sc]}\addfeature[f:smallcaps]
fijn fietsen 123
\stop
\stopTEXpage

\stoptext
-
  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] new trickery

2013-03-15 Thread Idris Samawi Hamid ادريس سماوي حامد

On Fri, 15 Mar 2013 05:07:02 -0600, Hans Hagen pra...@wxs.nl wrote:


\start
fijn fietsen 123
\type{[+os]}\addfeature{f:oldstyle}
fijn fietsen 123
\type{[+sc]}\addfeature{f:smallcaps}
fijn fietsen 123
\type{[=os]}\replacefeature{f:oldstyle}
fijn fietsen 123
\type{[=sc]}\replacefeature{f:smallcaps}
fijn fietsen 123
\stop


So I hope I have this right:

\addfeature adds a set of features {feature1,feature2,...featureN}  
to the currently defined/enabled stack of OT features


\subtractfeature subtracts a set of features from the currently  
defined/enabled stack


These two seem clear enough. I'm not so clear on the next one:

\replacefeature replaces all the _added_ features (not the default ones  
defined, e.g., in the typescripts I presume) with only those in the  
argument of \replacefeature. Is that right?


\resetfeature pops all features added to the stack (again, I'm assuming  
this does not include the default ones defined, e.g., in the typescripts).


Question: Does/Will this mechanism completely replace \addff et al, or  
will these mechanism ignore each other (e.g., \resetfeature does not pop  
those defined by \addff).


Best wishes
Idris
--
Professor Idris Samawi Hamid
Department of Philosophy
Colorado State University
Fort Collins, CO 80523
___
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] new trickery

2013-03-15 Thread Hans Hagen

On 3/15/2013 7:11 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:

On Fri, 15 Mar 2013 05:07:02 -0600, Hans Hagen pra...@wxs.nl wrote:


\start
fijn fietsen 123
\type{[+os]}\addfeature{f:oldstyle}
fijn fietsen 123
\type{[+sc]}\addfeature{f:smallcaps}
fijn fietsen 123
\type{[=os]}\replacefeature{f:oldstyle}
fijn fietsen 123
\type{[=sc]}\replacefeature{f:smallcaps}
fijn fietsen 123
\stop


So I hope I have this right:

\addfeature adds a set of features {feature1,feature2,...featureN}
to the currently defined/enabled stack of OT features


no, it adds a *predefined* featureset to the set of the current font but 
forgets them when a group is left



\subtractfeature subtracts a set of features from the currently
defined/enabled stack


idem but subtraction


These two seem clear enough. I'm not so clear on the next one:

\replacefeature replaces all the _added_ features (not the default ones
defined, e.g., in the typescripts I presume) with only those in the
argument of \replacefeature. Is that right?


This reverts back to the features that are set when the font is defined 
and adds the given set. Resetting the stack in your speak.



\resetfeature pops all features added to the stack (again, I'm assuming
this does not include the default ones defined, e.g., in the typescripts).


This reverts back to the features that are set when the font is defined.


Question: Does/Will this mechanism completely replace \addff et al, or
will these mechanism ignore each other (e.g., \resetfeature does not pop
those defined by \addff).


I dont' know ... in fact, they share code deep down in the machinery but 
indeed it might make sense to remove them (or at least depricate them).


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] new trickery

2013-03-15 Thread Hans Hagen

On 3/15/2013 6:16 PM, Jonathan Barchi wrote:

On Fri, Mar 15, 2013 at 4:35 AM, Hans Hagen pra...@wxs.nl wrote:

On 3/15/2013 5:18 AM, Idris Samawi Hamid ادريس   سماوي حامد wrote:


On Thu, 14 Mar 2013 20:08:38 -0600, Idris Samawi Hamid ادريس   سماوي
حامد isha...@colostate.edu wrote:


To round it off I guess we need a replacement for \subfs as well.



Hmm, it seems that \subfs functionality is built in through the same
mechanism. Will study this some more...



yes, but there in successive calls the last one counts

\addff{x} \addff{y} \addff{z}  - z is used on top of the current font's set

\feature{x} \feature{y} \feature{y} - all are used on top

we might end up with replacing \addff etc by one mechanisms

\feature{+someset} : add
\feature{-someset} : subtract
\feature{=someset} : replace



I like this proposal for its use of only a single command with the
add/remove/reset in the args. If \feature ends up being too generic,
maybe \fontfeature or \fontfeatureset instead?

To keep things more in-line with current ConTeXt syntax, you could do
something like the following:

\feature{add=foo}
\feature{subtract=bar}(or sub, remove, etc.)
\feature{reset,add=baz}

Which would also allow, e.g.,

\feature{add=bar,remove=baz}


I'd like to avoid parsing as much as possible here as these are state 
changers. So, I made:


\addfeature [f:mine] \feature[more][f:mine] \feature[+]  [f:mine]
\subtractfeature[f:mine] \feature[less][f:mine] \feature[-]  [f:mine]
\replacefeature [f:mine] \feature[new] [f:mine] \feature[=]  [f:mine]
\revivefeature  [f:mine] \feature[old] [f:mine] \feature[default][f:mine]
\resetfeature\feature[reset]

so there are several ways to achieve the same (and one can use {} 
instead of [])



similar to how we're used to using key:value pairs in so many
arguments, and being able to combine them in one function call.


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] new trickery

2013-03-15 Thread Hans Hagen

On 3/15/2013 7:11 PM, Idris Samawi Hamid ادريس   سماوي حامد wrote:


So I hope I have this right:

\addfeature adds a set of features {feature1,feature2,...featureN}
to the currently defined/enabled stack of OT features

\subtractfeature subtracts a set of features from the currently
defined/enabled stack

These two seem clear enough. I'm not so clear on the next one:

\replacefeature replaces all the _added_ features (not the default ones
defined, e.g., in the typescripts I presume) with only those in the
argument of \replacefeature. Is that right?

\resetfeature pops all features added to the stack (again, I'm assuming
this does not include the default ones defined, e.g., in the typescripts).

Question: Does/Will this mechanism completely replace \addff et al, or
will these mechanism ignore each other (e.g., \resetfeature does not pop
those defined by \addff).


A good exercise in understanding this is to add this to the wiki.

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
___