Commit Graph

105 Commits

Author SHA1 Message Date
Eyal Kalderon
a95e0ac8e4 makeFontsCache: Fix cross-compiling, missing fc-cache
This commit fixes missing fc-cache binary from make-fonts-cache.nix build:
```
builder for '/nix/store/az48nr8gdqrw3fliddmi82ghj2ljxrj4-fc-cache.drv' failed with exit code 127; last 1 log lines:
  /nix/store/p3z1lgsi7xymvl7akg531ikwiisqs4x5-stdenv-linux/setup: line 1299: fc-cache: command not found
cannot build derivation '/nix/store/swaxvjsf8h0rsmm9kigp6j3f5q5h4nvg-fc-00-nixos-cache.conf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/wiaiv0pq7w1xm2i2fqp2ngd1ljb4n6n9-fontconfig-conf.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/4zhiwpiyccs0rs26bs3q0w8fwaxrrgw0-fontconfig-etc.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/xhvljdp9b00fbkapx6cbfs4sjdh49qwv-etc.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/w63q0n0vh7vkdfrjmhb41qy1alx7qa8s-nixos-system-nixos-19.09.git.c814289.drv': 1 dependencies couldn't be built
```
2019-11-13 16:32:30 +01:00
Jan Tojnar
3665a31a4a
Merge pull request #67663 from jtojnar/fc-joypixels
fontconfig: add support for JoyPixels font
2019-08-30 00:30:13 +02:00
Jan Tojnar
37018e70d1
fontconfig: add support for JoyPixels font
Mirroring the following upstream merge request
https://gitlab.freedesktop.org/fontconfig/fontconfig/merge_requests/67
2019-08-29 02:15:26 +02:00
volth
08f68313a4 treewide: remove redundant rec 2019-08-28 11:07:32 +00:00
volth
46420bbaa3 treewide: name -> pname (easy cases) (#66585)
treewide replacement of

stdenv.mkDerivation rec {
  name = "*-${version}";
  version = "*";

to pname
2019-08-15 13:41:18 +01:00
Michael Eden
3bcede8f5c librsvg: make-fonts-conf: update with correct native deps 2019-03-29 11:11:56 -04:00
volth
98e2820f59
makeFontsCache: allowSubstitutes = false
trivial builder
2019-02-08 00:24:14 +00:00
Jörg Thalheim
4f87d7e733
Revert "fontconfig: fix cross make-fonts-cache & make-fonts-config"
This reverts commit 508cbf4d25.

This make the function ignore the fontconfig variable
2018-12-07 11:59:38 +00:00
eburimu
508cbf4d25 fontconfig: fix cross make-fonts-cache & make-fonts-config 2018-12-06 03:58:19 +03:00
eburimu
36e2e9dd33 fontconfig: use native xsltproc in case of cross compilation
Fixes #50801
2018-11-21 01:48:23 -06:00
Symphorien Gibol
a6a29e07bc nixos/fontconfig/make-fonts-cache: don't fail to clean the cache
Today I couldn't rebuild because of:
[...]
/nix/store/lxkrsrlqplz2n75hvpq6vr0gam0gfgrl-font-cursor-misc-1.0.3/lib/X11/fonts/misc: skipping, existing cache is valid: 1 fonts, 0 dirs
/var/cache/fontconfig: cleaning cache directory
/nix/store/xq3c44ha15pfa5a9mv1z9mni3cfghsna-fc-cache: cleaning cache directory
fc-cache: succeeded
rm: cannot remove '/nix/store/xq3c44ha15pfa5a9mv1z9mni3cfghsna-fc-cache/CACHEDIR.TAG': No such file or directory
builder for '/nix/store/zxfmil40n79vhn5hb4flqc76j99a3l7b-fc-cache.drv' failed with exit code 1
2018-11-04 21:23:52 +01:00
John Ericson
0828e2d8c3 treewide: Remove usage of remaining redundant platform compatability stuff
Want to get this out of here for 18.09, so it can be deprecated
thereafter.
2018-08-30 17:20:32 -04:00
volth
52f53c69ce pkgs/*: remove unreferenced function arguments 2018-07-21 02:48:04 +00:00
John Ericson
5e17335bd7 Merge remote-tracking branch 'upstream/staging' into strictDeps 2018-05-14 23:33:03 -04:00
John Ericson
330ca731e8 treewide: Get rid of all uses of crossConfig
The hack of using `crossConfig` to enforce stricter handling of
dependencies is replaced with a dedicated `strictDeps` for that purpose.
(Experience has shown that my punning was a terrible idea that made more
difficult and embarrising to teach teach.)

Now that is is clear, a few packages now use `strictDeps`, to fix
various bugs:

 - bintools-wrapper and cc-wrapper
2018-05-14 23:30:37 -04:00
John Ericson
7d0906eea8 fontconfig: Clean up cross 2018-05-10 01:57:49 -04:00
John Ericson
feb648ce59 Merge commit '70963b382f3f820ba6d3bc3b3aaf50a2957ec1ff' into lib-platform-simplify 2018-05-10 01:40:38 -04:00
John Ericson
a02be2bd85 treewide: Get rid of *Platform.arch
Use `parsed.cpu.name` or `platform.gcc.arch` instead.
2018-05-10 01:37:31 -04:00
Nikolay Amiantov
a536aee981 fontconfig: 2.12.1 -> 2.12.6 2018-03-06 13:09:19 +03:00
Hamish Mackenzie
6ad745209f
fontconfig: Fix for HFS+ 1s date resolution issue
HFS+ (still common on macOS machines) only has a
date resolution of 1 second.  This change makes sure that
`fcobjshash.h` gets a newer timestamp than `fcobjshash.gperf`.
2018-02-12 21:10:20 +13:00
Bjørn Forsman
8ea7a302bd make-fonts-cache: remove CACHEDIR.TAG file from Nix store
A CACHEDIR.TAG file indicates that the contents can be automatically
re-generated. This is not really true for Nix store paths. (Well _Nix_
can recreate them, but that's different.)

I noticed this issue as I was restoring full system backup that "for
some reason" always missed /nix/store/*-fc-cache (found by `nix-store
--verify --repair`). Turns out I was excluding caches from my backup...
2018-02-11 16:07:43 +01:00
John Ericson
531e4b80c9 misc pkgs: Basic sed to get fix pkgconfig and autoreconfHook buildInputs
Only acts on one-line dependency lists.
2017-09-21 15:49:53 -04:00
Tuomas Tynkkynen
886837f479 make-fonts-cache.nix: Don't build-depend on unnecessary outputs of fontconfig 2017-09-11 19:22:01 +03:00
hsloan
9b2d1cbc70 fontconfig default: Don't use stdenv.cross 2017-06-28 19:31:16 -04:00
hsloan
0fa3d99f4e fontconfig 2.10: Don't use stdenv.cross 2017-06-28 19:29:41 -04:00
Tuomas Tynkkynen
4df59beb01 fontconfig_210: Remove reference to obsolete patch
Commit 9b049849bf deleted the patch file
(and reference to it from fontconfig default.nix), but left the one in
2.10.nix which break evaluation.

As the package seems to build fine without the patch, just remove the
reference.

cc @ttuegel in case this was not the correct thing to do.
2017-03-30 23:19:45 +03:00
Thomas Tuegel
9b049849bf
freetype: disable PCF long family names
Backported several patches from upstream. The test suite patch for Fontconfig is
no longer necessary.
2017-03-28 17:29:42 -05:00
Thomas Tuegel
65592837b6
freetype: 2.6.5 -> 2.7.1
The Infinality bytecode interpreter is removed in favor of the new v40 TrueType
interpreter. In the past, the Infinality interpreter provided support for
ClearType-style hinting instructions while the default interpreter (then v35)
provided support only for original TrueType-style instructions. The v40
interpreter corrects this deficiency, so the Infinality interpreter is no longer
necessary.

To understand why the Infinality interpreter is no longer necessary, we should
understand how ClearType differs from TrueType and how the v40 interpreter
works. The following is a summary of information available on the FreeType
website [1] mixed with my own editorializing.

TrueType instructions use horizontal and vertical hints to improve glyph
rendering. Before TrueType, fonts were only vertically hinted; horizontal hints
improved rendering by snapping stems to pixel boundaries. Horizontal hinting is
a risk because it can significantly distort glyph shapes and kerning. Extensive
testing at different resolutions is needed to perfect the TrueType
hints. Microsoft invested significant effort to do this with its "Core fonts for
the Web" project, but few other typefaces have seen this level of attention.

With the advent of subpixel rendering, the effective horizontal resolution of
most displays increased significantly. ClearType eschews horizontal hinting in
favor of horizontal supersampling. Most fonts are designed for the Microsoft
bytecode interpreter, which implements a compatibility mode with
TrueType-style (horizontal and vertical) instructions. However, applying the
full horizontal hints to subpixel-rendered fonts leads to color fringes and
inconsistent stem widths. The Infinality interpreter implements several
techniques to mitigate these problems, going so far as to embed font- and
glyph-specific hacks in the interpreter. On the other hand, the v40 interpreter
ignores the horizontal hinting instructions so that glyphs render as they are
intended to on the Microsoft interpreter. Without the horizontal hints, the
problems of glyph and kerning distortion, color fringes, and inconsistent stem
widths--the problems the Infinality interpreter was created to solve--simply
don't occur in the first place.

There are also security concerns which motivate removing the Infinality patches.
Although there is an updated version of the Infinality interpreter for FreeType
2.7, the lack of a consistent upstream maintainer is a security concern. The
interpreter is a Turing-complete virtual machine which has had security
vulnerabilities in the past. While the default interpreter is used in billions
of devices and is maintained by an active developer, the Infinality interpreter
is neither scrutinized nor maintained. We will probably never know if there are
defects in the Infinality interpreter, and if they were discovered they would
likely never be fixed. I do not think that is an acceptable situtation for a
core library like FreeType.

Dropping the Infinality patches means that font rendering will be less
customizable. I think this is an acceptable trade-off. The Infinality
interpreter made many compromises to mitigate the problems with horizontal
hinting; the main purpose of customization is to tailor these compromises to the
user's preferences. The new interpreter does not have to make these compromises
because it renders fonts as their designers intended, so this level of
customization is not necessary.

The Infinality-associated patches are also removed from cairo. These patches
only set the default rendering options in case they aren't set though
Fontconfig. On NixOS, the rendering options are always set in Fontconfig, so
these patches never actually did anything for us!

The Fontconfig test suite is patched to account for a quirk in the way PCF fonts
are named.

The fontconfig option `hintstyle` is no longer configurable in NixOS. This
option selects the TrueType interpreter; the v40 interpreter is `hintslight` and
the older v35 interpreter is `hintmedium` or `hintfull` (which have actually
always been the same thing). The setting may still be changed through the
`localConf` option or by creating a user Fontconfig file.

Users with HiDPI displays should probably disable hinting and antialiasing: at
best they have no visible effect.

The fontconfig-ultimate settings are still available in NixOS, but they are no
longer the default. They still work, but their main purpose is to set rendering
quirks which are no longer necessary and may actually be
detrimental (e.g. setting `hintfull` for some fonts). Also, the vast array of
font substitutions provided is not an appropriate default; the default setting
should be to give the user the font they asked for.

[1]. https://www.freetype.org/freetype2/docs/subpixel-hinting.html
2017-03-12 17:31:33 -05:00
Vladimír Čunát
09d02f72f6
Re-revert "Merge: glibc: 2.24 -> 2.25"
This reverts commit 55cc7700e9.
I hope most problems have been solved.  /cc #22874.
2017-02-20 21:16:41 +01:00
Vladimír Čunát
55cc7700e9
Revert "Merge: glibc: 2.24 -> 2.25"
This reverts commit 1daf2e26d2, reversing
changes made to c0c50dfcb7.

It seems this is what has been causing all the reliability problems
on Hydra.  I'm currently unable to find why it happens, so I'm forced
to revert the update for now.  Discussion: #22874.
2017-02-16 18:16:06 +01:00
Vladimír Čunát
7832806e20
fontconfig: fixup fragile build after ab5fe171a
Sometimes it might fail due to timestamps suggesting some files needed
regenerating and failing to find gperf.  Now it should be OK, I hope.
2017-02-15 21:06:27 +01:00
Vladimír Čunát
ab5fe171af
fontconfig: patch to build with glibc-2.25 2017-02-12 11:14:45 +01:00
Alexander Ried
8417c3aae1
fontconfig: 2.11.1 -> 2.12.1
Fixes #19302.
2016-10-11 18:34:36 +02:00
Tuomas Tynkkynen
d3dc3d4130 Merge remote-tracking branch 'dezgeg/shuffle-outputs' into staging
https://github.com/NixOS/nixpkgs/pull/14766
2016-08-30 12:43:37 +03:00
Vladimír Čunát
4f73633f26 treewide: stop using fontbhttf 2016-08-29 22:28:50 +02:00
Tuomas Tynkkynen
a17216af4c treewide: Shuffle outputs
Make either 'bin' or 'out' the first output.
2016-08-29 14:49:51 +03:00
Eric Sagnes
e80e8b9dc9 fontconfig module: respect upstream definitions 2016-08-20 03:21:05 +03:00
Eric Sagnes
cd2948a72e fontconfig: fix etc priority 2016-08-20 03:21:05 +03:00
obadz
cfc0a5415b Revert "fontconfig: fix etc priority"
This reverts commit 1e53d4a777.

Closes #16983

cc @vcunat @ericsagnes @dezgeg
2016-07-15 20:44:21 +02:00
Eric Sagnes
1e53d4a777 fontconfig: fix etc priority 2016-07-09 16:50:13 +02:00
Vladimír Čunát
2c51a075ab makeFontsConf: fix with multiple outputs 2016-02-03 16:57:41 +01:00
Vladimír Čunát
ae74c356d9 Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
2016-02-03 16:57:19 +01:00
Nikolay Amiantov
7bd9a5b104 fontconfig: reorder cache dirs 2016-01-29 16:35:59 +03:00
Nikolay Amiantov
893af77556 makeFontsCache: init 2016-01-29 14:41:26 +03:00
Tuomas Tynkkynen
ca2cb493fa fontconfig_210: Split into multiple outputs 2015-10-28 10:17:10 +01:00
Vladimír Čunát
38313d5d87 libxml2,libxslt: split into multiple outputs
Fixed all references, hopefully.
libxml2Python is slightly hacky now, but it seems to work.
2015-10-05 13:44:16 +02:00
Vladimír Čunát
f8c211fd2b fontconfig: split into multiple outputs
Fixed all 'fontconfig}' references as well, hopefully, ugh!
2015-10-05 12:23:56 +02:00
Vladimír Čunát
3938dc3c21 freetype: fix pcf fonts by upstream patches
The problem was uncovered by the last security patches.
Firefox seems to build and work fine.

Includes reverting 374a9cc162, as this is a proper fix.
2014-12-17 22:12:41 +01:00
Michael Raskin
374a9cc162 Disable fontconfig tests: they break after Freetype security update, and apparently we get something working regardless of the test problems 2014-12-17 16:39:55 +03:00
Thomas Tuegel
322bb7a67b fontconfig: include user config through NixOS module 2014-12-08 10:55:24 -06:00