[XeTeX] Finding out if a font supports a particular Unicode character and using it
Peter Baker
psb6m at virginia.edu
Sun Jan 31 04:00:04 CET 2010
Yes, the Mac charmap is great, and the maintainers of the feeble Linux
equivalents could learn a lot from it.
Even so, I think my little script could sometimes be useful for Mac
users. For one thing, it's just as happy to search through a directory
of uninstalled fonts as it is a directory of installed ones.
Sent from my iPod
On Jan 30, 2010, at 7:58 AM, Philipp Stephani <st_philipp at yahoo.de>
wrote:
> But on Mac OS X, you don't need anything special: The built-in
> character map already shows which fonts contain the selected
> character.
>
> Am 29.01.2010 um 23:52 schrieb hh:
>
>> Even not having a MAC, I would imagine that OpenOffice (free
>> availability for MAC OS X) does allow to look even at the otf-fonts
>> via the Menupoint "Insert -> Special Character" as it does in
>> Windows.
>> hh
>>
>>
>> Date sent: Fri, 29 Jan 2010 14:18:12 -0500
>> From: Peter Baker <psb6m at virginia.edu>
>> To: Unicode-based TeX for Mac OS X and other platforms
>> <xetex at tug.org>
>> Subject: Re: [XeTeX] Finding out if a font supports a particular
>> Unicode
>> character and using it
>> Send reply to: Unicode-based TeX for Mac OS X and other platforms
>> <xetex at tug.org>
>> <mailto:xetex-request at tug.org?subject=unsubscribe>
>> <mailto:xetex-request at tug.org?subject=subscribe>
>>
>>> R (Chandra) Chandrasekhar wrote:
>>>>
>>>>
>>>> 1. How might I find out if a chosen font does indeed provide this
>>>> symbol? I am on Kubuntu 9.10 and have kcharselect and gucharmap,
>>>> but
>>>> do not know of an efficient way of finding this out. Are there any
>>>> utilities to do this efficiently?
>>>>
>>> This kind of question seems to me to come up pretty regularly on
>>> this
>>> list. I don't know about kcharselect, but gucharmap is a poor tool
>>> for
>>> this purpose, since you can't tell it to look *only* in a particular
>>> font; it just silently substitutes whatever it can find in the
>>> system.
>>>
>>> I thought I'd try to come up with a rough-and-ready script that
>>> would
>>> search a directory tree for fonts containing a particular glyph.
>>> To use
>>> this you need FontForge (with its python bindings): on Mac, Ubuntu
>>> and
>>> most other Linuxes I believe the standard FontForge package should
>>> give
>>> you what you need. You need to have the "find" utility on the
>>> system, so
>>> Linux and Mac should both work fine.
>>>
>>> Just copy this script to some place convenient (maybe /usr/local/
>>> bin),
>>> make it executable, and invoke it like this
>>>
>>> fontswith [path] glyph
>>>
>>> [path] is the place to start looking: default is /usr/share/fonts.
>>> glyph
>>> is either a glyphname (e.g. A, Edieresis) or a Unicode value in
>>> the form
>>> U+2605. Fonts containing the glyph should be printed on stdout.
>>>
>>> To keep from being distracted by warning messages from FontForge,
>>> stderr
>>> is captured and errors are printed on stdout. Kludgy! But as I
>>> said, the
>>> script is rough-and-ready.
>>>
>>> In case attachments aren't allowed on this list, I've also posted
>>> the
>>> script here: http://faculty.virginia.edu/OldEnglish/fontswith/fontswith.zip
>>> .
>>>
>>> Peter
>>>
>>>
>>
>>
>>
>>
>> --------------------------------------------------
>> Subscriptions, Archive, and List information, etc.:
>> http://tug.org/mailman/listinfo/xetex
>
>
>
>
> --------------------------------------------------
> Subscriptions, Archive, and List information, etc.:
> http://tug.org/mailman/listinfo/xetex
More information about the XeTeX
mailing list