ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Laundry symbols (now: altered picture)
@ 2012-06-05 13:18 Procházka Lukáš Ing. - Pontex s. r. o.
  2012-06-05 14:26 ` Marco
  2022-01-02 14:12 ` Alfredo Catalina via ntg-context
  0 siblings, 2 replies; 11+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-06-05 13:18 UTC (permalink / raw)
  To: ConTeXt

[-- Attachment #1: Type: text/plain, Size: 394 bytes --]

Hello ConTeXters,

is there a way how to get laundry symbols into ConTeXt?

- The image is copied from "The Comprehensive LATEX Symbol List", Scott Pakin.

TIA.

Best regards,

Lukas


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

[-- Attachment #2: LaunSyms3.png --]
[-- Type: image/png, Size: 5387 bytes --]

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 11+ messages in thread

* Re: Laundry symbols (now: altered picture)
  2012-06-05 13:18 Laundry symbols (now: altered picture) Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-06-05 14:26 ` Marco
  2012-06-05 14:32   ` Wolfgang Schuster
  2022-01-02 14:12 ` Alfredo Catalina via ntg-context
  1 sibling, 1 reply; 11+ messages in thread
From: Marco @ 2012-06-05 14:26 UTC (permalink / raw)
  To: ntg-context

On 2012-06-05 Procházka Lukáš Ing. - Pontex s. r. o. <LPr@pontex.cz> wrote:

> is there a way how to get laundry symbols into ConTeXt?

The proper way would be to use ConTeXts symbol mechanism. I guess
the symbols can then be accessed my name. However, I didn't find the
laundry symbol names in any MkIV file in the distribution. It seems
that nobody maintained an up-to-date list.

You can always access the characters directly:

\getglyph{marvosym}{\char 247}

To find out which symbols are at which slot, use

\showfont [marvosym]


Marco


___________________________________________________________________________________
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] 11+ messages in thread

* Re: Laundry symbols (now: altered picture)
  2012-06-05 14:26 ` Marco
@ 2012-06-05 14:32   ` Wolfgang Schuster
  2012-06-05 14:57     ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2012-06-05 14:32 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 05.06.2012 um 16:26 schrieb Marco:

> On 2012-06-05 Procházka Lukáš Ing. - Pontex s. r. o. <LPr@pontex.cz> wrote:
> 
>> is there a way how to get laundry symbols into ConTeXt?
> 
> The proper way would be to use ConTeXts symbol mechanism. I guess
> the symbols can then be accessed my name. However, I didn't find the
> laundry symbol names in any MkIV file in the distribution. It seems
> that nobody maintained an up-to-date list.
> 
> You can always access the characters directly:
> 
> \getglyph{marvosym}{\char 247}
> 
> To find out which symbols are at which slot, use
> 
> \showfont [marvosym]

It’s easier to create a list with all symbols and their names.

\usesymbols[mvs]

\starttext
\showsymbolset[martinvogel 2]
\stoptext

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

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


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

* Re: Laundry symbols (now: altered picture)
  2012-06-05 14:32   ` Wolfgang Schuster
@ 2012-06-05 14:57     ` Procházka Lukáš Ing. - Pontex s. r. o.
  2012-06-05 15:01       ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-06-05 14:57 UTC (permalink / raw)
  To: mailing list for ConTeXt users

[-- Attachment #1: Type: text/plain, Size: 1219 bytes --]

... Thanks both for your answers.

My code so far is:

----
\usesymbols[mvs]

\starttext
   \startcolumns[n=2,rule=on]
     \showsymbolset[martinvogel 2]
   \stopcolumns

   \page
   \startcolumns[n=4,rule=on]
     \dorecurse{1024}{\recurselevel --\getglyph{marvosym}{\char\recurselevel\par}}
   \stopcolumns
\stoptext
----

And how to access symbols by their names, e.g. how to use symbol named "AtForty"?

- The symbol list shows only symbolic names, not values (to be used with Marco's \char <value>).

\AtForty gives error, so is it to be used with \usesymbol or \symbol or something like that?

Lukas


On Tue, 05 Jun 2012 16:32:49 +0200, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:


>> \getglyph{marvosym}{\char 247}
>>
>> To find out which symbols are at which slot, use
>>
>> \showfont [marvosym]
>
> It’s easier to create a list with all symbols and their names.
>
> \usesymbols[mvs]
>
> \starttext
> \showsymbolset[martinvogel 2]
> \stoptext


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

[-- Attachment #2: Laundry.mkiv --]
[-- Type: application/octet-stream, Size: 264 bytes --]

\usesymbols[mvs]

\starttext
  \startcolumns[n=2,rule=on]
    \showsymbolset[martinvogel 2]
  \stopcolumns

  \page
  \startcolumns[n=4,rule=on]
    \dorecurse{1024}{\recurselevel --\getglyph{marvosym}{\char\recurselevel\par}}
  \stopcolumns
\stoptext

[-- Attachment #3: Type: text/plain, Size: 485 bytes --]

___________________________________________________________________________________
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] 11+ messages in thread

* Re: Laundry symbols (now: altered picture)
  2012-06-05 14:57     ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-06-05 15:01       ` Wolfgang Schuster
  2012-06-05 15:13         ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2012-06-05 15:01 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 05.06.2012 um 16:57 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> ... Thanks both for your answers.
> 
> My code so far is:
> 
> ----
> \usesymbols[mvs]
> 
> \starttext
>  \startcolumns[n=2,rule=on]
>    \showsymbolset[martinvogel 2]
>  \stopcolumns
> 
>  \page
>  \startcolumns[n=4,rule=on]
>    \dorecurse{1024}{\recurselevel --\getglyph{marvosym}{\char\recurselevel\par}}
>  \stopcolumns
> \stoptext
> ----
> 
> And how to access symbols by their names, e.g. how to use symbol named "AtForty"?
> 
> - The symbol list shows only symbolic names, not values (to be used with Marco's \char <value>).
> 
> \AtForty gives error, so is it to be used with \usesymbol or \symbol or something like that?

\usesymbols[mvs]

\starttext
\symbol[martinvogel 2][ShortForty]
\stoptext

or

\usesymbols[mvs]

\setupsymbolset[martinvogel 2]

\starttext
\symbol[ShortForty]
\stoptext

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

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


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

* Re: Laundry symbols (now: altered picture)
  2012-06-05 15:01       ` Wolfgang Schuster
@ 2012-06-05 15:13         ` Procházka Lukáš Ing. - Pontex s. r. o.
  2012-06-05 16:06           ` Wolfgang Schuster
  0 siblings, 1 reply; 11+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-06-05 15:13 UTC (permalink / raw)
  To: mailing list for ConTeXt users

Thank you, Wolfgang.

Two more questions, hope there'll be no more about this stuff.

On Tue, 05 Jun 2012 17:01:28 +0200, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:

> \usesymbols[mvs]
>
> \starttext
> \symbol[martinvogel 2][ShortForty]
> \stoptext
>
> or
>
> \usesymbols[mvs]
>
> \setupsymbolset[martinvogel 2]
>
> \starttext
> \symbol[ShortForty]
> \stoptext
>
> Wolfgang

- How to scale the desired symbol, e.g. 5 times? I played with "scale" somehow, but no effect.

- Where the symbol set name "martinvogel 2" comes from? Is it a name "built in" the font file?

- - Is "2" part of the name or does it mean something, e.g. a factor?

Thanks again.

Best regards,

Lukas


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
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] 11+ messages in thread

* Re: Laundry symbols (now: altered picture)
  2012-06-05 15:13         ` Procházka Lukáš Ing. - Pontex s. r. o.
@ 2012-06-05 16:06           ` Wolfgang Schuster
  2012-06-06  6:40             ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 1 reply; 11+ messages in thread
From: Wolfgang Schuster @ 2012-06-05 16:06 UTC (permalink / raw)
  To: mailing list for ConTeXt users


Am 05.06.2012 um 17:13 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:

> Thank you, Wolfgang.
> 
> Two more questions, hope there'll be no more about this stuff.
> 
> On Tue, 05 Jun 2012 17:01:28 +0200, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
> 
>> \usesymbols[mvs]
>> 
>> \starttext
>> \symbol[martinvogel 2][ShortForty]
>> \stoptext
>> 
>> or
>> 
>> \usesymbols[mvs]
>> 
>> \setupsymbolset[martinvogel 2]
>> 
>> \starttext
>> \symbol[ShortForty]
>> \stoptext
>> 
>> Wolfgang
> 
> - How to scale the desired symbol, e.g. 5 times? I played with "scale" somehow, but no effect.

It scales with the current font size.

\usesymbols[mvs]

\setupsymbolset[martinvogel 2]

\starttext
\symbol[ShortForty] {\tfd\symbol[ShortForty]}
\stoptext

> - Where the symbol set name "martinvogel 2" comes from? Is it a name "built in" the font file?

The symbols are defined in symb-imp-mvs.mkiv, with \usesymbols[…] you load the file.

> - - Is "2" part of the name or does it mean something, e.g. a factor?

The symbols are just put in named groups and “martinvogel 2” is the name of one of these groups (there is also “martinvogel 1”, don’t know how created these names).


When you define a symbol you can set the name as

   \definesymbol[<name>]{<symbol>}

or out it in a category with

   \definesymbol[<category>][<name>]{<symbol>}


When you have many symbols which you want to put in a category you can say

   \startsymbolset [<category>]

   \definesymbol[<name 1>]{<symbol 1>}
   \definesymbol[<name 2>]{<symbol 2>}

   \stopsymbolset

and omit the first argument. To print a symbol from this symbolset you have to write

   \symbol[<category>][<name>]

but when you add

   \setupsymbolset[<category>]

to your document ConTeXt will search in this symbol set even when you write only

   \symbol[<name>]

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

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

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

* Re: Laundry symbols (now: altered picture)
  2012-06-05 16:06           ` Wolfgang Schuster
@ 2012-06-06  6:40             ` Procházka Lukáš Ing. - Pontex s. r. o.
  0 siblings, 0 replies; 11+ messages in thread
From: Procházka Lukáš Ing. - Pontex s. r. o. @ 2012-06-06  6:40 UTC (permalink / raw)
  To: mailing list for ConTeXt users

... OK, much clearer now.

Thanks for explanation.

Best regards,

Lukas


On Tue, 05 Jun 2012 18:06:28 +0200, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:

>
> Am 05.06.2012 um 17:13 schrieb Procházka Lukáš Ing. - Pontex s. r. o.:
>
>> Thank you, Wolfgang.
>>
>> Two more questions, hope there'll be no more about this stuff.
>>
>> On Tue, 05 Jun 2012 17:01:28 +0200, Wolfgang Schuster <schuster.wolfgang@googlemail.com> wrote:
>>
>>> \usesymbols[mvs]
>>>
>>> \starttext
>>> \symbol[martinvogel 2][ShortForty]
>>> \stoptext
>>>
>>> or
>>>
>>> \usesymbols[mvs]
>>>
>>> \setupsymbolset[martinvogel 2]
>>>
>>> \starttext
>>> \symbol[ShortForty]
>>> \stoptext
>>>
>>> Wolfgang
>>
>> - How to scale the desired symbol, e.g. 5 times? I played with "scale" somehow, but no effect.
>
> It scales with the current font size.
>
> \usesymbols[mvs]
>
> \setupsymbolset[martinvogel 2]
>
> \starttext
> \symbol[ShortForty] {\tfd\symbol[ShortForty]}
> \stoptext
>
>> - Where the symbol set name "martinvogel 2" comes from? Is it a name "built in" the font file?
>
> The symbols are defined in symb-imp-mvs.mkiv, with \usesymbols[…] you load the file.
>
>> - - Is "2" part of the name or does it mean something, e.g. a factor?
>
> The symbols are just put in named groups and “martinvogel 2” is the name of one of these groups (there is also “martinvogel 1”, don’t know how created these names).
>
>
> When you define a symbol you can set the name as
>
>    \definesymbol[<name>]{<symbol>}
>
> or out it in a category with
>
>    \definesymbol[<category>][<name>]{<symbol>}
>
>
> When you have many symbols which you want to put in a category you can say
>
>    \startsymbolset [<category>]
>
>    \definesymbol[<name 1>]{<symbol 1>}
>    \definesymbol[<name 2>]{<symbol 2>}
>
>    \stopsymbolset
>
> and omit the first argument. To print a symbol from this symbolset you have to write
>
>    \symbol[<category>][<name>]
>
> but when you add
>
>    \setupsymbolset[<category>]
>
> to your document ConTeXt will search in this symbol set even when you write only
>
>    \symbol[<name>]
>
> Wolfgang


-- 
Ing. Lukáš Procházka [mailto:LPr@pontex.cz]
Pontex s. r. o.      [mailto:pontex@pontex.cz] [http://www.pontex.cz]
Bezová 1658
147 14 Praha 4

Tel: +420 244 062 238
Fax: +420 244 461 038

___________________________________________________________________________________
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] 11+ messages in thread

* Re: Laundry symbols (now: altered picture)
  2012-06-05 13:18 Laundry symbols (now: altered picture) Procházka Lukáš Ing. - Pontex s. r. o.
  2012-06-05 14:26 ` Marco
@ 2022-01-02 14:12 ` Alfredo Catalina via ntg-context
  2022-01-02 14:36   ` Hans Hagen via ntg-context
  1 sibling, 1 reply; 11+ messages in thread
From: Alfredo Catalina via ntg-context @ 2022-01-02 14:12 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Alfredo Catalina


[-- Attachment #1.1: Type: text/plain, Size: 943 bytes --]

I'm trying to use ConTeXt with Metafun to produce a map of a videogame I
am working on. In fact I did it 9 years ago but it seems that now it
doesn't work.

I have two 32 pixels wide by 40 pixels high sprites. They are saved in the
skysprite.png and sandsprite.png files. Since 32 = 4 x 8 and 40 = 5 x 8,
the width/height ratio is 4/5.

This should produce a page with a sky sprite and a sand sprite, one
below the other. It worked in the past. Each sprite should be 4 x 0.095 cm
= 0,38 cm wide and 5 x 0.095 cm = 0.475 cm high:

\starttext
\setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,8pt]}]
\startuseMPgraphic{mapa}
u:=.095cm;
draw externalfigure "./skysprite.png" xscaled 4u yscaled 5u shifted
(0u,-0u);
draw externalfigure "./sandsprite.png" xscaled 4u yscaled 5u shifted
(0u,-5u);
\stopuseMPgraphic
\useMPgraphic{mapa}
\stoptext

But instead I got two huge sprites of 2.8 cm x 4.4 cm.

Am I forgetting something?

Thanks

[-- Attachment #1.2: Type: text/html, Size: 1202 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

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

* Re: Laundry symbols (now: altered picture)
  2022-01-02 14:12 ` Alfredo Catalina via ntg-context
@ 2022-01-02 14:36   ` Hans Hagen via ntg-context
  2022-01-02 17:10     ` Alfredo Catalina via ntg-context
  0 siblings, 1 reply; 11+ messages in thread
From: Hans Hagen via ntg-context @ 2022-01-02 14:36 UTC (permalink / raw)
  To: mailing list for ConTeXt users; +Cc: Hans Hagen, Alfredo Catalina

On 1/2/2022 3:12 PM, Alfredo Catalina via ntg-context wrote:
> I'm trying to use ConTeXt with Metafun to produce a map of a videogame I 
> am working on. In fact I did it 9 years ago but it seems that now it 
> doesn't work.
> 
> I have two 32 pixels wide by 40 pixels high sprites. They are saved in 
> the skysprite.png and sandsprite.png files. Since 32 = 4 x 8 and 40 = 5 
> x 8, the width/height ratio is 4/5.
> 
> This should produce a page with a sky sprite and a sand sprite, one 
> below the other. It worked in the past. Each sprite should be 4 x 0.095 
> cm = 0,38 cm wide and 5 x 0.095 cm = 0.475 cm high:
> 
> \starttext
> \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,8pt]}]
> \startuseMPgraphic{mapa}
> u:=.095cm;
> draw externalfigure "./skysprite.png" xscaled 4u yscaled 5u shifted 
> (0u,-0u);
> draw externalfigure "./sandsprite.png" xscaled 4u yscaled 5u shifted 
> (0u,-5u);
> \stopuseMPgraphic
> \useMPgraphic{mapa}
> \stoptext
> 
> But instead I got two huge sprites of 2.8 cm x 4.4 cm.
> 
> Am I forgetting something?
Originally that worked because the image was always 'included' at 1 bp 
and then scaled but that was (1) inaccurate and (2) a bit depending on 
the image and (3) could overflow metapost.

Use xsized and ysized instead (absolute measures instead of scaling the 
unknown)

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
___________________________________________________________________________________

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

* Re: Laundry symbols (now: altered picture)
  2022-01-02 14:36   ` Hans Hagen via ntg-context
@ 2022-01-02 17:10     ` Alfredo Catalina via ntg-context
  0 siblings, 0 replies; 11+ messages in thread
From: Alfredo Catalina via ntg-context @ 2022-01-02 17:10 UTC (permalink / raw)
  Cc: Alfredo Catalina, mailing list for ConTeXt users


[-- Attachment #1.1: Type: text/plain, Size: 2057 bytes --]

Great! Thanks Hans, now it works. I replaced the "draw externalfigure"
commands by

draw externalfigure "./skysprite.png" xsized 4u ysized 5u shifted (0u,-0u);
draw externalfigure "./sandsprite.png" xsized 4u ysized 5u shifted (0u,-5u);

Best regards

On Sun, Jan 2, 2022 at 3:36 PM Hans Hagen <j.hagen@xs4all.nl> wrote:

> On 1/2/2022 3:12 PM, Alfredo Catalina via ntg-context wrote:
> > I'm trying to use ConTeXt with Metafun to produce a map of a videogame I
> > am working on. In fact I did it 9 years ago but it seems that now it
> > doesn't work.
> >
> > I have two 32 pixels wide by 40 pixels high sprites. They are saved in
> > the skysprite.png and sandsprite.png files. Since 32 = 4 x 8 and 40 = 5
> > x 8, the width/height ratio is 4/5.
> >
> > This should produce a page with a sky sprite and a sand sprite, one
> > below the other. It worked in the past. Each sprite should be 4 x 0.095
> > cm = 0,38 cm wide and 5 x 0.095 cm = 0.475 cm high:
> >
> > \starttext
> > \setupMPinstance[metafun][textstyle={\switchtobodyfont[termes,8pt]}]
> > \startuseMPgraphic{mapa}
> > u:=.095cm;
> > draw externalfigure "./skysprite.png" xscaled 4u yscaled 5u shifted
> > (0u,-0u);
> > draw externalfigure "./sandsprite.png" xscaled 4u yscaled 5u shifted
> > (0u,-5u);
> > \stopuseMPgraphic
> > \useMPgraphic{mapa}
> > \stoptext
> >
> > But instead I got two huge sprites of 2.8 cm x 4.4 cm.
> >
> > Am I forgetting something?
> Originally that worked because the image was always 'included' at 1 bp
> and then scaled but that was (1) inaccurate and (2) a bit depending on
> the image and (3) could overflow metapost.
>
> Use xsized and ysized instead (absolute measures instead of scaling the
> unknown)
>
> 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
> -----------------------------------------------------------------
>

[-- Attachment #1.2: Type: text/html, Size: 2883 bytes --]

[-- Attachment #2: Type: text/plain, Size: 493 bytes --]

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

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

end of thread, other threads:[~2022-01-02 17:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-05 13:18 Laundry symbols (now: altered picture) Procházka Lukáš Ing. - Pontex s. r. o.
2012-06-05 14:26 ` Marco
2012-06-05 14:32   ` Wolfgang Schuster
2012-06-05 14:57     ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-06-05 15:01       ` Wolfgang Schuster
2012-06-05 15:13         ` Procházka Lukáš Ing. - Pontex s. r. o.
2012-06-05 16:06           ` Wolfgang Schuster
2012-06-06  6:40             ` Procházka Lukáš Ing. - Pontex s. r. o.
2022-01-02 14:12 ` Alfredo Catalina via ntg-context
2022-01-02 14:36   ` Hans Hagen via ntg-context
2022-01-02 17:10     ` Alfredo Catalina via ntg-context

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