ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Re: Script to automatically generate typescripts
       [not found] <mailman.1395.1275590320.4277.ntg-context@ntg.nl>
@ 2010-06-03 21:33 ` Vyatcheslav Yatskovsky
  2010-06-03 22:40   ` Michael Murphy
  0 siblings, 1 reply; 24+ messages in thread
From: Vyatcheslav Yatskovsky @ 2010-06-03 21:33 UTC (permalink / raw)
  To: ntg-context

Hi,

Looks very impressive. A lot of code )

Is it usable under Windows? Never run Python scripts before.

> Hi all,
>
> after spending many hours on a typescript only to accidentally delete
> it, I thought that there should be a better way to write them. Hence I
> wrote a python script to do just that.

-- 
Best Regards,
Vyatcheslav Yatskovsky
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-03 21:33 ` Script to automatically generate typescripts Vyatcheslav Yatskovsky
@ 2010-06-03 22:40   ` Michael Murphy
  0 siblings, 0 replies; 24+ messages in thread
From: Michael Murphy @ 2010-06-03 22:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 03/06/2010 23:33, Vyatcheslav Yatskovsky wrote:
> Hi,
>
> Looks very impressive. A lot of code )
>
> Is it usable under Windows? Never run Python scripts before.
>
>> Hi all,
>>
>> after spending many hours on a typescript only to accidentally delete
>> it, I thought that there should be a better way to write them. Hence I
>> wrote a python script to do just that.
>

I haven't tested it extensively, but it seems to run on windows. I will 
probably package it as an .exe when I get the option handling done.

You will need to install python before you can run the script.

-- 

Michael Murphy
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-03 16:51 Michael Murphy
  2010-06-04  7:32 ` luigi scarso
@ 2010-06-07 10:59 ` Thomas Floeren
  1 sibling, 0 replies; 24+ messages in thread
From: Thomas Floeren @ 2010-06-07 10:59 UTC (permalink / raw)
  To: 'mailing list for ConTeXt users'

Michael Murphy <> wrote on Thursday, June 03, 2010 6:52 PM:

> 
> Please send me bug reports / feature requests if you use it!



Thank you for this script. I'm sure I'll have good use of it!

I just did a quick test with Myriad Pro, and it works nicely.

Some minor suggestions for usability:

1. If there is no 'typescripts' directory, the typescript and test-file should
be created just in the same directory as the oftsmkr file (so it's easier to
use it anywhere outside the texmf-tree).

2. In the test-file, I had to replace '\start' and '\stop' with '\starttext'
and '\stoptext' (otherwise it doesn't work on my sytem). 

3. The line '\usetypescriptfile [<nameofthetypescriptfile>]' should be
included in the test-file. So the test-file will use the typescript file if it
is in the same directory as the test-file.

4. All the '\definefontalternative' definitions which you print in the
terminal output could be included in the test-file. So the test-file would
work out-of-the-box. 


Thanks for sharing your script!

Best wishes

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04 16:08             ` Michael Murphy
  2010-06-04 16:19               ` Mojca Miklavec
@ 2010-06-04 18:33               ` Hans Hagen
  1 sibling, 0 replies; 24+ messages in thread
From: Hans Hagen @ 2010-06-04 18:33 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4-6-2010 6:08, Michael Murphy wrote:
> On 04/06/2010 12:00, Mojca Miklavec wrote:
>> On Fri, Jun 4, 2010 at 11:52, Michael Murphy wrote:
>>>
>>> I'm also starting to
>>> think that it might be possible to use otfinfo from the lcdf
>>> typetools to
>>> get information about a font
>>
>> Just note: you can get an enormous amount of font information with
>> luatex.
>>
>
> If you can get so much information out of LuaTeX, why do we need
> typescripts in the first place?

because it's the only watertight way; other approaches use heuristics

it all depends on the situation

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04 16:08             ` Michael Murphy
@ 2010-06-04 16:19               ` Mojca Miklavec
  2010-06-04 18:33               ` Hans Hagen
  1 sibling, 0 replies; 24+ messages in thread
From: Mojca Miklavec @ 2010-06-04 16:19 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jun 4, 2010 at 18:08, Michael Murphy wrote:
> On 04/06/2010 12:00, Mojca Miklavec wrote:
>>
>> Just note: you can get an enormous amount of font information with luatex.
>
> If you can get so much information out of LuaTeX, why do we need typescripts
> in the first place?

1.) The typescripts have been written long before LuaTeX existed.
2.) The typescripts still work is almost exactly the same way as they did before
3.) Your can read a lot of information about a specific font (which
features are available, which glyphs exist etc. etc. etc.), but that
still doesn't give you any information about which fonts you want to
combine together and which features you want to use.

