ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* getting the glyph of a character
       [not found] <mailman.1.1493546401.16571.ntg-context@ntg.nl>
@ 2017-05-01  7:38 ` Jeong Dal
  0 siblings, 0 replies; 5+ messages in thread
From: Jeong Dal @ 2017-05-01  7:38 UTC (permalink / raw)
  To: ntg-context


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

Dear all.

At page 50-52 of  the manual of metapost, “Mpman”, it is explained to get a glyph of font using the command ‘glyph'.
glyph ⟨numeric expression⟩ of ⟨string expression⟩ 

glyph ⟨string expression⟩ of ⟨string expression⟩ . 

Is it possible to do the similar thing in metafun?

I couldn’t make it happen using the following code.

\startbuffer[outline]
%fontmapfile "=lm-ec.map";
  picture q;
  path p;
  interim ahlength := 12bp;
  interim ahangle := 25;
  q := glyph 100 of "ArialMT"; %nfont defaultfont  scaled defaultscale;
 draw q;
\stopbuffer

\starttext
\processMPbuffer[outline]
\stoptext

if the first line “fontmapfile …” is alive, then fatal error occurred.
Without it, it is running without error, but no output at all.

I copied the sample code in mpman below.

Thank you for reading.

Best regards,

Dalyoung
************


fontmapfile “=lm-ec.map”;
beginfig(56);
  picture q;
  path p;
  interim ahlength := 12bp;
  interim ahangle := 25;
  q := glyph "Dcaron" of "ec-lmr10" scaled .2;
  for item within q:
    p := pathpart item;
    drawarrow p withcolor (.6,.9,.6)
        withpen pencircle scaled 1.5;
    for j=0 upto length p:
      pickup pencircle scaled .7;
      draw (point j of p -- precontrol j of p)
          dashed evenly withcolor blue;
      draw (point j of p -- postcontrol j of p)
          dashed evenly withcolor blue;
      pickup pencircle scaled 3;
      draw precontrol j of p withcolor red;
      draw postcontrol j of p withcolor red;
      pickup pencircle scaled 2;
      draw point j of p withcolor black;
    endfor
  endfor
endfig; 

 



> 2017. 4. 30. 오후 7:00, ntg-context-request@ntg.nl 작성:
> 
> Send ntg-context mailing list submissions to
> 	ntg-context@ntg.nl
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	https://mailman.ntg.nl/mailman/listinfo/ntg-context
> or, via email, send a message with subject or body 'help' to
> 	ntg-context-request@ntg.nl
> 
> You can reach the person managing the list at
> 	ntg-context-owner@ntg.nl
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ntg-context digest..."
> 
> 
> Today's Topics:
> 
>   1. Re: Wrong redirection in contextgarden.net (Mojca Miklavec)
>   2. Re: Wrong redirection in contextgarden.net (Nicola)
>   3. Re: Wrong redirection in contextgarden.net (Mojca Miklavec)
>   4. High-level command for translated names (Henri Menke)
>   5. Re: High-level command for translated names (Wolfgang Schuster)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Sat, 29 Apr 2017 18:05:14 +0200
> From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
> To: mailing list for ConTeXt users <ntg-context@ntg.nl>
> Subject: Re: [NTG-context] Wrong redirection in contextgarden.net
> Message-ID:
> 	<CALBOmsbtKZqWA9k7vfnjOyAcUMyc3xs8Hu9Gg-Pyx-yXMBX8pQ@mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
> 
> On 29 April 2017 at 09:47, Nicola wrote:
>> For a while now, when I connect to contextgarden.net, I get redirected
>> to wiki.contextgarden.net// (note the double slash). Is it just me, or
>> something to be fixed in the web site?
> 
> The server uses
>    RedirectMatch permanent ^(.*)$ http://wiki.contextgarden.net/$1
> 
> I'm looking for a better suggestion.
> 
> Mojca
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Sat, 29 Apr 2017 20:25:20 +0200
> From: Nicola <nvitacolonna@gmail.com>
> To: ntg-context@ntg.nl
> Subject: Re: [NTG-context] Wrong redirection in contextgarden.net
> Message-ID: <oe2lqb$ehk$1@blaine.gmane.org>
> Content-Type: text/plain; charset=utf-8; format=flowed
> 
> On 29/04/2017 18:05, Mojca Miklavec wrote:
>> On 29 April 2017 at 09:47, Nicola wrote:
>>> For a while now, when I connect to contextgarden.net, I get redirected
>>> to wiki.contextgarden.net// (note the double slash). Is it just me, or
>>> something to be fixed in the web site?
>> 
>> The server uses
>>    RedirectMatch permanent ^(.*)$ http://wiki.contextgarden.net/$1
>> 
>> I'm looking for a better suggestion.
> 
> Wouldn't just
> 
>   Redirect permanent / http://wiki.contextgarden.net/
> 
> do? (It may be recursive if the virtual host is the same.)
> 
> If not, how about:
> 
> RedirectMatch permanent ^/(.*)$ http://wiki.contextgarden.net/$1
> 
> As a last resource, mod_rewrite should work:
> 
> RewriteEngine on
> RewriteCond %{HTTP_HOST} ^contextgarden\.net$ [NC]
> RewriteRule ^(.*)$ http://wiki.contextgarden.net/$1 [R=301,L]
> 
> Nicola
> 
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Sat, 29 Apr 2017 21:29:06 +0200
> From: Mojca Miklavec <mojca.miklavec.lists@gmail.com>
> To: mailing list for ConTeXt users <ntg-context@ntg.nl>
> Subject: Re: [NTG-context] Wrong redirection in contextgarden.net
> Message-ID:
> 	<CALBOmsY9FrHhO7gN65nyePaZptf14e06mVmZkCvNA=5ypWUy5g@mail.gmail.com>
> Content-Type: text/plain; charset=UTF-8
> 
> On 29 April 2017 at 20:25, Nicola <nvitacolonna@gmail.com> wrote:
>> On 29/04/2017 18:05, Mojca Miklavec wrote:
>>> 
>>> On 29 April 2017 at 09:47, Nicola wrote:
>>>> 
>>>> For a while now, when I connect to contextgarden.net, I get redirected
>>>> to wiki.contextgarden.net// (note the double slash). Is it just me, or
>>>> something to be fixed in the web site?
>>> 
>>> 
>>> The server uses
>>>    RedirectMatch permanent ^(.*)$ http://wiki.contextgarden.net/$1
>>> 
>>> I'm looking for a better suggestion.
>> 
>> Wouldn't just
>> 
>>  Redirect permanent / http://wiki.contextgarden.net/
>> 
>> do? (It may be recursive if the virtual host is the same.)
>> 
>> If not, how about:
>> 
>> RedirectMatch permanent ^/(.*)$ http://wiki.contextgarden.net/$1
>> 
>> As a last resource, mod_rewrite should work:
>> 
>> RewriteEngine on
>> RewriteCond %{HTTP_HOST} ^contextgarden\.net$ [NC]
>> RewriteRule ^(.*)$ http://wiki.contextgarden.net/$1 [R=301,L]
> 
> Thank you for suggestions, I'll do some testing.
> 
> In case I forget, please remind me about this after the 4th May. We
> currently have as good as no internet connectivity and I would hate to
> break the server while experimenting and then being unable to do
> anything afterwards.
> 
> Mojca
> 
> 
> ------------------------------
> 
> Message: 4
> Date: Sun, 30 Apr 2017 21:38:20 +1200
> From: Henri Menke <henrimenke@gmail.com>
> To: ntg-context@ntg.nl
> Subject: [NTG-context] High-level command for translated names
> Message-ID: <2e2a759a-25aa-5f58-847d-b66d664ef0ca@gmail.com>
> Content-Type: text/plain; charset=utf-8
> 
> Dear list,
> 
> Inspired by this question on TeX.SX https://tex.stackexchange.com/questions/367433
> 
> How can I get the translated names for chapter and section depending on the currently active language.  I know they are there in lang-txt.lua, but cannot be accessed via \labeltext.  One can access them through Lua but that doesn't seem so elegant.
> 
> 
> 
> \def\chaptername{%
>  \ctxlua{%
>    context(languages.data.labels.texts.chapter.labels["\currentlanguage"])}}
> 
> \starttext
> 
> \language[en] \chaptername
> 
> \language[de] \chaptername
> 
> \stoptext
> 
> 
> 
> Cheers,
> Henri
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Sun, 30 Apr 2017 11:41:19 +0200
> From: Wolfgang Schuster <schuster.wolfgang@gmail.com>
> To: mailing list for ConTeXt users <ntg-context@ntg.nl>
> Subject: Re: [NTG-context] High-level command for translated names
> Message-ID: <5905B13F.60205@gmail.com>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
> 
> 
>> Henri Menke <mailto:henrimenke@gmail.com>
>> 30. April 2017 um 11:38
>> Dear list,
>> 
>> Inspired by this question on TeX.SX 
>> https://tex.stackexchange.com/questions/367433
>> 
>> How can I get the translated names for chapter and section depending 
>> on the currently active language. I know they are there in 
>> lang-txt.lua, but cannot be accessed via \labeltext. One can access 
>> them through Lua but that doesn't seem so elegant.
> The problem are the
> 
>     ["hidden"]=true,
> 
> table entries for these labels, removing them would make the labels 
> accessable.
> 
> Wolfgang
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <http://mailman.ntg.nl/pipermail/ntg-context/attachments/20170430/e55f6a90/attachment-0001.html>
> 
> ------------------------------
> 
> Subject: Digest Footer
> 
> ___________________________________________________________________________________
> 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  : https://foundry.supelec.fr/projects/contextrev/
> wiki     : http://contextgarden.net
> ___________________________________________________________________________________
> 
> ------------------------------
> 
> End of ntg-context Digest, Vol 154, Issue 50
> ********************************************


[-- Attachment #1.2.1: Type: text/html, Size: 16830 bytes --]

[-- Attachment #1.2.2: page53image7872.png --]
[-- Type: image/png, Size: 2105 bytes --]

[-- Attachment #1.2.3: page53image14176.png --]
[-- Type: image/png, Size: 8231 bytes --]

[-- Attachment #2: Type: text/plain, Size: 492 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] 5+ messages in thread

* Re: getting the glyph of a character
  2017-05-02  1:20   ` Mohammad Hossein Bateni
