| 
     
      
      
      From: Philipp A. <tru...@go...> - 2009-09-22 20:46:09
      
     
   | 
2009/9/21 George Williams <gw...@si...>
On Tue, 2009-09-15 at 09:45, tru...@go... wrote:
> > hi,
> > if you open a font by hand, select a glyph and export it by the
> > file▸export menu,
> I presume you mean that you also open the glyph. There is not a
> File->Export menu item in the font view.
> > you get a bitmap containing the char (though it should be black on
> > transparent, not black on white, but that would be another
> > bug/feature)
> Well that's not the default export format, but there certainly are
> bitmap formats which you can select. And, most of those formats
> (Xbitmap, BMP) do not support transparent colors. If you think this is a
> bug please report it to someone else.
> > if you use a script like the one appended, you get correctly named
> > files containing one white pixel (no matter which file extension).
> > the pixelsize-argument of the export-method doesn’t seem to do
> > anything.
> No script was appended.
>
> I used the following script, and it produced a bitmap image which looked
> correct.
>        import fontforge;
>        font=fontforge.activeFont();
>        glyph=font['a'];
>        glyph.export("foo.png",100,8);
strange, i had 2 files attached, one of which being the script.
here is it again:
#! /usr/bin/env python
# -*- coding: utf-8 -*-
import fontforge
for gly in fontforge.open("cursor.bdf").glyphs():
	gly.export(gly.glyphname + ".png")
i’m not on my linux, so i only can thank you and try it when i’m there
 |