Any known C# library or project out there that can understand the TTF file format? Most questions Ive seen regarding this are attempting to do custom rendering, but I'm more interested in a font editor type of application.
3 Answers
I want to introduce another pure C# lib for processing font. Here https://github.com/LayoutFarm/Typography
Pure C#
support .NET >=20
access general glyph data,
and access advanced typography data.
(such as GDEF,GSUB,GPOS) etc.
The below image shows some screen snapshot,
compare then lib's rendering glyph 'B'
(left) : glyph from the lib without Hinting
(middle) : Windows's GDI with clear type (from notepad)
(right): glyph from the lib with True Hinting
snap 2: I'm developing auto-hint, and grid fitting.
test it out, and feel free to comment, fork, discuss.
snap 3: subpixel rendering

- 231
- 2
- 3
-
Pure C#. hooray!! C# world need a raw C# font/text library. I won't find the amazing project if you hadn't post here. Thank you! – zwcloud Feb 04 '17 at 17:48
-
Off the top of my head, could this be used to convert ttf fonts to woff? – user1932634 Dec 05 '17 at 15:14
-
This looks interesting. Doesn't seem to be any documentation for this though. Going to see if I can make sense of the demo examples. – solstice333 Feb 06 '19 at 23:13
Don't know what you want to do exactly, but WPF has a cool GlyphTypeface Class that is quite abstract and quite independent.
This is how you can start with:
GlyphTypeface ttf = new GlyphTypeface(new Uri(@"c:\windows\fonts\verdana.ttf"));
There are also the GlyphRun Class and the GlyphRunDrawing Class.
Otherwise, if you're looking for the big picture, open-source, you can also check the FreeType Project, available here: http://freetype.org/

- 132,049
- 21
- 248
- 298
-
Simon, are these low level enough to try to tackle a font editor application? Good info in any case – Brady Moritz Jan 08 '11 at 16:27
-
1For a font editor, I would rather go for the FreeType Project. The WPF classes targets mostly font file parsing & glyph rendering, rather than glyph edition. Tough work ahead anyway :-) – Simon Mourier Jan 08 '11 at 20:45
-
There is a .net wrapper for FreeType available here: https://github.com/Robmaister/SharpFont
It's also available on nuget:
PM> Install-Package SharpFont

- 6,790
- 1
- 59
- 60