[XeTeX] Finding out if a font supports a particular Unicode character and using it
Peter Baker
psb6m at virginia.edu
Sun Jan 31 23:42:50 CET 2010
Chris Jones wrote:
> Where is the index file created?
>
> Does [path] specify the path-to-index-file or more likey
> path-to-fontfile?
>
By default the index is ~/.fontswith/fontswith.index.bz2.
[path] is the place to start looking for fonts: I use "find" to create a
list, and of course that excellent utility searches the whole tree
starting at [path].
If you want something different, create it like this:
fontswith --build-index /path/to/fonts index-file
If you don't want the index bzipped, use an option --no-bz2 or -n.
>
> I attempted to build an index file against GNU/unifont with the latest
> version of fontswith and eventually had to do a hard reset of the linux
> system. Apparently I had run out of memory. I waited about fifteen
> minutes before I did the hard reset, giving fontswith what I thought was
> a reasonable amount of time to terminate.
>
> The last stats I saw indicated that fontswith was using over one Gig of
> memory - about 300 Meg of RAM and about 50% of my swap partition, which
> is a little under 1.5 Gig.
>
> So, I must be misusing the script some way or other because I can't see
> how indexing a 16Meg font file would require that much memory: I tried
> limiting memory to something reasonable setting a maximum of 128Meg for
> my shell and children processes via bash ulimit -v command, but this
> caused fontswith to abort with an 'Attempt to allocate memory failed'
> error message.
>
> Or would that be a python 2.5 bug/limitation I'm running into?
>
I'm amazed. I just tried this on an ancient computer that the kids use:
old Ubuntu (vintage April 2008), 512 Megs of Ram, limited disk, Python
2.5.2. I installed the unifont in /usr/share/fonts/unifont and ran:
fontforge -script fontswith --build-index -v
It reported that it was indexing 127 fonts; it paused for about five
seconds on the unifont, but completed the index in 96 seconds.
I can't think what might be going on.
Peter
More information about the XeTeX
mailing list