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

Re: [NTG-context] Typescript/fallbacks problem

2017-05-25 Thread Mohammad Hossein Bateni
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 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
___