Take Antykwa Półtawskiego. It comes as regular/italic, in 4 weights
(light, normal, medium, bold), in 5 widths (extended, semi-extended,
normal, semi-condensed, condensed), about 5 encodings for MKII. You
need to tell to ConTeXt somehow whether you want to combine light and
medium or normal weight and bold, or maybe normal with semi-extended
bold, you may want the size to adapt automatically when you change
font size. There is also no reliable way to determine which fonts
belong together. You still need to assign a font with a variant
somehow.

Reading info about a font doesn't really solve the problem of "being
able to automatically assign rm, bf, bi etc.", but I admit that there
*IS* room for improvement for font handling mechanism in a more
user-friendly way (and lua can be of enormous help of course).

Mojca
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04 10:00           ` Mojca Miklavec
  2010-06-04 10:08             ` luigi scarso
@ 2010-06-04 16:08             ` Michael Murphy
  2010-06-04 16:19               ` Mojca Miklavec
  2010-06-04 18:33               ` Hans Hagen
  1 sibling, 2 replies; 24+ messages in thread
From: Michael Murphy @ 2010-06-04 16:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 04/06/2010 12:00, Mojca Miklavec wrote:
> On Fri, Jun 4, 2010 at 11:52, Michael Murphy wrote:
>>
>> I'm also starting to
>> think that it might be possible to use otfinfo from the lcdf typetools to
>> get information about a font
>
> Just note: you can get an enormous amount of font information with luatex.
>

If you can get so much information out of LuaTeX, why do we need 
typescripts in the first place?

-- 
Michael Murphy
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04 11:16               ` Khaled Hosny
@ 2010-06-04 16:05                 ` Michael Murphy
  0 siblings, 0 replies; 24+ messages in thread
From: Michael Murphy @ 2010-06-04 16:05 UTC (permalink / raw)
  To: ntg-context

On 04/06/2010 13:16, Khaled Hosny wrote:
> On Fri, Jun 04, 2010 at 12:29:32PM +0200, luigi scarso wrote:
>> On Fri, Jun 4, 2010 at 12:21 PM, Mojca Miklavec
>> <mojca.miklavec.lists@gmail.com>  wrote:
>>> On Fri, Jun 4, 2010 at 11:52, Michael Murphy wrote:
>>>>
>>>> As I said, it started out as a private project, but just wanted to see if
>>>> others found it useful.
>>>
>>> What about presenting your work at the ConTeXt conference and in MAPS magazine?
>>>
>>> You'll be able to meet the biggest ConTeXt gurus there, learn a lot
>>> from them, Luigi will give you a short lesson on "Why I switched from
>>> Python to Lua"
>> "Because it's better
>> That's all folks -- free time now"
>>
>> The best presentation ever, even better than Taco's one at last eurotex meeting.
>>
>> I switched from python to Lua x context, this is true;
>> I'm still using it for other tasks, particularly  Plone,
>> and sometimes sagemath.
>> It's not a bad language at all.
>
> When it comes to writing non-luatex code, I'll pick python anytime of
> the day, a light language with almost no standard library is not what
> one always need.
>

Oh God, I really didn't want to generate all this fuss, it's really a 
_very_ primitive script. If I have more time, I'll certainly look into 
Lua, but I chose Python because:

a. it handles complicated string operations, io, regex, etc right out of 
the box, all of which were needed.
b. I'm slightly above noob level with python, as opposed to almost every 
other language (except Fortran, which was not exactly a front-runner)
c. I'm rather more than ignorant about almost every other font tool out 
there

I just reckoned that there has got to be a good way of automatically 
writing those long, complicated typescripts. I did start such a thing in 
emacs, but then realised that its not a very portable solution (although 
I do have a whole bunch of macros for converting LaTeX and AMSmath code 
into ConTeXt if anyone is interested).
-- 
Michael Murphy
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04  9:52         ` Michael Murphy
                             ` (2 preceding siblings ...)
  2010-06-04 10:21           ` Mojca Miklavec
