字体渲染有关开源库
Pango
Pango is a library for laying out and rendering of text, with an emphasis on internationalization. Pango can be used anywhere that text layout is needed, though most of the work on Pango so far has been done in the context of the GTK widget toolkit. Pango forms the core of text and font handling for GTK.
Complex-text support is provided by HarfBuzz, on all platforms.
The integration of Pango with Cairo provides a complete solution with high quality text handling and graphics rendering.
As well as the low-level layout rendering routines, Pango includes PangoLayout, a high-level driver for laying out entire blocks of text, and routines to assist in editing internationalized text.
渲染流程见:Pango – 1.0: The Rendering Pipeline (gtk.org)
see also
Pango Font Rendering · Issue #2576 · polybar/polybar (github.com)
Text Rendering Notes - Inkscape Wiki
HarfBuzz
HarfBuzz is a text shaping engine. It primarily supports OpenType, but also Apple Advanced Typography. HarfBuzz is used in Android, Chrome, ChromeOS, Firefox, GNOME, GTK+, KDE, LibreOffice, OpenJDK, PlayStation, Qt, XeTeX, and other places.
在某些语言和艺术字方面,当两个或多个单独的字符组合到一起的时候,可能就变成了另外的字符。harfbuzz可以根据某种语言或者某种艺术字的特性,重新整形,得到正确的字符串。在此过程中,harfbuzz就像一个中间件。
see also
[HarfBuzz] HarfBuzz API design (lists.freedesktop.org)
Harfbuzz API 基本用法 - 简书 (jianshu.com)
Fontconfig
Fontconfig is a library for configuring and customizing font access.
Fontconfig can:
- discover new fonts when installed automatically, removing a common source of configuration problems.
- perform font name substitution, so that appropriate alternative fonts can be selected if fonts are missing.
- identify the set of fonts required to completely cover a set of languages.
- have GUI configuration tools built as it uses an XML-based configuration file (though with autodiscovery, we believe this need is minimized).
- efficiently and quickly find the fonts you need among the set of fonts you have installed, even if you have installed thousands of fonts, while minimzing memory usage.
- be used in concert with the X Render Extension and FreeType to implement high quality, anti-aliased and subpixel rendered text on a display.
Fontconfig does not:
- render the fonts themselves (this is left to FreeType or other rendering mechanisms)
- depend on the X Window System in any fashion, so that printer only applications do not have such dependencies
Graphite
Graphite is a rendering engine for graphite fonts. These are TrueType fonts with additional tables containing smart rendering information and were originally developed to support complex non-Roman writing systems. They may contain rules for e.g. ligatures, glyph substitution, kerning, justification - this can make them useful even on text written in Roman writing systems such as English. Note that firefox by default provides an internal copy of the graphite engine and cannot use a system version (although it can now be patched to use it), but it too should benefit from the availability of graphite fonts.
Graphite was primarily developed to provide the flexibility needed for minority languages which often need to be written according to slightly different rules than well-known languages that use the same script.
Examples of complex script behaviors Graphite can handle include:
- contextual shaping
- ligatures
- reordering
- split glyphs
- bidirectionality
- stacking diacritics
- complex positioning
- shape aware kerning
- automatic diacritic collision avoidance
FriBidi
The FriBidi package is an implementation of the Unicode Bidirectional Algorithm (BIDI). This is useful for supporting Arabic and Hebrew alphabets in other packages.
FTGL
FTGL is a free cross-platform Open Source C++ library that uses Freetype2 to simplify rendering fonts in OpenGL applications. FTGL supports bitmaps, pixmaps, texture maps, outlines, polygon mesh, and extruded polygon rendering modes.
libass
libass is a portable subtitle renderer for the ASS/SSA (Advanced Substation Alpha/Substation Alpha) subtitle format. It is mostly compatible with VSFilter.
【C++】使用 libass,完成 Direct3D 11 下的字幕渲染 - 最后的绅士 - 博客园 (cnblogs.com)
OpenType
The OpenType font format is a widely-supported format for font data with a rich set of capabilities for digital typography. It was developed as an extension of the original TrueType format, using the same 'sfnt' container structure, and maintains compatibility for fonts that were created following the original TrueType specification.
Others
codehz/minecraft-unicode-font-generator: minecraft unicode font textures generator (github.com)
本文来自博客园,作者:koala999,转载请注明原文链接:https://www.cnblogs.com/koala999/p/16988774.html