NRSI: Computers & Writing Systems
GetGlyphPts is a simple Windows utility that reports the points that specify a glyph outline as reported by the Windows API. The coordinates for the points are expressed in logical units (ie based on font size and screen resolution) and do reflect any hinting on the glyph. The point data can optionally be written to a file.
Source code in C is included to show how the Windows GetGlyphOutline() function is called and how the resulting data structures are parsed.
For more information on TrueType fonts and how glyph outlines are specified using points see An Introduction to TrueType Fonts.
Start the program in the usual way (eg double click on it)
Select Control + I ). In the resulting dialog, fill in the glyph id for the glyph of interest and optionally provide a file name (with fully qualified path) for the point data to be written to. A file that already exists will have the data appended when the data is written (below). The glyph id can be found using another utility, such as ViewGlyph.(or press
Select Control + F ) then choose a font from the dialog. Normally using a large point size is helpful.(or press
The point data for each contour composing the glyph will be diplayed in the client area. Also displayed are the font name, the height of the font in logical units, and the glyph id. The height will be a negative number because of the requirements of the Windows API. See Microsoft's SDK documention on the CreateFont() function for an explanation. Most people can ignore the negative sign.
Optionally choose Control + W ) to write the data to the previously specified file (above). Data is appended to the end of the file if it already exists.(or press
The zip archive contains the compiled program and the C source code (but not an entire compilable project).
Copyright 2000 SIL International
Note: If you want to add a response to this article, you need to enable cookies in your browser, and then restart your browser.
Note: the opinions expressed in submitted contributions below do not necessarily reflect the opinions of our website.