@ 2010-06-04 14:12           ` Vnpenguin
  3 siblings, 0 replies; 24+ messages in thread
From: Vnpenguin @ 2010-06-04 14:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jun 4, 2010 at 11:52, Michael Murphy <michael.murphy@uni-ulm.de> wrote:
> On 04/06/2010 10:50, luigi scarso wrote:
>>
>> On Fri, Jun 4, 2010 at 10:37 AM, Hans Hagen<pragma@wxs.nl>  wrote:
>>>
>>> On 4-6-2010 10:03, Mojca Miklavec wrote:
>>>>
>>>> Whenever I write something I use the language I master most (even if
>>>> it's not the most suitable language for that task), so I guess that
>>>> must be the reason.
>
> As I said, it started out as a private project, but just wanted to see if
> others found it useful. It is not at all like the 'simplefonts' module,
> since it has absolutely no integration with ConTeXt. It simply reads in .otf
> files and spits out typescripts, which can then be used in ConTeXt.
>
> I will try to get an .exe out in the next few days. I'm also starting to
> think that it might be possible to use otfinfo from the lcdf typetools to
> get information about a font, rather than trying to work it out from the
> filename. This might mean being able to use fonts other than those from
> Adobe, which would be nice.
>

Although a Perl user, I like your Python script, Michael !

Thanks
___________________________________________________________________________________
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
___________________________________________________________________________________

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04 10:29             ` luigi scarso
@ 2010-06-04 11:16               ` Khaled Hosny
  2010-06-04 16:05                 ` Michael Murphy
  0 siblings, 1 reply; 24+ messages in thread
From: Khaled Hosny @ 2010-06-04 11:16 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jun 04, 2010 at 12:29:32PM +0200, luigi scarso wrote:
> On Fri, Jun 4, 2010 at 12:21 PM, Mojca Miklavec
> <mojca.miklavec.lists@gmail.com> wrote:
> > On Fri, Jun 4, 2010 at 11:52, Michael Murphy wrote:
> >>
> >> As I said, it started out as a private project, but just wanted to see if
> >> others found it useful.
> >
> > What about presenting your work at the ConTeXt conference and in MAPS magazine?
> >
> > You'll be able to meet the biggest ConTeXt gurus there, learn a lot
> > from them, Luigi will give you a short lesson on "Why I switched from
> > Python to Lua"
> "Because it's better
> That's all folks -- free time now"
> 
> The best presentation ever, even better than Taco's one at last eurotex meeting.
> 
> I switched from python to Lua x context, this is true;
> I'm still using it for other tasks, particularly  Plone,
> and sometimes sagemath.
> It's not a bad language at all.

When it comes to writing non-luatex code, I'll pick python anytime of
the day, a light language with almost no standard library is not what
one always need.


-- 
 Khaled Hosny
 Arabic localiser and member of Arabeyes.org team
 Free font developer
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04 10:21           ` Mojca Miklavec
  2010-06-04 10:25             ` Hans Hagen
@ 2010-06-04 10:29             ` luigi scarso
  2010-06-04 11:16               ` Khaled Hosny
  1 sibling, 1 reply; 24+ messages in thread
