Re: [NTG-context] metafun 2

2019-08-16 Thread Alan Braslau
We have eofill in MP (in pdf/ps in fact) and that likely will do what you need.

Alan


On Sat, 17 Aug 2019 00:31:38 +0100
Adam Reviczky  wrote:

> Hi Hans,
> 
> One MetaPost feature that I was looking forward to is the ability to create
> a fill between two shapes.
> Something like a difference function of two path's.
> 
> For logos I use the workaround with creating a path alongside the excluded
> areas but it is always cumbersome.
> 
> I have briefly mentioned it back here:
> https://mailman.ntg.nl/pipermail/ntg-context/2011/056910.html
> 
> Just for illustration purposes, if I wanted to fill the area in between two
> circles:
> 
> *path p ;
> **p := fullcircle scaled 1cm ;
> **path q ;
> **q := fullcircle scaled .5cm ;
> *
> 
> Instead of creating a new path along both circles with:
> 
> 
> *r := p -- reverse q -- cycle ;*
> 
> It would be nice to have something like:
> 
> *fill p excluding q ;*
> 
> or something like that.
> 
> I mainly have use-cases for differences in shapes, but filling the
> intersection of two shapes would be the same idea.
> 
> Thanks,
> Adam
> 
> 
> On Wed, Aug 14, 2019 at 10:57 AM Hans Hagen  wrote:
> 
> > Hi,
> >
> > In the process of providing an additional (more abstract) interface to
> > some of the old and also new MetaFun code we wonder what kind of
> > features users would like to see.
> >
> > http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
> >
> > As a teaser I uploaded a MyWay document that shows some of what is
> > coming. All is experimental but it shows the direction. We're talking
> > ConTeXt LMTX here. For instance,
> >
> >  draw lmt_outline [
> >  content   = "hello",
> >  kind  = "reverse",
> >  fillcolor = "darkred",
> >  drawcolor = "darkblue",
> >  rulethickness = 1/2,
> >  ] ysized h shifted (3.75h,-1.25h) ;
> >
> > Wraps all the outline drawing in one macro with a set of options (there
> > will be xml interface definitions for that). Or take:
> >
> >  draw lmt_followtext [
> >  content = "How well does it work {\bf 1}! ",
> >  path= (fullcircle scaled 4cm),
> >  trace   = true,
> >  spread  = true,
> >  ] ysized 5cm ;
> >
> > which is an easier interface to text along a curve. Arrows can be drawn
> > with
> >
> >  draw lmt_arrow [
> >  kind= "draw",
> >  location= "middle",
> >  alternative = "curved",
> >  path= fullcircle
> >  scaled  3cm
> >  shifted (3.5cm,0cm),
> >  ] withcolor "darkblue" ;
> >
> > but of course the low level interface with its many variables for
> > tweaking stays around. Other examples are shown in the mentioned document.
> >
> > So the question is: What do you miss in metapost support? Of course it
> > should fit within the concept, so 'artistic freehand drawings' is not
> > something that is likely to get interfaced. We are particularly
> > interested in educational applications, if only because ConTeXt started
> > out that way.
> >
> > 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
> >
> > ___
> >  

___
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] metafun 2

2019-08-16 Thread Adam Reviczky
Hi Hans,

One MetaPost feature that I was looking forward to is the ability to create
a fill between two shapes.
Something like a difference function of two path's.

For logos I use the workaround with creating a path alongside the excluded
areas but it is always cumbersome.

I have briefly mentioned it back here:
https://mailman.ntg.nl/pipermail/ntg-context/2011/056910.html

Just for illustration purposes, if I wanted to fill the area in between two
circles:

*path p ;
**p := fullcircle scaled 1cm ;
**path q ;
**q := fullcircle scaled .5cm ;
*

Instead of creating a new path along both circles with:


*r := p -- reverse q -- cycle ;*

It would be nice to have something like:

*fill p excluding q ;*

or something like that.

I mainly have use-cases for differences in shapes, but filling the
intersection of two shapes would be the same idea.

Thanks,
Adam


On Wed, Aug 14, 2019 at 10:57 AM Hans Hagen  wrote:

