||2 years ago|
|.builds||2 years ago|
|doc||2 years ago|
|fcft||2 years ago|
|unicode||2 years ago|
|.gitignore||2 years ago|
|.gitlab-ci.yml||2 years ago|
|.gitmodules||2 years ago|
|CHANGELOG.md||2 years ago|
|LICENSE||2 years ago|
|PKGBUILD||2 years ago|
|README.md||2 years ago|
|fcft.c||2 years ago|
|generate-unicode-precompose.sh||2 years ago|
|generate-version.sh||2 years ago|
|log.c||2 years ago|
|log.h||2 years ago|
|meson.build||2 years ago|
|meson_options.txt||2 years ago|
|test.c||2 years ago|
fcft is a small font loading and glyph rasterization library built on-top of FontConfig, FreeType2 and pixman.
It can load and cache fonts from a fontconfig-formatted name string,
Monospace:size=12, optionally with user configured fallback fonts.
After a font has been loaded, you can rasterize glyphs. When doing so, the primary font is first considered. If it does not have the requested glyph, the user configured fallback fonts (if any) are considered. If none of the user configured fallback fonts has the requested glyph, the FontConfig generated list of fallback fonts are checked.
The API is documented as man pages. These are built and installed when fcft is built as a standalone project, but not when built as a subproject.
- harfbuzz (optional)
- tllist, unless built as a subproject
- Supports all fonts loadable by FreeType2
- Subpixel antialiasing
- Color bitmap fonts (emoji fonts)
- Font caching
- Glyph caching
- Subpixel positioning
Remember, this is a simple library, not a full blown layout engine.
Projects using fcft
You can either install fcft as a system library, or use it as a meson subproject (assuming your project is meson based, of course).
If you install fcft as a system library, you can use
get the compiler flags needed to find and link against fcft.
If your project is meson based, you can use fcft as a subproject. In
your main project's
meson.build, do something like:
fcft = subproject('fcft').get_variable('fcft') executable('you-executable', ..., dependencies: [fcft])
Or, if fcft has been installed as a system library, a regular
fcft = dependency('fcft')
will suffice. Optionally, you can combine the two; search for a system library first, and fallback to a subproject:
fcft = dependency('fcft', version: '>=0.4.0', fallback: 'fcft')
For most users, this is typically enough:
meson build --buildtype=release ninja -C build ninja -C build test sudo ninja -C build install
The tests require at least one latin font to be installed.
By default, fcft will be built with support for text-shaping if
HarfBuzz is available. You can explicitly enable or disable this
-Dtext-shaping=disabled|enabled|auto meson command line
If text-shaping is enabled, you might also want to enable the
associated tests. Use
-Dtest-text-shaping=true to do so. Note that
these tests require an emoji font to be installed, and
fc-match emoji must return that font first.
fcft is released under the MIT license.
fcft uses Unicode data files released under the Unicode, INC. License Agreement.
only basic kerning supported (i.e. the old 'kern' tables, not the new 'GPOS' tables) ↩︎