From: luigi scarso @ 2010-06-04 10:29 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jun 4, 2010 at 12:21 PM, Mojca Miklavec
<mojca.miklavec.lists@gmail.com> wrote:
> On Fri, Jun 4, 2010 at 11:52, Michael Murphy wrote:
>>
>> As I said, it started out as a private project, but just wanted to see if
>> others found it useful.
>
> What about presenting your work at the ConTeXt conference and in MAPS magazine?
>
> You'll be able to meet the biggest ConTeXt gurus there, learn a lot
> from them, Luigi will give you a short lesson on "Why I switched from
> Python to Lua"
"Because it's better
That's all folks -- free time now"

The best presentation ever, even better than Taco's one at last eurotex meeting.

I switched from python to Lua x context, this is true;
I'm still using it for other tasks, particularly  Plone,
and sometimes sagemath.
It's not a bad language at all.

-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04  8:23     ` luigi scarso
@ 2010-06-04 10:27       ` Hans Hagen
  0 siblings, 0 replies; 24+ messages in thread
From: Hans Hagen @ 2010-06-04 10:27 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 4-6-2010 10:23, luigi scarso wrote:

> (I hope one day we will end without ruby and perl for mkiv too, if reasonable) .

not much perl used in context tools nowadays and not that much ruby 
either in mkiv related tools

> Of course perl, ruby. python,<put_your_favorite_language_here>
> are all goods programming languages
> but mixing them together not always make a good pie .

italian restaurants in NL have quite some choices in pizza .. any 
combination possible -)

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04 10:21           ` Mojca Miklavec
@ 2010-06-04 10:25             ` Hans Hagen
  2010-06-04 10:29             ` luigi scarso
  1 sibling, 0 replies; 24+ messages in thread
From: Hans Hagen @ 2010-06-04 10:25 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mojca Miklavec

On 4-6-2010 12:21, Mojca Miklavec wrote:

> We might even have an official discussion on the schedule about
> typescripts and how to simplify and/or improve them.

.. and how those hugs polish font collections spoil any systematic 
approach -)

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


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04  9:52         ` Michael Murphy
  2010-06-04 10:00           ` Mojca Miklavec
  2010-06-04 10:01           ` luigi scarso
@ 2010-06-04 10:21           ` Mojca Miklavec
  2010-06-04 10:25             ` Hans Hagen
  2010-06-04 10:29             ` luigi scarso
  2010-06-04 14:12           ` Vnpenguin
  3 siblings, 2 replies; 24+ messages in thread
From: Mojca Miklavec @ 2010-06-04 10:21 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jun 4, 2010 at 11:52, Michael Murphy wrote:
>
> As I said, it started out as a private project, but just wanted to see if
> others found it useful.

What about presenting your work at the ConTeXt conference and in MAPS magazine?

You'll be able to meet the biggest ConTeXt gurus there, learn a lot
from them, Luigi will give you a short lesson on "Why I switched from
Python to Lua" and "The first few steps in Lua for font lovers" and
you should be able to work the author of "simplefonts" module
face-to-face to join the best of his and your work ...

We might even have an official discussion on the schedule about
typescripts and how to simplify and/or improve them.

And of course the delicious Czech beer ...

    http://meeting.contextgarden.net/

Mojca
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04 10:00           ` Mojca Miklavec
@ 2010-06-04 10:08             ` luigi scarso
  2010-06-04 16:08             ` Michael Murphy
  1 sibling, 0 replies; 24+ messages in thread
From: luigi scarso @ 2010-06-04 10:08 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jun 4, 2010 at 12:00 PM, Mojca Miklavec
<mojca.miklavec.lists@gmail.com> wrote:
> On Fri, Jun 4, 2010 at 11:52, Michael Murphy wrote:
>>
>> I'm also starting to
>> think that it might be possible to use otfinfo from the lcdf typetools to
>> get information about a font
>
> Just note: you can get an enormous amount of font information with luatex.
Just a note x you : where is showttf ?



-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04  9:52         ` Michael Murphy
  2010-06-04 10:00           ` Mojca Miklavec
@ 2010-06-04 10:01           ` luigi scarso
  2010-06-04 10:21           ` Mojca Miklavec
  2010-06-04 14:12           ` Vnpenguin
  3 siblings, 0 replies; 24+ messages in thread
