Re: [NTG-context] Typescript/fallbacks problem

2017-05-27 Thread Hans Hagen

On 5/27/2017 6:14 PM, Mohammad Hossein Bateni wrote:
Hans and Otared, thanks a lot for your attention.  I do appreciate your 
time.


Otared:

The fallback was called "dejavudefault" on my machine when I was testing 
it.  I changed the name in the email, to make the lines shorter, but 
apparently I missed some instances—sorry—and that made it to the version 
I uploaded also.


Hans:

I'm really sorry for wasting your time with these low-quality fonts... 
but unfortunately these are among the few open-source Farsi fonts, and 
they are simple enough to be extendible.  The font designer is not a 
professional, but accepts bug reports, suggestions, etc.  So I spend 
some time finding issues and fixing/reporting them.


Could you explain a bit about the "identifying as a math font" part?  
What is the sign of that?  To fix it, should I remove all the 
math-related fields in the font?  Was the math thing only in the regular 
font or also in bold?  Because I noticed the problem only in the regular 
shape.


it has a math constants table and a math script feature (but no math 
support afaiks) and in soem cases context does checks for a font being a 
math font


anyway, the next beta should (sort of) work

On Sat, May 27, 2017 at 7:34 AM, Hans Hagen > wrote:


On 5/27/2017 11:39 AM, Otared Kavian wrote:

Hi Mohammad Hossein,

Your report is beyond my knowledge, but I would like to ask you
a question about the setup of fallback fonts: why are you
referring to « dejavudef » in the commands such as

   \definefontsynonym [SahelBd] 
  [SahelBold][features={arabic,tlig},fallbacks=dejavudef]


while you have defined before « dejavudefault » (and not «
dejavudef ») in:

\definefontfallback[dejavudefault][dejavusans]
[range=generalpunctuation,check=yes,force=no]

indeed. but on top of that, the font reports itself as a math font
so that confuses the fallback mechanism (we have fundamental
different approaches for math and text fonts) ... i'll try to deal
with it but to some extend consider spending time on crappy fonts a
bit of a waste

-
   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

___




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




--

-
  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 annotation flags

2017-05-27 Thread Pablo Rodriguez
On 05/25/2017 06:24 PM, Pablo Rodriguez wrote:
> [...] 
> Is there a way that I can set the annotation flag in the sample above to
> Print (/F 3)? (This would be unambiguous, since only a bit can be set
> [11 would be an invalid flag value].)
> 
> Or am I missing something and Acrobat is misbehaving?

Sorry for the confusion. I was assuming that the value of the annotation
flag was the bit position and not the decimal value of the binary integer.

/F 4 (which is binary 100) is explicitly setting the annotation to be
printed.

Acrobat doesn’t print it by default. I had to remember that this is only
only because Acrobat doesn’t print any annotation by default.

Sorry for the noise,

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] Typescript/fallbacks problem

2017-05-27 Thread Mohammad Hossein Bateni
Hans and Otared, thanks a lot for your attention.  I do appreciate your
time.

Otared:

The fallback was called "dejavudefault" on my machine when I was testing
it.  I changed the name in the email, to make the lines shorter, but
apparently I missed some instances—sorry—and that made it to the version I
uploaded also.

Hans:

I'm really sorry for wasting your time with these low-quality fonts... but
unfortunately these are among the few open-source Farsi fonts, and they are
simple enough to be extendible.  The font designer is not a professional,
but accepts bug reports, suggestions, etc.  So I spend some time finding
issues and fixing/reporting them.

Could you explain a bit about the "identifying as a math font" part?  What
is the sign of that?  To fix it, should I remove all the math-related
fields in the font?  Was the math thing only in the regular font or also in
bold?  Because I noticed the problem only in the regular shape.

On Sat, May 27, 2017 at 7:34 AM, Hans Hagen  wrote:

