freedesktop.fontconfig
importfontconfig 2.15.0 — font discovery and matching, every generated file produced by build.mcpp
import freedesktop.fontconfig;
#include <fontconfig/fontconfig.h>
模块名读自上游 src/fontconfig.cppm 里的 `export module` 声明。
mcpp add freedesktop.fontconfig@2.15.0
用法
来自本仓库自己的测试项目 —— CI 真的编译并运行过,不是为了网站写的。
// freedesktop.fontconfig — the three generated tables, exercised through the
// public API.
//
// WHAT CAN BE ASSERTED WITHOUT FONTS
//
// This package compiles the four runtime paths EMPTY on purpose (see the
// manifest), so `FcInit()` on a runner with no `FONTCONFIG_FILE` finds no
// configuration and no fonts. That is the intended behaviour, not a defect,
// and it means a font-matching test would only be asserting that the runner
// has a desktop.
//
// The three GENERATED tables need none of that, and they are what this fork
// exists to produce:
//
// fclang.h 281 .orth files compiled into charset bitmaps
// fccase.h Unicode case folding
// fcobjshash.h object-name → id, the gperf replacement
//
// Each is reachable through a public entry point that takes no config.
#ifdef __linux__
// …
tests/examples/fontconfig/tests/fontconfig.cpp · 项目 tests/examples/fontconfig
构建 · 上游清单
- modules
freedesktop.fontconfig- targets
fontconfig (lib)- language
c++23- manifest version
2.15.0- dependencies
compat- 来源
https://raw.githubusercontent.com/mcpplibs/fontconfig/v2.15.0/mcpp/fontconfig/mcpp.toml