@ 2017-05-02  2:46     ` Alan Braslau
  0 siblings, 0 replies; 5+ messages in thread
From: Alan Braslau @ 2017-05-02  2:46 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On Mon, 1 May 2017 21:20:33 -0400
Mohammad Hossein Bateni <bateni@gmail.com> wrote:

> MetaPost's documentation mentions that glyph operator works on Adobe
> Type 1 fonts.  Does it also work with OpenType fonts when used from
> within LuaTeX and CONTEXT?

The metafun manual gives many ways of manipulating text.
(the metapost "glyph" operator is a bit archaic...)

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

* Re: getting the glyph of a character
  2017-05-01 23:36 ` Jeong Dal
@ 2017-05-02  1:20   ` Mohammad Hossein Bateni
  2017-05-02  2:46     ` Alan Braslau
  0 siblings, 1 reply; 5+ messages in thread
From: Mohammad Hossein Bateni @ 2017-05-02  1:20 UTC (permalink / raw)
  To: mailing list for ConTeXt users


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

MetaPost's documentation mentions that glyph operator works on Adobe Type 1
fonts.  Does it also work with OpenType fonts when used from within LuaTeX
and CONTEXT?

On Mon, May 1, 2017 at 7:36 PM, Jeong Dal <haksan@me.com> wrote:

