Add no-op fontconfig files for Microsoft fonts.
With these fontconfig files it becomes possible for other packages to configure font aliases for the Microsoft fonts. If both, for example, vista-fonts and some package providing an alias for Cambria are installed then the user may control whether or not the alias is active by manipulating the package priorities.
This commit is contained in:
@@ -34,18 +34,34 @@ stdenv.mkDerivation {
|
||||
|
||||
buildInputs = [cabextract];
|
||||
|
||||
buildCommand = "
|
||||
buildCommand = ''
|
||||
for i in $exes; do
|
||||
cabextract --lowercase $i
|
||||
done
|
||||
|
||||
cabextract --lowercase viewer1.cab
|
||||
|
||||
|
||||
fontDir=$out/share/fonts/truetype
|
||||
mkdir -p $fontDir
|
||||
cp *.ttf $fontDir
|
||||
|
||||
# Also put the EULA there to be on the safe side.
|
||||
cp ${eula} $fontDir/eula.html
|
||||
";
|
||||
|
||||
# Set up no-op font configs to override any aliases set up by
|
||||
# other packages.
|
||||
mkdir -p $out/etc/fonts/conf.d
|
||||
for name in Andale-Mono Arial-Black Arial Comic-Sans-MS \
|
||||
Courier-New Georgia Impact Times-New-Roman \
|
||||
Trebuchet Verdana Webdings ; do
|
||||
substitute ${./no-op.conf} $out/etc/fonts/conf.d/30-''${name,,}.conf \
|
||||
--subst-var-by fontname "''${name//-/ }"
|
||||
done
|
||||
'';
|
||||
|
||||
meta = {
|
||||
# Set a non-zero priority to allow easy overriding of the
|
||||
# fontconfig configuration files.
|
||||
priority = 5;
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user