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

Peter Baker psb6m at virginia.edu
Sun Jan 31 02:37:03 CET 2010


Chris Jones wrote:
>
> I do have a couple of issues to report:
>
> 1. some directories take for ever to scan - typical example is the
>    msttcorefonts package on debian-based distributions.
>
> 2. I tend to like the one-size-fits-all GNU/unifont for my foreign
>    script's needs and pointing your script to it displays the usual
>    "Searching . . .' message and then takes something like fifteen
>    minutes before it returns an error message: "
>    
>   
This is a little more complicated than I expected! It makes a huge 
index, and it's probably running you out of memory while it builds it.

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

Extract it anywhere, and do this:

./fontswith --build-index [path]

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?

Peter



More information about the XeTeX mailing list