mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
doc/installFonts: init hook docs in manual
This commit is contained in:
@@ -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
|
||||
|
||||
24
doc/hooks/installFonts.section.md
Normal file
24
doc/hooks/installFonts.section.md
Normal 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
|
||||
'';
|
||||
}
|
||||
```
|
||||
@@ -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"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user