From: luigi scarso @ 2010-06-04 10:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jun 4, 2010 at 11:52 AM, Michael Murphy
<michael.murphy@uni-ulm.de> wrote:
> I will try to get an .exe out in the next few days. I'm also starting to
> think that it might be possible to use otfinfo from the lcdf typetools to
> get information about a font, rather than trying to work it out from the
> filename. This might mean being able to use fonts other than those from
> Adobe, which would be nice.
You can also see
ttx: is written in python
http://sourceforge.net/projects/fonttools/

-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04  9:52         ` Michael Murphy
@ 2010-06-04 10:00           ` Mojca Miklavec
  2010-06-04 10:08             ` luigi scarso
  2010-06-04 16:08             ` Michael Murphy
  2010-06-04 10:01           ` luigi scarso
                             ` (2 subsequent siblings)
  3 siblings, 2 replies; 24+ messages in thread
From: Mojca Miklavec @ 2010-06-04 10:00 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jun 4, 2010 at 11:52, Michael Murphy wrote:
>
> I'm also starting to
> think that it might be possible to use otfinfo from the lcdf typetools to
> get information about a font

Just note: you can get an enormous amount of font information with luatex.

Mojca
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04  8:50       ` luigi scarso
@ 2010-06-04  9:52         ` Michael Murphy
  2010-06-04 10:00           ` Mojca Miklavec
                             ` (3 more replies)
  0 siblings, 4 replies; 24+ messages in thread
