Samuel Thibault, le Sun 29 Aug 2010 21:08:05 +0200, a écrit : > We could even imagine to > rasterize a vector font on the fly for very big sizes.
otf2bdf and bdf2psf could be used for that, for instance if the user specifies the width (which will be the most probable use, people usually don't care how many lines there are, but do care how many characters per line there are; it's also the most difficult since fonts size is configured through height, not width): WIDTH=1024 HEIGHT=768 SCREEN_WIDTH=80 GLYPH_WIDTH=$(($WIDTH / $SCREEN_WIDTH)) GLYPH_HEIGHT=$(($GLYPH_WIDTH * 18 / 10)) otf2bdf -r 72 -p $GLYPH_HEIGHT /usr/share/fonts/truetype/ttf-dejavu/DejaVuSansMono.ttf | sed -e "s/AVERAGE_WIDTH.*/AVERAGE_WIDTH ${GLYPH_WIDTH}0/" > /tmp/font.bdf bdf2psf --fb /tmp/font.bdf /usr/share/bdf2psf/standard.equivalents /usr/share/bdf2psf/ascii.set 256 /tmp/font.psf There are just a few issues: bdf2psf wants an average width dividible by 10 and uses it as maximum width. This doesn't really make sense, letter 'i' for instance makes the average way smaller than what is needed for @ or W :) Perhaps bdf2psf could be made to have an option to specify the width instead. Also, I've here cheated by hardcoding a 18/10 ratio. I don't know how we could get this from the font file. Samuel