> On 5/27/2017 11:39 AM, Otared Kavian wrote:
>
>> Hi Mohammad Hossein,
>>
>> Your report is beyond my knowledge, but I would like to ask you a
>> question about the setup of fallback fonts: why are you referring to «
>> dejavudef » in the commands such as
>>
>>   \definefontsynonym [SahelBd]   [SahelBold][features={arabic,
>> tlig},fallbacks=dejavudef]
>>
>> while you have defined before « dejavudefault » (and not « dejavudef »)
>> in:
>>
>> \definefontfallback[dejavudefault][dejavusans]
>> [range=generalpunctuation,check=yes,force=no]
>>
> indeed. but on top of that, the font reports itself as a math font so that
> confuses the fallback mechanism (we have fundamental different approaches
> for math and text fonts) ... i'll try to deal with it but to some extend
> consider spending time on crappy fonts a bit of a waste
>
> -
>   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/list
> info/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] problem with mathmode in footnotes

2017-05-27 Thread Alan Bowen
The problem persists with  ConTeXt  ver: 2017.05.25.

So, I wonder, is there something that I should fix at my end? Any
suggestions will be gratefully received.

Alan

On Wed, May 17, 2017 at 12:21 PM, Alan Bowen  wrote:

> To recap: the aim is to get oldstyle numerals in mathmode using TeX Gyre
> Termes otherwise;
>
> \definefontfamily[mainface][serif][TeXGyre Termes][features=f:oldstyle]
>
>
> \definefallbackfamily[mainface][mm][TeX Gyre Pagella]
> [preset=math:digitsnormal,
> features=f:oldstyle,
> scale=0.93]
>
> \definefontfamily[mainface][mm][TeXGyre Termes Math]
>
> \setupbodyfont[mainface,10pt]
> 123456789
>
> Euclid \emph{Elem}.\ 3.20 states that if $BC$ is  joined to the center $O$
> of the circle, then $\angle BOC = 2\cdot\angle A$,  and $\angle BOC$ is
> equal to arc $BC$, that is,
> $BC\kern-1em\raise1.8ex\hbox{\frown}$.%
> \footnote{\m{123456789}
> Euclid \emph{Elem}.\ 3.20 states that if $BC$ is  joined to the center $O$
> of the circle, then $\angle BOC = 2\cdot\angle A$,  and $\angle BOC$ is
> equal to arc $BC$, that is,
> $BC\kern-1em\raise1.8ex\hbox{\frown}$.}
>
> \stoptext
>
> in mathmode in the footnote, ones gets:
> (a) oldstyle numerals (from Pagella) but no math symbols etc
> (b) if the line   preset=math:digitsnormal   is commented out,
> math symbols etc but but regular numerals.
>
> I am using the latest beta of the standalone (05.15.2017).
>
> Alan
>
>
> On Sun, May 14, 2017 at 12:01 PM, Alan Bowen 
> wrote:
>
>> Just for the record: The problem with mathmode in footnotes persists with
>> the latest standalone ConTeXt  ver: 2017.05.12 (even with Termes instead
>> of the Brill font).
>>
>> Alan
>>
>> On Tue, May 9, 2017 at 1:22 PM, Hans Hagen  wrote:
>>
>>> Hi,
>>>
>>> % doesn't work, no cdot
>>>
>>> % \definefallbackfamily
>>> %   [mainface]
>>> %   [mm]
>>> %   [Brill]
>>> %   [range={digitsnormal},
>>> %features=f:oldstyle,
>>> %force=yes]
>>> % \definefontfamily[mainface][rm][Brill]
>>> %   [protrusion=quality,expansion=quality]
>>> % \definefontfamily[mainface][mm][TeX Gyre Pagella Math]
>>> %   [scale=0.80,force=yes]
>>> % \definefontfamily[mainface][tt][Dejavu Sans Mono]
>>> % \setupbodyfont[mainface,10pt]
>>>
>>> works ok:
>>>
>>> \setupbodyfont[pagella,10pt]
>>>
>>> \setuppapersize[S3]
>>>
>>> \starttext
>>>
>>> Euclid \emph {Elem}.\ 3.20 states that if \m {BC} is joined to the
>>> center \m {O}
>>> of the circle, then \m {\angle BOC = 2 \cdot \angle A}, and \m {\angle
>>> BOC} is
>>> equal to \m {BC\kern-1em\raise1.8ex\hbox to 1em {\frown}}. \footnote
>>> {Euclid \emph
>>> {Elem}.\ 3.20 states that if \m {BC} is joined to the center \m{O} of
>>> the circle,
>>> then \m {\angle BOC = 2 \cdot \angle A}, and \m {\angle BOC} is equal to
>>> \m
>>> {BC\kern-1em\raise1.8ex\hbox to 1em {\frown}}.}
>>>
>>> \stoptext
>>>
>>> I have no clue why selectfont fails in footnotes. Maybe Wolfgang hasa
>>> clue.
>>>
>>> Hans
>>>
>>>
>>>
>>>
>>>
>>>  Forwarded Message 
>>> Subject:[NTG-context] problem with mathmode in footnotes
>>> Date:   Mon, 8 May 2017 19:01:05 -0400
>>> From:   Alan Bowen 
>>> Reply-To:   mailing list for ConTeXt users 
>>> To: mailing list for ConTeXt users 
>>>
>>>
>>>
>>> The code
>>>
>>> \definefontfamily[mainface][serif][Brill]
>>> [protrusion=quality,
>>> expansion=quality,
>>> mode=node,
>>> force=yes,
>>> ]
>>>
>>> \definefallbackfamily[mainface][mm][TeX Gyre Pagella]
>>> [preset=math:digitsnormal,features=f:oldstyle,scale=0.93]
>>>
>>> \definefallbackfamily [mainface] [mm] [Brill]
>>> [preset=math:lowercasegreeknormal]
>>> \definefallbackfamily [mainface] [mm] [Brill]
>>> [preset=math:lowercasegreekitalic]
>>> \definefallbackfamily [mainface] [mm] [Brill]
>>> [preset=math:uppercasegreeknormal]
>>> \definefallbackfamily [mainface] [mm] [Brill]
>>> [preset=math:uppercasegreekitalic]
>>>
>>> \definefontfamily[mainface][mm][TeXGyre Termes Math][scale=0.94]
>>> \setupmathematics[ucgreek=normal,lcgreek=italic]
>>>
>>> \setupbodyfont[mainface,10pt]
>>>
>>> \starttext
>>>
>>> Euclid \emph{Elem}.\ 3.20 states that if \m{BC} is  joined to the center
>>> \m{O} of the circle, then \m{\angle BOC = 2\cdot\angle A},  and \m{\angle
>>> BOC} is equal to  \m{BC\kern-1em\raise1.8ex\hbox{\frown}}.%
>>> %
>>> \footnote{Euclid \emph{Elem}.\ 3.20 states that if \m{BC} is  joined to
>>> the center \m{O} of the circle, then \m{\angle BOC = 2\cdot\angle A}, and
>>> \m{\angle BOC} is equal to \m{BC\kern-1em\raise1.8ex\hbox{\frown}}.}
>>> \stoptext
>>>
>>> processes as it should using earlier versions (e.g., ConTeXt  ver:
>>> 2017.03.26)  but goes awry using ConTeXt  ver: 2017.05.06.
>>>
>>> So far as I can tell, the problem comes with the specification of the
>>> fonts. If one omits the stuff before “\starttext”, the footnote looks as it
>>> should and everyone but the publisher would be happy.
>>>
>>> Alan
>>>
>>
>>
>
___
If your question is of interest to others as

