On 5/18/2014 5:33 AM, Erik van der Wal wrote: > Hello Satya, > >> I had to substitute Arial for Helvetica using ~/.fonts.conf, since >> Helvetica is not available in TTF under Cygwin. > If you look in cairo.c:xc_cairo_set_fontinfo I perform some replacements > myself, without changing fonts.conf. First I would like xcircuit to work > 'out-of-the-box'. Second by changing fonts.conf, it will change the fonts for > every other application as well. > > Could you check if the attached patch works for cygwin? > > I changed the list, so that it can now contain multiple replacements. > It now first starts to look for the URW fonts, then for windows it continues > along the list and finds the windows font names. > If it still does not succeed, or the font name is not in the list, it will > ask fontconfig if the exact font name is present. (I do not let fontconfig do > the replacement). If this is not the case, I try the css font family names, > before eventually ending up with the stroke fonts. Hello Erik,
Thanks for the very quick response. I think I had misdiagnosed the problem. cygwin isn't configured to use the Windows systems fonts by default. Turns out I had the postscript fonts in Windows, probably from some Adobe software. I had to add a file /etc/fonts/conf.d/01-windows.conf with the following contents, followed by fc-cache: <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig> <!--Add windows font dir --> <dir>/cygdrive/c/Windows/fonts</dir> </fontconfig> Now "fc-match Helvetica" returns the correct font, but xcircuit still uses Vera Sans instead of Helvetica (I tell from the shape of 'e' character). The latest patch seems to use Helvetica/Arial, but the + and - signs are replaced by squares. Screenshot is at http://flic.kr/p/nnLsV8 I have never figured out fontconfig very well, so it's possible I'm doing something completely wrong. Thanks, Satya _______________________________________________ Xcircuit-dev mailing list Xcircuit-dev@opencircuitdesign.com http://www.opencircuitdesign.com/mailman/listinfo/xcircuit-dev