how to write programs using advanced OpenType features?
How could I write a simple program using OpenType tables in order to dynamically render text?
please answer in :
- assembly , C , C++ , C# , java or Python (and a little WPF:-)
or introduce libraries of them.
comments and answers about text rendering system of common Operating Systems, or designing text engines compatible with unicode 5.02 p开发者_Python百科rotocol are welcomed.
FreeType only offers basic rendering capabilities and does not support advanced OpenType features. Lots of years ago, FreeType 1.x contained a module that provided OpenType functionality, but this became its own project: HarfBuzz. If you need something that works everywhere (every OS/platform), it should be the best solution. The excellent pango library provides a high-level interface for HarfBuzz, among other things.
Windows provides an OpenType engine, called Uniscribe. The same goes for OS X, which has ATSUI.
That should get you started, I hope.
I don't know if this will satisfy your needs or not, but I've used the FreeType library in the past to render TrueType text. It is quite flexible and easily ported between various platforms (Linux, Windows, OSX, etc.). Also, the licensing (BSD-style) is such that using it in commercial applications is not a problem.
Pure C#, https://github.com/LayoutFarm/Typography
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,
snap1 : 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
精彩评论