Re: [NTG-context] Typescript/fallbacks problem

2017-05-27 Thread Hans Hagen

On 5/27/2017 11:39 AM, Otared Kavian wrote:

Hi Mohammad Hossein,

Your report is beyond my knowledge, but I would like to ask you a 
question about the setup of fallback fonts: why are you referring to « 
dejavudef » in the commands such as


  \definefontsynonym [SahelBd]   
[SahelBold][features={arabic,tlig},fallbacks=dejavudef]


while you have defined before « dejavudefault » (and not « dejavudef ») in:

\definefontfallback[dejavudefault][dejavusans] 
[range=generalpunctuation,check=yes,force=no]
indeed. but on top of that, the font reports itself as a math font so 
that confuses the fallback mechanism (we have fundamental different 
approaches for math and text fonts) ... i'll try to deal with it but to 
some extend consider spending time on crappy fonts a bit of a waste


-
  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] Typescript/fallbacks problem

2017-05-27 Thread Otared Kavian
Hi Mohammad Hossein,

Your report is beyond my knowledge, but I would like to ask you a question 
about the setup of fallback fonts: why are you referring to « dejavudef » in 
the commands such as

 \definefontsynonym [SahelBd]   
[SahelBold][features={arabic,tlig},fallbacks=dejavudef]