> Hi,
>
> In the process of providing an additional (more abstract) interface to
> some of the old and also new MetaFun code we wonder what kind of
> features users would like to see.
>
> http://www.pragma-ade.com/general/magazines/mag-1104-mkiv.pdf
>
> As a teaser I uploaded a MyWay document that shows some of what is
> coming. All is experimental but it shows the direction. We're talking
> ConTeXt LMTX here. For instance,
>
>  draw lmt_outline [
>  content   = "hello",
>  kind  = "reverse",
>  fillcolor = "darkred",
>  drawcolor = "darkblue",
>  rulethickness = 1/2,
>  ] ysized h shifted (3.75h,-1.25h) ;
>
> Wraps all the outline drawing in one macro with a set of options (there
> will be xml interface definitions for that). Or take:
>
>  draw lmt_followtext [
>  content = "How well does it work {\bf 1}! ",
>  path= (fullcircle scaled 4cm),
>  trace   = true,
>  spread  = true,
>  ] ysized 5cm ;
>
> which is an easier interface to text along a curve. Arrows can be drawn
> with
>
>  draw lmt_arrow [
>  kind= "draw",
>  location= "middle",
>  alternative = "curved",
>  path= fullcircle
>  scaled  3cm
>  shifted (3.5cm,0cm),
>  ] withcolor "darkblue" ;
>
> but of course the low level interface with its many variables for
> tweaking stays around. Other examples are shown in the mentioned document.
>
> So the question is: What do you miss in metapost support? Of course it
> should fit within the concept, so 'artistic freehand drawings' is not
> something that is likely to get interfaced. We are particularly
> interested in educational applications, if only because ConTeXt started
> out that way.
>
> 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
>
> ___
>
___
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] radiobuttons

2019-08-16 Thread Henning Hraban Ramm


> Am 2019-08-15 um 22:40 schrieb Henning Hraban Ramm :
> 
>> Am 2019-08-14 um 22:09 schrieb Wolfgang Schuster 
>> :
> 
>> Use (with "framed" in the second optional argument)
>> 
>> \setupfield [MMradio] [framed] [..,..=..,..]
>> 
>> to get normal framed fields.
> 
> I already had "framed=on" as part of my setup.
> 
> ***
> I found a ConTeXt beta from February 2019 on my laptop, and there it works as 
> it should.
> i.e. frames are there, and radiobuttons are single-select.
> ***

Arrgh, now I can’t reproduce it any more. I don’t know what I looked at.

HR
___
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] OSFONTDIR

2019-08-16 Thread Hans Hagen

On 8/16/2019 7:40 AM, Henning Hraban Ramm wrote:

Am 2019-08-15 um 23:57 schrieb Hans Hagen :

On 8/15/2019 11:06 PM, Henning Hraban Ramm wrote:

Am 2019-08-15 um 08:08 schrieb Huseyin Özoguz :

I just moved to Win 10 (coming from Win 7) with a fresh system and installed 
Context.

My problem: The manual installed fonts are not stored in "Windows/Font" like before, but 
in "AppData/Local/Microsoft/Windows/Fonts" – the default Fonts, which came with windows, 
are still there in Windows/Font.

If I change OSFONTDIR to the new path and execute "mtxrun --script font 
--reload" after that, the new fonts are found by Context, but that seems no good 
way, because now the default-fonts are not found.

How to solve this situation? How can I prevent Win10 from installing manual installed 
fonts into this other path and instead install it into "Windows/Font"directly? 
(Other programs like Corel etc. have no problems finding those other fonts, regardles of 
there location or OSFONTDIR.)

Another solution: Give Context two pathes to look for fonts, is that possible?

OSFONTDIR is like other PATH variables, it can contain several paths, separated 
by ; (at least on Linux and OSX, maybe it’s : on Windows). My OSFONTDIR is 
rather lengthy to include my collections of commercial and free fonts (beware, 
that makes ConTeXt slow).

in what sense slow ... more fonts means of course a longer identification time 
when the database is made but that happen seldom (unless you refer to an 
unknown font in your document in which case a scan happens, but that should 
then be fixed in the style)


It’s been a while since I had my whole collection of literally thousands of 
fonts in OSFONTDIR, but re-scanning happens quite often  – yes, probably 
something’s wrong in my typescripts, or I call for an invalid combination 
somewhere.

At the moment I just get this error message on every run:

resolvers   | globbing | confusing filename, name: 
'SourceSansPro-SemiBold.ttf', lower: 'sourcesanspro-semibold.ttf', already: 
'SourceSansPro-Semibold.ttf'

maybe

\enabletrackers[fonts.names,fonts.warnings,fonts.specifications,fonts.rejections]

gives some clue. Normally the database is rescanned when there is a font 
not found (maybe new one) or the format is remade, but that then should 
be once. After that a bad typescript should jkust trigger missing font 
warnings.



I don’t understand what’s wrong with that font.


maybe nothing but some fonts can be on the system twice or have an 
internal name that is wrong or clashs with another one. In the worst 
case the clash could result in (maybe) this random hash ordering (per 
run), so you toggle between instances.


It's anyway why I always put fonts in texmf-fonts/fonts/data, even 
system fonts, just to be sure that i get want i expect.


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
___