\starttypescript [sans][dingbats][name] \definefontsynonym [Sans][file:d050000l] \stoptypescript \definetypeface [dingbats][ss][sans][dingbats][default] \starttext {\getnamedglyphdirect{dingbats}{0x272a}} Or here's the character directly: ✪ \stoptext Anyone else running Ubuntu who can confirm that this doesn't work using the dingbats font installed by Ghostscript? Also doesn't work if you replace file:d050000l with name:dingbats and yet: $ mtxrun --script fonts --list --all --pattern=dingbat* dingbats dingbats /usr/share/fonts/type1/gsfonts/d050000l.afm dingbatsnormal dingbats /usr/share/fonts/type1/gsfonts/d050000l.afm mathew
Hi, On 03/22/2011 05:08 PM, mathew wrote:
{\getnamedglyphdirect{dingbats}{0x272a}}
this won't do anything unless the glyph's *name* in the font is actually 0x272a, which is unlikely (in my version of the ghostscript font, the name of ✪ is "a37").
Or here's the character directly: ✪
This does not work for two reasons: First, you have defined a typeface dingbats, but have not switched to it. There is no font switch in the line you used, so you are still in the normal latin modern font. The second, and more important, reason why this does not work, is because the ghostscript fonts have odd names for the dingbat glyphs, and context has no way of knowing that they are actually supposed to be in unicode encoding. So, you need a way to find the glyph's name. A (hopefully) working recipe follows. First, run this file: \usemodule[fnt-10] \starttext \ShowCompleteFont{name:dingbats}{10pt}{1} \stoptext that should give you five or six pages of output in columns: <used encoding>, <actual glyph>, <glyph id>, <glyph name>, <aliases> Look at the output, then use the <actual glyph> to find the <glyph name> for ✪ (as I said, for me that is "a37"). Having found the name, you can get the glyph with this bit of code: \getnamedglyphdirect{name:dingbats}{a37} % for me Best wishes, Taco
participants (2)
-
mathew
-
Taco Hoekwater