while you have defined before « dejavudefault » (and not « dejavudef ») in:

\definefontfallback[dejavudefault][dejavusans] 
[range=generalpunctuation,check=yes,force=no]

Best regards: Otared K.

> On 26 May 2017, at 05:52, Mohammad Hossein Bateni  > wrote:
> 
> The following email had large attachments (more than 100K).  I uploaded 
> everything here:
> http://mhbateni.com/context/bug-04/ 
> 
> On Thu, May 25, 2017 at 11:40 PM, Mohammad Hossein Bateni  > wrote:
> Hello Hans,
> 
> I'm going to explain a strange problem which came about, as far as I can 
> tell, in beta 2017.04.27 01:00.  The same beta had introduced some other 
> issues with fallbacks, which you fixed already.  Thanks a lot for that!
> 
> I am now using the latest beta, version 2017.05.25 12:50.  Unfortunately I 
> don't know what is going on precisely.  Here is a sort-of-minimal non-working 
> example.
> 
> 
> %
> \definefontfeature[slanted][slant=.4]
> 
> \starttypescript [serif][sahel][name]
>   \resetfontfallback [dejavudefault]
>   \definefontfallback[dejavudefault][dejavusans] 
> [range=generalpunctuation,check=yes,force=no]
> %
>   \definefontsynonym [SahelReg]
> [Sahel][features={arabic,tlig},fallbacks=dejavudef]
> %% NOTE 1
> %  \definefontsynonym [SahelReg] [Sahel][features={arabic,tlig}]
>   \definefontsynonym [SahelBd]   
> [SahelBold][features={arabic,tlig},fallbacks=dejavudef]
>   \definefontsynonym [SahelIt] 
> [Sahel][features={arabic,tlig,slanted},fallbacks=dejavudef]
>   \definefontsynonym [SahelBdIt] 
> [SahelBold][features={arabic,tlig,slanted},fallbacks=dejavudef]
> %
>   \definefontsynonym [Serif] [SahelReg]
>   \definefontsynonym [SerifBold] [SahelBd]
>   \definefontsynonym [SerifItalic] [SahelIt]
>   \definefontsynonym [SerifBoldItalic] [SahelBdIt]
> \stoptypescript
> 
> \starttypescript [math] [modern] [name]
> \definefontsynonym [MathRoman] [name:modern] [features=math\mathsizesuffix]
> \stoptypescript
> 
> \starttypescript [myfont]
> \definetypeface [myfont][rm] [serif][sahel] [default]
> %% NOTE 2
> \definetypeface [myfont][mm] [math] [modern][default]
> \stoptypescript
> 
> \setupbodyfont[myfont,rm]
> %% NOTE 3
> %\definedfont[Serif]
> 
> \def\Sample{{\lefttoright Salam} {\righttoleft سلام} }
> 
> \starttext
> rm:\Sample
> {\bf bf:\Sample}
> {\it it:\Sample}
> {\bi bi:\Sample}
> 
> %% NOTE 4
> \definedfont[SahelReg]\Sample
> \definedfont[Serif]\Sample
> 
> \stoptext
> %
> 
> 
> Background: 
> 
> Commenting/uncommenting some of the lines produces three outputs, only one of 
> which seems correct to me.  I have attached the three.  Betas before 4/27 
> always produced the correct solution.
> 
> I am using a free open-source Farsi font, whose English glyphs come from Open 
> Sans font.  I am attaching the specific versions of the Farsi font to 
> reproduce the same results.
> [https://github.com/rastikerdar/sahel-font 
> ]
> [https://github.com/google/fonts/tree/master/apache/opensans 
> ]
> 
> 
> Explanation:
> 
> Compiling the MWE above produces wrong-1.pdf in recent betas.  The serif font 
> has not been set up properly on the first line of output.  Instead the 
> default Latin Modern has been used, which looks different and misses the 
> Farsi glyphs.
> 
> Strangely there is nothing wrong with the second line of text, which shows 
> Serif and SahelReg fonts are both set up just fine.  See "NOTE 4" in the MWE.
> 
> Replacing the line above "NOTE 1" with the line below it—i.e., if I remove 
> the fallbacks for definition of SahelReg—generates correct.pdf as output.  I 
> get the same correct output if uncomment the line below "NOTE 3," which 
> should be a no-op in my opinion.  Notice that setting the fallback for bold, 
> italic and bold italic has not caused any issues.  It's only the serif itself 
> that's acting up weirdly.
> 
> Finally when I comment the math definition below "NOTE 2," I get wrong-2.pdf 
> as output.  Here everything seems okay except that the serif on the first 
> line—but strangely not on the second line—misses the Arabic features: the 
> letters are not joined.
> 
> 
> I spent quite some time investigating the changes to the GitHub repository on 
> 4/27, to pinpoint what might have caused this issue, but my efforts didn't go 
> anywhere.  I hope you can spot the issue.
> 
> 
> Thanks a lot for your attention!
> —MHB
> 
> 
> 
> ___
> If your question is

