On systems where the max locked memory (a.k.a., RLIMIT_MEMLOCK) is too
low, the crypto test fails with "Cannot allocate memory".
Distros such as Debian and Ubuntu run the test-suite as part of the
build process. This results in failed builds if the build machine itself
does not have a sufficiently high value for RLIMIT_MEMLOCK. That said,
the resulting builds would run perfectly fine when installed on machines
that meet the requirements.
On supported systems, we now check if the RLIMIT_MEMLOCK is high enough
and skip the crypto test if it is not.
Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
This adds a config option called text_fg_override_threshold that
specifies a percentage difference luminance below which the
foreground color will be overridden. The foreground color is set
to white if the background is dark or black if the background is
light. The default is 0, and the computations will only be
performed if the option is set.
Many programs output colors that look good with the author's
terminal's color scheme but which are completely illegible with
other color schemes. This allows the user ensure that there is
always sufficient contrast to read the text on the screen.
I originally implemented this is as a parameter on
text_composition_strategy. For that to work, the option needed to
take _up to_ rather than _exactly_ the number of available
parameters. While it now has nothing to do with the new feature,
it seems like that change should be made anyway, so I'm leaving
it in for now.
This adds a parameter to text_composition_strategy that specifies
a percentage difference luminance below which the foreground
color will be overridden. The foreground color is set to white if
the background is dark or black if the background is light.
Many programs output colors that look good with the author's
terminal's color scheme but which are completely illegible with
other color schemes. This allows the user ensure that there is
always sufficient contrast to read the text on the screen.
Since we want existing configs to continue working, this also
makes it so that rather than taking exactly two parameters,
text_composition_strategy takes one--three parameters, using the
default values for those not specified.
Note that we loose unicode char matching for --type=word because of
https://github.com/dlclark/regexp2/issues/65 and of course user regexps
cant use \p{N} escapes any more. Hopefully regexp2 will add support for
these soon-ish. IMO lookaround is more important than \p.
Fixes#6265
Allocation in box_glyph_id is larger than necessary to account for the
addition of 0x1fb8c ... 0x1fb94 eventually, which are quite similar but
will require more work to add. Note that 0x1fb93 is not present in the
standard yet, but it is easy to guess what it will likely be from
context, so it should be kept in the allocation imo.
I was really unhappy with the previous checkerboard appearance, so I
changed it to supersampled diagonal lines. The fill ratios are still the
same, so it should still be compliant with the standard if I understood
it correctly.
Feel free to revert (or tell me to revert) this commit if you want the
previous look.
This prevents accidental execution of script files via MIME type
association from programs that unconditionally "open"
attachments/downloaded files via MIME type associations.