[NTG-context] evaluation of != and ~=

2016-04-29 Thread Meer, Hans van der
This one took the better part of an afternoon from me, but I finally found the 
(unexpected) culprit.
In the xml documentation on page 31 it is said:
 The given expression between [] is converted to a LUA expression so you can 
use the use operators: == ~= <= >= < > not and or ()
In addition, = equals == and != is the same as ~=.

This is not true as the following demonstrates. The use of != is as expected 
but the ~= leads to an error and this should not be:

xml> lpath > error in expression: number(@atta) ~= 1 => 
expr.number((ll.at and ll.at['atta'])) ~== 1


Hans van der Meer


% failure of test on inequality.
\startxmlsetups demo:comparefail
\xmlsetsetup{#1}{root|node}{demo:comparefail:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{demo:comparefail}
\startxmlsetups demo:comparefail:root
compare \type{!=}\crlf
\xmlfilter{#1}{/[number(@atta) != 1]/command(demo:comparefail:node)}
compare \type{~=}\crlf
\xmlfilter{#1}{/[number(@atta) ~= 1]/command(demo:comparefail:node)}
\stopxmlsetups
\startxmlsetups demo:comparefail:node
node: attribute atta = \xmlatt{#1}{atta}\crlf
\stopxmlsetups
\startbuffer[comparefail]




\stopbuffer
\starttext
\xmlprocessbuffer{demo}{comparefail}{}
Note the absence of output in the second \tex{xmlfilter}.
\stoptext



xml-compare.pdf
Description: xml-compare.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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

[NTG-context] Fonts inside eqno{}

2016-04-29 Thread Freddy Omar López Quintero
Hello all!

I'm interested in change the natural numbering of one equation with \eqno{}
but it does not follow the main font selected.

A minimal example:

%%
\usemodule[simplefonts]
\setmainfont[Linux Biolinum O]
\setmathfont[Linux Biolinum O]

\starttext

I have the following expression

\placeformula
\startformula
y = Z \beta_1 + Y \beta_2 + u
\stopformula

that changes to

% \placeformula
\startformula
y = Z \beta_1 + Y \beta_2 + W_1\tau + u \eqno{ (1')}
\stopformula

\stoptext
​%%​

​I would like the (1') ​keep the same kind of font than (1).

Any hint will be appreciated.

Thanks!

-- 
«...my role is to be on the bottom of things.»

Donald Knuth


minimal.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] xml expression error

2016-04-29 Thread Meer, Hans van der

On 28 Apr 2016, at 22:13, Pablo Rodriguez > 
wrote:

On 04/28/2016 05:06 PM, dr. Hans van der Meer wrote:
Why is there anexpression error here? I would expect that the expression
number(-1101) evaluates to a negative number taking part in the
comparsion. It looks as if the minus sign is not seen as an unary minus,
while -1101 should have be evaluated by Lua's tonumber(-1101).

relevant code snippet is:
\xmlfilter{#1}{lpath[number(@date) <= number(-1101)]/command(...)

I wouldn’t get it, even with a minimal sample, but xml-mkiv.pdf includes
the shortcut for this function.

Here is a minimal example showing that even a number as -1 is not correctly 
handled by the lpath[selection]-code.
I really am convinced that not handling negative numbers should qualify as a 
mistake.

Hans van der Meer


% failure of negative number comparison.
\startxmlsetups demo:numberfail
\xmlsetsetup{#1}{root|node}{demo:numberfail:*}
\stopxmlsetups
\xmlregisterdocumentsetup{demo}{demo:numberfail}
\startxmlsetups demo:numberfail:root
@atta >= 1:\crlf
\xmlfilter{#1}{/[number(@atta) >= 1]/command(demo:numberfail:node)}
\blank
@atta >= -1:\crlf
\xmlfilter{#1}{/[number(@atta) >= -1]/command(demo:numberfail:node)}
\xmlfilter{#1}{/[number(@atta) >= number(-1)]/command(demo:numberfail:node)}
\stopxmlsetups
\startxmlsetups demo:numberfail:node
node: attribute atta = \xmlatt{#1}{atta}\crlf
\stopxmlsetups
\startbuffer[numberfail]




\stopbuffer
\starttext
\xmlprocessbuffer{demo}{numberfail}{}
the error from \type{\xmlfilter{#1}{/[number(@atta) >= 
-1]/command(demo:numberfail:node)}}:
\starttyping
xml > lpath > error in expression: number(@atta) >= -1 => 
expr.number((ll.at and ll.at['atta'])) >= 
expr.child(ll,'-')1
\stoptyping

the error from \type{\xmlfilter{#1}{/[number(@atta) >= 
number(-1)]/command(demo:numberfail:node)}}:
\starttyping
xml > lpath > error in expression: number(@atta) >= number(-1) => 
expr.number((ll.at and ll.at['atta'])) >= 
expr.number(expr.child(ll,'-')1)
\stoptyping
\stoptext




xml-number.pdf
Description: xml-number.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://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] Problem with Quran KFGQPC Uthman Taha Naskh font

2016-04-29 Thread Mohammad Hossein Bateni
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

—MHB

On Fri, Apr 29, 2016 at 5:52 AM, Mohammad Hossein Bateni 
wrote:

> Thanks, Hans!  The problem is *almost* fixed in the latest beta, version:
> 2016.04.27 10:18.  I didn't think something had changed in the past two
> weeks; that's why I hadn't tried with the latest version.
>
> There is only one word where I notice bad placement of diacritics when
> using CONTEXT.  Compare this
>  and this
> .
>
> BTW context gave the following "warning" about not being able to access
> the data.  Is that because it was the first run of a new installation?
>
> system  > lua > compiling
>> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tma'
>> into
>> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tmc'
>> system  > lua > dumping
>> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tma'
>> into
>> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tmc'
>> stripped
>> fonts   > names > accessing the data table failed
>
>
> —MHB
>
> On Fri, Apr 29, 2016 at 4:42 AM, Hans Hagen  wrote:
>
>> On 4/29/2016 5:01 AM, Mohammad Hossein Bateni wrote:
>>
>>> The attachments in the email below were too big for the list (>100KB).
>>> I uploaded them here .
>>>
>>> On Thu, Apr 28, 2016 at 10:20 PM, Mohammad Hossein Bateni
>>> > wrote:
>>>
>>> Hi,
>>>
>>> I am not sure whether I'm missing certain features in the font
>>> definition or whether there is actually some bug in how CONTEXT or
>>> LuaTeX for that matter handles this font.  It might as well be that
>>> there is something wrong with the font
>>> , though I doubt
>>> that.
>>>
>>> Attached is my simple test program and the PDF output, which is
>>> annotated to show the problems.  You can compare with the reference
>>> PNG file I generated via rendering in Chrome.  I hope you can see
>>> the annotations where I have pointed out the incorrect typesetting,
>>> otherwise you can compare the two outputs to notice the difference:
>>> for the most part, some diacritics that are not placed in the right
>>> location (both vertically and horizontally).
>>>
>>> I am using Mac OS X with CONTEXT current version: 2016.04.13 16:46.
>>>
>>
>> can you check the context + beta from the contextgarden?
>>
>>
>> -
>>   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
>>
>> ___
>
>
>
___
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] Problem with Quran KFGQPC Uthman Taha Naskh font

2016-04-29 Thread Mohammad Hossein Bateni
Thanks, Hans!  The problem is *almost* fixed in the latest beta, version:
2016.04.27 10:18.  I didn't think something had changed in the past two
weeks; that's why I hadn't tried with the latest version.

There is only one word where I notice bad placement of diacritics when
using CONTEXT.  Compare this
 and this
.

BTW context gave the following "warning" about not being able to access the
data.  Is that because it was the first run of a new installation?

system  > lua > compiling
> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tma'
> into
> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tmc'
> system  > lua > dumping
> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tma'
> into
> '/Users/bateni/context.newest/tex/texmf-cache/luatex-cache/context/5fe67e0bfe781ce0dde776fb1556f32e/fonts/data/names.tmc'
> stripped
> fonts   > names > accessing the data table failed


—MHB

On Fri, Apr 29, 2016 at 4:42 AM, Hans Hagen  wrote:

> On 4/29/2016 5:01 AM, Mohammad Hossein Bateni wrote:
>
>> The attachments in the email below were too big for the list (>100KB).
>> I uploaded them here .
>>
>> On Thu, Apr 28, 2016 at 10:20 PM, Mohammad Hossein Bateni
>> > wrote:
>>
>> Hi,
>>
>> I am not sure whether I'm missing certain features in the font
>> definition or whether there is actually some bug in how CONTEXT or
>> LuaTeX for that matter handles this font.  It might as well be that
>> there is something wrong with the font
>> , though I doubt that.
>>
>> Attached is my simple test program and the PDF output, which is
>> annotated to show the problems.  You can compare with the reference
>> PNG file I generated via rendering in Chrome.  I hope you can see
>> the annotations where I have pointed out the incorrect typesetting,
>> otherwise you can compare the two outputs to notice the difference:
>> for the most part, some diacritics that are not placed in the right
>> location (both vertically and horizontally).
>>
>> I am using Mac OS X with CONTEXT current version: 2016.04.13 16:46.
>>
>
> can you check the context + beta from the contextgarden?
>
>
> -
>   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
>
> ___
___
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 Ulrike Fischer
Am Fri, 29 Apr 2016 10:37:51 +0200 schrieb Hans Hagen:

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

["1"] = 46 works, but as names are easier to handle I'm still
interested to know why cambria doesn't have them. 



-- 
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] ’Undefined control sequence’ with basic example

2016-04-29 Thread Saša Janiška
Wolfgang Schuster  writes:

> context 

Ahh, that is embarrassing. :-(

It seems the time is ripe to dive more seriously into ConTeXt…


Sincerely,
Gour

-- 
Before giving up this present body, if one is able to tolerate
the urges of the material senses and check the force of desire and
anger, he is well situated and is happy in this world.

___
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] ’Undefined control sequence’ with basic example

2016-04-29 Thread Wolfgang Schuster

Saša Janiška 
29. April 2016 um 11:05
Hello,

I had to prepare some text for my mother by extracting some portions
from her book (done in LyX/LaTeX) and now wanted to use it as example to
see the quality of job done by LuaTeX…

However, converting LyX —> LaTeX —> Pandoc –> ConTeXt failed and I tried
with the simple example
(http://wiki.contextgarden.net/Command/startsection):

% mode=mkiv
\setuppapersize[A5]
\starttext

\startsection[
reference=sec:One,
title={Section One},
]

For a subsection, see \in{subsection}[sec:Two:Sec].

\stopsection

\startsection[
reference=sec:Two,
title={Section Two},
]
[a_variable={some value}]

a_variable=\quote{\structureuservariable{a_variable}}.

\startsubsection[
reference=sec:Two:Sec,
title={Here’s a subsection},
]

In this subsection there’s some text\ldots

\stopsubsection
\stopsection
\stoptext

but running it under Debian (Sid) gives:

[gour@atmarama ~/prj/knjiga]$ luatex t.tex

context 

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] ’Undefined control sequence’ with basic example

2016-04-29 Thread Saša Janiška
Hello,

I had to prepare some text for my mother by extracting some portions
from her book (done in LyX/LaTeX) and now wanted to use it as example to
see the quality of job done by LuaTeX…

However, converting LyX —> LaTeX —> Pandoc –> ConTeXt failed and I tried
with the simple example
(http://wiki.contextgarden.net/Command/startsection):

% mode=mkiv
\setuppapersize[A5]
\starttext

\startsection[
reference=sec:One,
title={Section One},
]

For a subsection, see \in{subsection}[sec:Two:Sec].

\stopsection

\startsection[
reference=sec:Two,
title={Section Two},
]
[a_variable={some value}]

a_variable=\quote{\structureuservariable{a_variable}}.

\startsubsection[
reference=sec:Two:Sec,
title={Here’s a subsection},
]

In this subsection there’s some text\ldots

\stopsubsection
\stopsection
\stoptext

but running it under Debian (Sid) gives:

[gour@atmarama ~/prj/knjiga]$ luatex t.tex
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015/Debian) (rev 5238) 
 restricted \write18 enabled.
(./t.tex
! Undefined control sequence.
l.2 \setuppapersize
 [A5]
? l
Type  to proceed, S to scroll future error messages,
R to run without stopping, Q to run quietly,
I to insert something, E to edit your file,
1 or ... or 9 to ignore the next 1 to 9 tokens of input,
H for help, X to quit.
? x
No pages of output.
Transcript written on t.log.
[gour@atmarama ~/prj/knjiga]$ less t.tex
[gour@atmarama ~/prj/knjiga]$ luatex t.tex
This is LuaTeX, Version beta-0.80.0 (TeX Live 2015/Debian) (rev 5238) 
 restricted \write18 enabled.
(./t.tex
! Undefined control sequence.
l.2 \setuppapersize
 [A5]
? 


What is wrong?


Sincerely,
Gour

-- 
A person who has given up all desires for sense gratification,
who lives free from desires, who has given up all sense of
proprietorship and is devoid of false ego — he alone can
attain real peace.

___
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] Test Suite Fonts "extensions-001"

2016-04-29 Thread Wolfgang Schuster

Thomas Fehige 
29. April 2016 um 10:38

Below is a minimal not-working example extracted from 
"extensions-001.tex" in the fonts section of the test suite. From what 
I understand of the code, the second line should read "XPrXcXdXPrX" 
instead of "abracadabra". But it doesn't, it is still "abracadabra". 
Compiling the original extensions-001 gives me seven lines of 
"abracadabra". What am I doing wrong? I'm running ConTeXt version 
2015.05.18 12:26 MKIV current fmt: 2016.4.28 from the debian/ubuntu 
texlive packets.



You need a newer context version.

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] [OT] Richard Stallmann Receiving the 2015 ACM Software System Award

2016-04-29 Thread Martin Schröder
2016-04-27 19:10 GMT+02:00 luigi scarso :
> http://awards.acm.org/press_releases/technical-awards-2015.pdf

https://en.wikipedia.org/wiki/GNU_Compiler_Collection#History

I'm not sure if RMS' role in GCC has been beneficial in say the last two decades

Best
Martin
___
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] Problem with Quran KFGQPC Uthman Taha Naskh font

2016-04-29 Thread Hans Hagen

On 4/29/2016 5:01 AM, Mohammad Hossein Bateni wrote:

The attachments in the email below were too big for the list (>100KB).
I uploaded them here .

On Thu, Apr 28, 2016 at 10:20 PM, Mohammad Hossein Bateni
> wrote:

Hi,

I am not sure whether I'm missing certain features in the font
definition or whether there is actually some bug in how CONTEXT or
LuaTeX for that matter handles this font.  It might as well be that
there is something wrong with the font
, though I doubt that.

Attached is my simple test program and the PDF output, which is
annotated to show the problems.  You can compare with the reference
PNG file I generated via rendering in Chrome.  I hope you can see
the annotations where I have pointed out the incorrect typesetting,
otherwise you can compare the two outputs to notice the difference:
for the most part, some diacritics that are not placed in the right
location (both vertically and horizontally).

I am using Mac OS X with CONTEXT current version: 2016.04.13 16:46.


can you check the context + beta from the contextgarden?


-
  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] Test Suite Fonts "extensions-001"

2016-04-29 Thread Thomas Fehige
Below is a minimal not-working example extracted from 
"extensions-001.tex" in the fonts section of the test suite. From what I 
understand of the code, the second line should read "XPrXcXdXPrX" 
instead of "abracadabra". But it doesn't, it is still "abracadabra". 
Compiling the original extensions-001 gives me seven lines of 
"abracadabra". What am I doing wrong? I'm running ConTeXt version 
2015.05.18 12:26 MKIV current fmt: 2016.4.28 from the debian/ubuntu 
texlive packets.


\startluacode

fonts.handlers.otf.addfeature {

name = "stest",

type = "substitution",

data = {

a = "X",

b = "P",

}

}

\stopluacode

\definefontfeature[stest][stest=yes]

\starttext

\startTEXpage

\definedfont[file:DejaVuSerif.ttf*default]%

abracadabra\par

{\addff{stest}abracadabra\par}

\stopTEXpage

\stoptext

___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___

Re: [NTG-context] 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
___

Re: [NTG-context] glyph substitution

2016-04-29 Thread Hans Hagen

On 4/29/2016 9:44 AM, Thomas Fehige wrote:


Yes, I learned that already. Will these home-made features only work on
open type fonts?


yes, because type 1 has no such feature processing (i suppose i can make 
them into fake opentypes ... shouldn't be to hard ... it depends a bit 
on how long we keep using type 1)


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] glyph substitution

2016-04-29 Thread Thomas Fehige

Am 27.04.2016 um 17:10 schrieb Hans Hagen:
indeed they are lots of small examples (taken from the list or 
experiments) but they show what can be done


if they crash (no sure what you mean there) it's most likely due to 
fonts you don't have on your machine


Yes, many of the blank pages or obscure (to me) error messages seem to 
be font-related. I'll have to see to that.


a lot has been published in articles in user group journals or for 
meetings, there is a font manual that you can buy for nominal costs, 
there are some manuals on the website and an extended version of the 
more technical one that hardly anyone needs will end up in the 
distribution some day soon, there are examples on stack exchange, in 
the mail archive an don the wiki ... a lot of this depends on 
voluntary work so you can hardly complain about it .. anyone is free 
to provide more documentation and share experiences


Yes, I know, I'm sorry I let my exasperation run free. When I started 
out with LaTeX /and/ typesetting more than two decades ago, I had one 
basic book on LaTeX. Over the years my knowledge of LaTeX, typography, 
layout design and typesetting grew side by side, if somewhat organically 
and unsystematic. Nowadays there's about a metre and a half of bookshelf 
occupied by books on LaTeX, TeX and Typography.


As I make books myself, I'm obviously not averse to buying them. I guess 
the ConTeXt books on fonts and layout will do me good.


btw, if you want to roll out your own features as in extensions-001 
then you also need to know what the font provides (or lacks) .. open 
type fonts can be pretty complex and there is no consistency in how 
certain features are implemented


Yes, I learned that already. Will these home-made features only work on 
open type fonts?


Cheers -- Thomas
___
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki : http://contextgarden.net
___