doc/installFonts: init hook docs in manual

This commit is contained in:
pancaek
2026-03-01 16:12:17 -08:00
committed by Sigmanificient
parent 954259d024
commit cc5058278b
3 changed files with 40 additions and 6 deletions

View File

@@ -20,6 +20,7 @@ ghc.section.md
gnome.section.md
haredo.section.md
installShellFiles.section.md
installFonts.section.md
julec.section.md
just.section.md
libglycin.section.md

View File

@@ -0,0 +1,24 @@
# `installFonts` {#installfonts}
This hook installs common font formats to the proper location. In its default state, the hook automatically handles ttf, ttc, otf, bdf, and psf. Given a `webfont` output, woff and woff2 formats will be installed under this output.
The automatic behavior of the hook can be disabled by setting the `dontInstallFonts` variable to true.
Additionally, it exposes the `installFont` function that can be used from your `postInstall`
hook, to install additional formats:
## `installFont` {#installfonts-installfont}
The `installFont` function takes two arguments, a file extension to move (*without* a preceding dot), and the install location.
### Example Usage {#installfonts-installfont-exampleusage}
```nix
{
nativeBuildInputs = [ installFonts ];
postInstall = ''
installFont svg $out/share/fonts/svg
'';
}
```

View File

@@ -134,18 +134,21 @@
"inkscape-plugins": [
"index.html#inkscape-plugins"
],
"installfonts": [
"index.html#installfonts"
],
"installfonts-installfont": [
"index.html#installfonts-installfont"
],
"installfonts-installfont-exampleusage": [
"index.html#installfonts-installfont-exampleusage"
],
"javascript-buildNpmPackage-npmFlags": [
"index.html#javascript-buildNpmPackage-npmFlags"
],
"javascript-buildNpmPackage-npmWorkspace": [
"index.html#javascript-buildNpmPackage-npmWorkspace"
],
"libcxxhardeningextensive": [
"index.html#libcxxhardeningextensive"
],
"libcxxhardeningfast": [
"index.html#libcxxhardeningfast"
],
"julec-hook": [
"index.html#julec-hook"
],
@@ -182,6 +185,12 @@
"julec-hook-variables": [
"index.html#julec-hook-variables"
],
"libcxxhardeningextensive": [
"index.html#libcxxhardeningextensive"
],
"libcxxhardeningfast": [
"index.html#libcxxhardeningfast"
],
"major-ghc-deprecation": [
"index.html#major-ghc-deprecation"
],