[XeTeX] Finding out if a font supports a particular Unicode character and using it

Chris Jones cjns1989 at gmail.com
Sun Jan 31 23:19:47 CET 2010


On Sat, Jan 30, 2010 at 08:37:03PM EST, Peter Baker wrote:

[..]

> Get the current version:  
> http://faculty.virginia.edu/OldEnglish/fontswith/fontswith.zip

Done.

> Extract it anywhere, and do this:
>
> ./fontswith --build-index [path]

Where is the index file created? 

Does [path] specify the path-to-index-file or more likey
path-to-fontfile?

> Specify the path if you don't want the default. Go have some tea. It
> will take its time and make a huge index named fonts.index. To add
> more fonts just do that same thing with another path, or the same if
> you've added a font there. From now on use that index to search:

> ./fontswith fonts.index U+FB01

> I installed the unifont, and the current version of fontswith indexed
> it  fine. If you continue having trouble, and if you're using Python
> 2.6.x,  can you open the script, find a couple of places where "except
> Exception  as d" is commented out, uncomment that, comment out the
> next line,  uncomment the following (sys.stdout.write(str(d))), run
> again, and tell  me what it says?

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?

Thanks,

CJ






More information about the XeTeX mailing list