Displays information about a given font
fontinfo -f file [-S size] [-v] [-r] [-s dir] [-t file] [-c ch] [-C ch] [-u][<code|code-code> [...]]
Neutrino
The fontinfo utility returns information and metrics about each glyph in a given font file, or for a specified code list or range(s).
You can render each glyph in the font file to the screen (using ASCII characters) by using the -r option. You can render only a subset of glyphs in the font file by specifing a code range.
The unicode tab file that is used by the -t argument must use the following format:
<Unicode hexcode>,<character description>For example: 0021,EXCLAMATION MARK 0022,QUOTATION MARK 0023,NUMBER SIGN 0024,DOLLAR SIGN 0025,PERCENT SIGN 0026,AMPERSAND You can obtain a unicode tab file from www.unicode.org. |
In the following example, the fontinfo utility is called using the font file webt.ttf. Each glyph in the file is rendered to the screen using the . character. The size of each glyph is 20 characters.
fontinfo -f web.ttf -r -C . -S 20
The output for a single glyph in the font file is shown below:
Range: 0x2030 (8240) 0x2030 (8240, utf8:0xe2 0x80 0xb0, glyph index:16): Size: 26,22, render offset: 0,22 Metrics: Adv.=001B.0000, BearingX,Y=0000.0000,0000.0540, maxX=0000.0680 ... ... ..... .. ... ... .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ... ... ... ..... .. ... .. .... ... .. ...... ..... .. ... ... ... ... .. .. .. .. .. .. .. .. .. .. .. .. .. .. .. ... .. .. .. .. .. .. .. .. .. .. ... ... ... ... .. ...... ..... .. .... ...
In the following example, the fontinfo utility is called using the / character to fill the white space around the glyph. The font size is set to 15.
fontinfo -f web.ttf -r -C / -S 15
The output for a single glyph in the font file is shown below:
Range: 0x2030 (8240) 0x2030 (8240, utf8:0xe2 0x80 0xb0, glyph index:16): Size: 19,17, render offset: 0,17 Metrics: Adv.=0014.0000, BearingX,Y=0000.0000,0000.0400, maxX=0000.04C0 /////////////////// ////////**///////// /***////*////////// **/**///*////////// *///*//*/////////// *///*//*/////////// *///*//*/////////// **/**/*//////////// /***//*//////////// //////*//***///***/ /////*//**/**/**/** /////*//*///*/*///* ////*///*///*/*///* ////*///*///*/*///* ////*///*///*/*///* ///*////**/**/**/** ///*/////***///***/
In the Photon Programmer's Guide see: Fonts