I’m trying to make a GlyphRun instance for use in a GlyphRunDrawing, but the documentation is just so bad that it’s almost comical. For example, the parameter renderingEmSize is described like this:
renderingEmSizeType: System.Double
A value of type Double.
Just… wow.
I know what an “em” is in a font (width of the em dash), but I don’t know what the grid units are. Device pixels? Device independent pixels?
Turns out the answer is in the source code. Thanks for MS making this available, if they are going to make eyes bleed on the docs.
Interestingly, all the information we need is contained in the xml doc comments on
GlyphRun.cs. TherenderingEmSizefor example, is as follows:The rest of the file is similarly well-commented, including this seemingly out-of-place but gripping read:
The whole file can be found here: GlyphRun.cs at webtropy