Get single glyph metrics (.net)
Asked Answered
S

2

9

How can I get full information about single glyph from choosen font (for example Arial -> symbol "A")

This picture describe what variables I need to find:

Glyph metrics

Sathrum answered 13/5, 2011 at 16:57 Comment(0)
A
3

You can start with the FontFamily class.

and this CP article http://www.codeproject.com/KB/GDI-plus/ExtendedGraphicsII.aspx

Aisne answered 13/5, 2011 at 17:25 Comment(0)
S
1

I don't think FontFamily will give any information about a particular glyph, but the DirectWrite interface might work: (I haven't used it yet)

Sortition answered 16/4, 2014 at 0:32 Comment(1)
Yes, with IDWriteFontFace::GetGlyphIndices GetMetrics, GetGlyphMetrics, and IDWriteFontFace1::GetCaretMetrics, using the DWRITE_FONT_METRICS::ascent/descent/xHeight/capHeight, DWRITE_GLYPH_METRICS::width, DWRITE_CARET_METRICS::slopeRise/slopeRun.Stormie

© 2022 - 2024 — McMap. All rights reserved.