Unverified Commit e8fbdd52 authored by Pol Dellaiera's avatar Pol Dellaiera Committed by GitHub
Browse files

doc/installFonts: init hook docs in manual (#495663)

parents ddfde2ee cc505827
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
# `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
  '';
}
```
+15 −6
Original line number Diff line number Diff line
@@ -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"
  ],