From: Michael Murphy @ 2010-06-04  9:52 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 04/06/2010 10:50, luigi scarso wrote:
> On Fri, Jun 4, 2010 at 10:37 AM, Hans Hagen<pragma@wxs.nl>  wrote:
>> On 4-6-2010 10:03, Mojca Miklavec wrote:
>>> Whenever I write something I use the language I master most (even if
>>> it's not the most suitable language for that task), so I guess that
>>> must be the reason.

As I said, it started out as a private project, but just wanted to see 
if others found it useful. It is not at all like the 'simplefonts' 
module, since it has absolutely no integration with ConTeXt. It simply 
reads in .otf files and spits out typescripts, which can then be used in 
ConTeXt.

I will try to get an .exe out in the next few days. I'm also starting to 
think that it might be possible to use otfinfo from the lcdf typetools 
to get information about a font, rather than trying to work it out from 
the filename. This might mean being able to use fonts other than those 
from Adobe, which would be nice.

-- 
Michael Murphy
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
       [not found] <mailman.1411.1275638618.4277.ntg-context@ntg.nl>
@ 2010-06-04  9:26 ` Vyatcheslav Yatskovsky
  0 siblings, 0 replies; 24+ messages in thread
From: Vyatcheslav Yatskovsky @ 2010-06-04  9:26 UTC (permalink / raw)
  To: ntg-context


> I will probably package it as an .exe when I get the option handling done.

Would be great for average Windows users ;)

-- 
Best Regards,
Vyatcheslav Yatskovsky
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04  8:37     ` Hans Hagen
@ 2010-06-04  8:50       ` luigi scarso
  2010-06-04  9:52         ` Michael Murphy
  0 siblings, 1 reply; 24+ messages in thread
From: luigi scarso @ 2010-06-04  8:50 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jun 4, 2010 at 10:37 AM, Hans Hagen <pragma@wxs.nl> wrote:
> On 4-6-2010 10:03, Mojca Miklavec wrote:
>> Whenever I write something I use the language I master most (even if
>> it's not the most suitable language for that task), so I guess that
>> must be the reason. But if the script proves to be useful, it's still
>> short enough that anyone could convert it to Lua to get rid of
>> dependencies on yet another language.
sorry, but you can not program PIC controller with bash just because
you know bash better than assembly


> indeed; th ecore programs with context are on lua as it makes us independent
> of other installed programs but additional tools can be in any language
> (perl, ruby, python etc)
Other languages are fine of course, but in this context lua is best choice.
Lua is all we need.



-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04  8:03   ` Mojca Miklavec
  2010-06-04  8:23     ` luigi scarso
@ 2010-06-04  8:37     ` Hans Hagen
  2010-06-04  8:50       ` luigi scarso
  1 sibling, 1 reply; 24+ messages in thread
From: Hans Hagen @ 2010-06-04  8:37 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Mojca Miklavec

On 4-6-2010 10:03, Mojca Miklavec wrote:
> On Fri, Jun 4, 2010 at 09:32, luigi scarso wrote:
>>
>> 2) why python ? We have lua in luatex; mkiv has a lot of lua code about fonts.
>
> Hmmm ... the guy who spent most of his time in community trying to
> make python work with ConTeXt is now complaining about the programming
> language? Come on ... :)
>
> Whenever I write something I use the language I master most (even if
> it's not the most suitable language for that task), so I guess that
> must be the reason. But if the script proves to be useful, it's still
> short enough that anyone could convert it to Lua to get rid of
> dependencies on yet another language.

indeed; th ecore programs with context are on lua as it makes us 
independent of other installed programs but additional tools can be in 
any language (perl, ruby, python etc)

in that sense i think that Michael's script is for otf what texfont.rb 
is/was for type 1 so it's a nice addition

i'm not sure if a binary is needed as most users can simply install python

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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04  8:03   ` Mojca Miklavec
@ 2010-06-04  8:23     ` luigi scarso
  2010-06-04 10:27       ` Hans Hagen
  2010-06-04  8:37     ` Hans Hagen
  1 sibling, 1 reply; 24+ messages in thread
From: luigi scarso @ 2010-06-04  8:23 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jun 4, 2010 at 10:03 AM, Mojca Miklavec
<mojca.miklavec.lists@gmail.com> wrote:
> On Fri, Jun 4, 2010 at 09:32, luigi scarso wrote:
>>
>> 2) why python ? We have lua in luatex; mkiv has a lot of lua code about fonts.
>
> Hmmm ... the guy who spent most of his time in community trying to
> make python work with ConTeXt is now complaining about the programming
> language? Come on ... :)
I'm not say that it's wrong.
It's  the same as if I write a lua script to do "XYZ" for Plone: why ?
There are a lot of python code in Plone that probably can be used to do "XYZ".

>
> Whenever I write something I use the language I master most (even if
> it's not the most suitable language for that task), so I guess that
> must be the reason. But if the script proves to be useful, it's still
> short enough that anyone could convert it to Lua to get rid of
> dependencies on yet another language.
A python's programmer  has no problem to write a lua version
(and a javascript programmer too, as  Mathias Nater showed to me)

The key point here is the dependency on another language:
for luatex it's almost useless
to use a scripting/dynamic language other than lua
(I hope one day we will end without ruby and perl for mkiv too, if reasonable) .

Of course perl, ruby. python,<put_your_favorite_language_here>
are all goods programming languages
but mixing them together not always make a good pie .

-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-04  7:32 ` luigi scarso
@ 2010-06-04  8:03   ` Mojca Miklavec
  2010-06-04  8:23     ` luigi scarso
  2010-06-04  8:37     ` Hans Hagen
  0 siblings, 2 replies; 24+ messages in thread
From: Mojca Miklavec @ 2010-06-04  8:03 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Fri, Jun 4, 2010 at 09:32, luigi scarso wrote:
>
> 2) why python ? We have lua in luatex; mkiv has a lot of lua code about fonts.