Re: [NTG-context] Package esvect and Context

2017-05-27 Thread Fabrice Couvreur
Thanks Hans
Fabrice

2017-05-27 0:09 GMT+02:00 Hans Hagen :

> On 5/26/2017 12:53 PM, Fabrice Couvreur wrote:
>
>> Hello,
>> Hans suggested a macro to draw the vectors . It works well but I find
>> that in some situations, the arrow is too big.
>> thank you,
>>
>
>  interim ahlength := 2;
>
>
> Fabrice
>>
>>
>> https://mailman.ntg.nl/pipermail/ntg-context/2016/085828.html
>>
>> \useMPlibrary[mat]
>>
>> \startMPextensions
>>   vardef math_stacker_arrow_shape =
>>   image (
>>   drawarrow
>>   (OverlayWidth,OverlayOffset) -- (0,OverlayOffset)
>>   withcolor
>>   OverlayLineColor ;
>>   setbounds currentpicture to boundingbox currentpicture
>> bottomenlarged (OverlayOffset/2) topenlarged (OverlayOffset/2) ;
>>   )
>>   enddef ;
>>   vardef math_stacker_leftarrow_shape =
>>   math_stacker_arrow_shape
>>   enddef ;
>>   vardef math_stacker_rightarrow_shape =
>>   math_stacker_arrow_shape rotated 180
>>   enddef ;
>> \stopMPextensions
>>
>> \startuniqueMPgraphic{math:stacker:\number"2190}
>>   math_stacker_draw(math_stacker_leftarrow_shape) ;
>> \stopuniqueMPgraphic
>>
>> \startuniqueMPgraphic{math:stacker:\number"2192}
>>   math_stacker_draw(math_stacker_rightarrow_shape) ;
>> \stopuniqueMPgraphic
>>
>> % so far
>>
>> \setupmathstackers
>> [both] % vfenced]
>> [color=darkred,
>>  alternative=mp]
>>
>> \setupmathstackers
>> [top]
>> [color=darkred,
>>  alternative=mp]
>>
>> \setupmathstackers
>> [bottom]
>> [color=darkred,
>>  alternative=mp]
>>
>> \starttext
>>
>> $\overrightarrow  {i}$
>>
>> \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/list
>> info/ntg-context
>> webpage  : http://www.pragma-ade.nl / http://context.aanhet.net
>> archive  : https://bitbucket.org/phg/context-mirror/commits/
>> 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 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://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
___