> Dear all,
>
> First of all, the sample code is working under the ConTeXt
> beta(standalone) installed in my notebook.
> I am very sorry to send mails of false result.
>
> I found the file “lm-ec.map” installed in the ConTeXt beta(standalone),
> and I don’t know why it was not working in the iMac. I have to check the
> installation.
>
> However, I’d like to know how to make map files of the fonts in the system
> for which the map file is not provided?
>
> Thank you for reading.
>
> Best regards,
>
> Dalyoung
>
>
> \startbuffer[outline]
> fontmapfile "=lm-ec.map";
> %beginfig(56);
> picture q;
> path p;
> interim ahlength := 12bp;
> interim ahangle := 25;
> q := glyph “E" of "ec-lmr10" scaled .2;
> %draw q;
>  for item within q:
>   p := pathpart item;
>   draw p withcolor (.6,.9,.6)
>       withpen pencircle scaled 1.5;
> endfor
> \stopbuffer
>
> \starttext
> \processMPbuffer[outline]
> \stoptext
> ____________________________________________________________
> _______________________
> If your question is of interest to others as well, please add an entry to
> the Wiki!
>
> maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/
> 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
> ____________________________________________________________
> _______________________
>

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

[-- Attachment #2: Type: text/plain, Size: 492 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] 5+ messages in thread

* Re: getting the glyph of a character
       [not found] <mailman.1453.1493624302.2050.ntg-context@ntg.nl>
  2017-05-01 23:14 ` Jeong Dal
@ 2017-05-01 23:36 ` Jeong Dal
  2017-05-02  1:20   ` Mohammad Hossein Bateni
  1 sibling, 1 reply; 5+ messages in thread
From: Jeong Dal @ 2017-05-01 23:36 UTC (permalink / raw)
  To: list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl
	ntg-context@ntg.nl

Dear all,

First of all, the sample code is working under the ConTeXt beta(standalone) installed in my notebook.
I am very sorry to send mails of false result.

I found the file “lm-ec.map” installed in the ConTeXt beta(standalone), and I don’t know why it was not working in the iMac. I have to check the installation.

However, I’d like to know how to make map files of the fonts in the system for which the map file is not provided?

Thank you for reading.

Best regards,

Dalyoung


\startbuffer[outline]
fontmapfile "=lm-ec.map";
%beginfig(56);
picture q;
path p;
interim ahlength := 12bp;
interim ahangle := 25;
q := glyph “E" of "ec-lmr10" scaled .2;
%draw q;
 for item within q:
  p := pathpart item;
  draw p withcolor (.6,.9,.6)
      withpen pencircle scaled 1.5;
endfor
\stopbuffer

\starttext
\processMPbuffer[outline]
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] 5+ messages in thread

* Re: getting the glyph of a character
       [not found] <mailman.1453.1493624302.2050.ntg-context@ntg.nl>
@ 2017-05-01 23:14 ` Jeong Dal
  2017-05-01 23:36 ` Jeong Dal
  1 sibling, 0 replies; 5+ messages in thread
From: Jeong Dal @ 2017-05-01 23:14 UTC (permalink / raw)
  To: list ntg-context@ntg.nl ntg-context@ntg.nl ntg-context@ntg.nl
	ntg-context@ntg.nl

Dear all,

In the previous mail, I tested the given code under the ConTeXt beta(standalone) which has no file “lm-ec.map” installed, so I couldn’t get the result.
But the following sample is working under MKIV in TeXlive 2016.
It looks great.

I guess that it is also working any font if the map file is provided. 
If my guess is true, is it possible to make map files of the fonts in the system?

Thank you for reading.

Best regards,

Dalyoung


\startbuffer[outline]
fontmapfile "=lm-ec.map";
%beginfig(56);
 picture q;
 path p;
 interim ahlength := 12bp;
 interim ahangle := 25;
 q := glyph “E" of "ec-lmr10" scaled .2;
 %draw q;
  for item within q:
   p := pathpart item;
   draw p withcolor (.6,.9,.6)
       withpen pencircle scaled 1.5;
 endfor
\stopbuffer

\starttext
\processMPbuffer[outline]
\stoptext
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/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] 5+ messages in thread

end of thread, other threads:[~2017-05-02  2:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <mailman.1.1493546401.16571.ntg-context@ntg.nl>
2017-05-01  7:38 ` getting the glyph of a character Jeong Dal
     [not found] <mailman.1453.1493624302.2050.ntg-context@ntg.nl>
2017-05-01 23:14 ` Jeong Dal
2017-05-01 23:36 ` Jeong Dal
2017-05-02  1:20   ` Mohammad Hossein Bateni
2017-05-02  2:46     ` Alan Braslau

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