Hmmm ... the guy who spent most of his time in community trying to
make python work with ConTeXt is now complaining about the programming
language? Come on ... :)

Whenever I write something I use the language I master most (even if
it's not the most suitable language for that task), so I guess that
must be the reason. But if the script proves to be useful, it's still
short enough that anyone could convert it to Lua to get rid of
dependencies on yet another language.

Mojca
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Script to automatically generate typescripts
  2010-06-03 16:51 Michael Murphy
@ 2010-06-04  7:32 ` luigi scarso
  2010-06-04  8:03   ` Mojca Miklavec
  2010-06-07 10:59 ` Thomas Floeren
  1 sibling, 1 reply; 24+ messages in thread
From: luigi scarso @ 2010-06-04  7:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Thu, Jun 3, 2010 at 6:51 PM, Michael Murphy
<michael.murphy@uni-ulm.de> wrote:
> Hi all,
>
> after spending many hours on a typescript only to accidentally delete it, I
> thought that there should be a better way to write them. Hence I wrote a
> python script to do just that.
Two notes
1) is it different from simplefonts (cfr.
http://modules.contextgarden.net/simplefonts) ?
2) why python ? We have lua in luatex; mkiv has a lot of lua code about fonts.

Please consider that  I don't want to discourage anyone about anything
(I know is always hard to write programs).




-- 
luigi
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

* Script to automatically generate typescripts
@ 2010-06-03 16:51 Michael Murphy
  2010-06-04  7:32 ` luigi scarso
  2010-06-07 10:59 ` Thomas Floeren
  0 siblings, 2 replies; 24+ messages in thread
From: Michael Murphy @ 2010-06-03 16:51 UTC (permalink / raw)
  To: ntg-context

Hi all,

after spending many hours on a typescript only to accidentally delete 
it, I thought that there should be a better way to write them. Hence I 
wrote a python script to do just that.

It started out as a private project, but I thought that since it might 
be useful to others, I'd make it available publicly. You can get hold of 
it here:

http://github.com/murphy-md/otftsmrk

Note that it currently only works on Adobe .otf fonts (and this likely 
won't change), and that you need to be using LuaTeX with MkIV, since I 
don't do any of the encoding stuff.

Please send me bug reports / feature requests if you use it!

-- 
Michael Murphy
___________________________________________________________________________________
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
___________________________________________________________________________________


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2010-06-07 10:59 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1395.1275590320.4277.ntg-context@ntg.nl>
2010-06-03 21:33 ` Script to automatically generate typescripts Vyatcheslav Yatskovsky
2010-06-03 22:40   ` Michael Murphy
     [not found] <mailman.1411.1275638618.4277.ntg-context@ntg.nl>
2010-06-04  9:26 ` Vyatcheslav Yatskovsky
2010-06-03 16:51 Michael Murphy
2010-06-04  7:32 ` luigi scarso
2010-06-04  8:03   ` Mojca Miklavec
2010-06-04  8:23     ` luigi scarso
2010-06-04 10:27       ` Hans Hagen
2010-06-04  8:37     ` Hans Hagen
2010-06-04  8:50       ` luigi scarso
2010-06-04  9:52         ` Michael Murphy
2010-06-04 10:00           ` Mojca Miklavec
2010-06-04 10:08             ` luigi scarso
2010-06-04 16:08             ` Michael Murphy
2010-06-04 16:19               ` Mojca Miklavec
2010-06-04 18:33               ` Hans Hagen
2010-06-04 10:01           ` luigi scarso
2010-06-04 10:21           ` Mojca Miklavec
2010-06-04 10:25             ` Hans Hagen
2010-06-04 10:29             ` luigi scarso
2010-06-04 11:16               ` Khaled Hosny
2010-06-04 16:05                 ` Michael Murphy
2010-06-04 14:12           ` Vnpenguin
2010-06-07 10:59 ` Thomas Floeren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).