ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* Selecting character by glyph index
@ 2014-08-18  5:48 Idris Samawi Hamid ادريس سماوي حامد
  2014-08-18  9:07 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Idris Samawi Hamid ادريس سماوي حامد @ 2014-08-18  5:48 UTC (permalink / raw)
  To: ntg-context

Dear consortium,

Is there a command analogous to \char or \fontchar which allows me to  
select a glyph by its index in the font? In most font editors you can  
choose "Index Mode" which shows the "physical" ordering of the glyphs  
independent of encoding etc.

I thought that \charNN (where 'NN' is a decimal integer) did this, but it  
does not seem to select the correct indexed glyph for a \definefont,  
making me wonder in MkIV has changed its behavior. For example, choosing   
\char35 gives me glyph index 223, not glyph 35.

In any case, for the current (already tedious) project this is a feature  
that is sorely needed; if there is a way to hack a quick lua-based command  
to do it, I would appreciate any help I can get. Perhaps a future version  
of \fontchar can add this as an option... Thanks in advance and

Best wishes
Idris
-- 
Idris Samawi Hamid
Professor of Philosophy
Colorado State University
Fort Collins, CO 80523
___________________________________________________________________________________
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] 2+ messages in thread

* Re: Selecting character by glyph index
  2014-08-18  5:48 Selecting character by glyph index Idris Samawi Hamid ادريس سماوي حامد
@ 2014-08-18  9:07 ` Hans Hagen
  0 siblings, 0 replies; 2+ messages in thread
From: Hans Hagen @ 2014-08-18  9:07 UTC (permalink / raw)
  To: mailing list for ConTeXt users

On 8/18/2014 7:48 AM, Idris Samawi Hamid ادريس سماوي حامد wrote:
> Dear consortium,
>
> Is there a command analogous to \char or \fontchar which allows me to
> select a glyph by its index in the font? In most font editors you can
> choose "Index Mode" which shows the "physical" ordering of the glyphs
> independent of encoding etc.
>
> I thought that \charNN (where 'NN' is a decimal integer) did this, but
> it does not seem to select the correct indexed glyph for a \definefont,
> making me wonder in MkIV has changed its behavior. For example,
> choosing  \char35 gives me glyph index 223, not glyph 35.
>
> In any case, for the current (already tedious) project this is a feature
> that is sorely needed; if there is a way to hack a quick lua-based
> command to do it, I would appreciate any help I can get. Perhaps a
> future version of \fontchar can add this as an option... Thanks in
> advance and

you cannot trust an index ... use names as these are more stable

\setupbodyfont[dejavu]

\starttext

\fontchar{a}
\fontchar{alpha}
\fontchar{three}
\fontchar{uni1ECB.dotless}
\fontchar{delta}
\fontchar{delta.smcp}

\stoptext




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

end of thread, other threads:[~2014-08-18  9:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-18  5:48 Selecting character by glyph index Idris Samawi Hamid ادريس سماوي حامد
2014-08-18  9:07 ` Hans Hagen

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