\namedglyph (was: [XeTeX] \XeTeXglyphindex: just a short note)
Hello, Some time ago Jonathan implemented a new \XeTeXglyphindex command to retrieve the glyph from current font by name (it currently only works for OpenType, but that's the most important). \getglyph is already taken, I used it in the example below just because I didn't think of a better name. Would it name sense to provide a \namedglyph macro in ConTeXt for XeTeX users as well? (Hopefully the feature will be available in pdfTeX as well ;) I don't mind if LaTeX & ConTeXt use the same syntax every now and then ;) (In the future: It might make sense to provide an optional field to retrieve a glyph from any font, not just from the current one, but I'm not sure about what the exact interface should be and if it would be optional it can be added later anyway.) Any thoughts? Mojca On 8/12/06, Will Robertson wrote:
On 11/06/2006, at 21:09 , Mojca Miklavec wrote:
\def\getglyph#1{\XeTeXglyph\XeTeXglyphindex "#1"} \font\A='Antykwa Torunska' \A
Thank you, Jonathan, I \getglyph{heart} this new feature!
Just to follow up on this; for LaTeX users, the new version of the xltxtra package will include this macro under the name "\namedglyph" (it's actually Jonathan's improved version).
Cheers,
Will
Mojca Miklavec wrote:
Would it name sense to provide a \namedglyph macro in ConTeXt for XeTeX users as well? (Hopefully the feature will be available in pdfTeX as well ;)
\namedglyph is too generic; you ask for a \fontglyph\font{name} and even then, there probably is not sucha primitive, but just a lua call which will consult the font data so that one can also take care of missign glyphs anyhow, such a command needs to be defined for each engine, with proper fallbacks which is not somthing i'm gonna do as a quick hack/fix. Now, for the moment you can use your definition which you can always (some time in the future) map onto a context one. This way of asking for a glyph is low level anyway. Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (2)
-
Hans Hagen
-
Mojca Miklavec