Commit graph

4793 commits

Author SHA1 Message Date
Daniel Eklöf
e49f741383
changelog: add a new ‘unreleased’ section 2021-10-02 14:48:13 +02:00
Daniel Eklöf
284625c8da
Merge branch 'releases/1.9' 2021-10-02 14:47:56 +02:00
Daniel Eklöf
af3f489967
meson/pkgbuild: bump version to 1.9.2 2021-10-02 14:47:14 +02:00
Daniel Eklöf
f6b96b6900
changelog: prepare for 1.9.2 2021-10-02 14:46:42 +02:00
Daniel Eklöf
4cabbb7df7
Merge branch 'master' into releases/1.9 2021-10-02 14:46:21 +02:00
Daniel Eklöf
9389f337d0
pgo: full-inner: do not set LC_CTYPE=en_US.UTF-8
That locale may not exist. Instead, require the user/build script to
explicitly set an UTF-8 locale.

Document this in INSTALL.md, and in the bundled PKGBUILD.
2021-10-02 14:46:02 +02:00
Daniel Eklöf
9b0fb39951
changelog: add a new ‘unreleased’ section 2021-10-01 21:57:57 +02:00
Daniel Eklöf
c8a7b880b9
Merge branch 'releases/1.9' 2021-10-01 21:57:26 +02:00
Daniel Eklöf
c1f18360c2
meson/pkgbuild: bump version to 1.9.1 2021-10-01 20:52:33 +02:00
Daniel Eklöf
041c83549b
changelog: prepare for 1.9.1 2021-10-01 20:52:19 +02:00
Daniel Eklöf
a082fec786
Merge branch 'master' into releases/1.9 2021-10-01 20:50:32 +02:00
Daniel Eklöf
2324f8e649
Merge branch 'hacktober-theme' 2021-10-01 16:48:40 +02:00
Daniel Eklöf
951fa81989
Merge branch 'line-wise-selection-with-soft-line-wrapping'
Closes #726
2021-10-01 16:26:26 +02:00
Daniel Eklöf
548d7be4c6
selection: line-wise selection now handles soft line-wrapping
Previously, soft-wrapped lines were not selected correctly, as the
selection logic was hardcoded to simply select everything between the
first and last column on the current terminal row.

Now, we scan backward and forward, looking for hard-wrapped
lines. This is similar to how word-based selection works.

Closes #726
2021-09-30 13:39:23 +02:00
grtcdr
ed125cbf58
Rename to Hacktober 2021-09-26 20:17:43 +01:00
Daniel Eklöf
df8aea6cb6
Merge branch 'static-color-table' 2021-09-26 13:30:56 +02:00
Craig Barnes
9361e7c072 config: add comments to default_color_table[] about color channel values 2021-09-25 22:01:03 +01:00
Craig Barnes
a669ba0bf6 config: simplify initialization of color table in config_load() 2021-09-25 02:56:19 +01:00
Daniel Eklöf
ebbac83236
Merge branch 'non-dpi-aware-if-any-output-uses-scaling' 2021-09-24 22:08:50 +02:00
Daniel Eklöf
fb77637eb9
term: only scale using DPI if *all* monitors have a scaling factor or one
With dpi-aware=auto (the default), scale fonts using DPI *only*
if *all* available monitors have a scaling factor of one.

The idea is this: if a user, with multiple monitors, have enabled
scaling on *at least* one monitor, he/she has most likely done so to
match the size of his/hers other monitors.

For example, if the user has one monitor with a scaling factor of one,
and another one with a scaling factor of two, he/she expects things to
be twice as large on the second monitor.

If we (foot) scale using DPI on the first monitor, and using the
scaling factor on the second monitor, foot will *not* look twice as
big on the second monitor (this was the old behavior of
dpi-aware=auto).

Part of #714
2021-09-24 22:07:47 +02:00
grtcdr
3693f57780
add hacktoberfest theme 2021-09-22 23:20:29 +01:00
Daniel Eklöf
2934a4e96c
doc: foot.ini: remove stray double quote character 2021-09-22 22:04:30 +02:00
Daniel Eklöf
49d02bb389
readme: avoid having two “see...” right next after each other 2021-09-22 22:01:54 +02:00
Daniel Eklöf
af1a01b252
doc: foot.ini: font: add reference to dpi-aware option 2021-09-22 22:01:35 +02:00
Daniel Eklöf
ab34288e18
doc: foot.ini: mention how dpi-aware interacts with :pixelsize=N 2021-09-22 22:01:17 +02:00
Daniel Eklöf
14e77fec32
doc: foot.ini: mention how dpi-aware interacts with bitmap fonts 2021-09-22 22:00:28 +02:00
Daniel Eklöf
705b5d786c
box-drawing: repair debug logs 2021-09-19 11:49:49 +02:00
Daniel Eklöf
16ddb2e292
Merge branch 'eflag'
Closes #184
Closes #257
Closes #313
Closes #596
Closes #625
Closes #716
2021-09-19 11:26:22 +02:00
Craig Barnes
ef7919e64d main/client: add no-op "-e" command-line option 2021-09-18 23:40:40 +01:00
Craig Barnes
537cd9b367 main/client: replace some uses of printf() with puts() in print_usage()
FOOT_DEFAULT_TERM is a string literal passed as a -D argument to
the compiler, so it can just be concatenated with the other string
literals, instead of being formatted with printf().
2021-09-18 19:44:04 +01:00
Craig Barnes
ed0ef4bb1d log: simplify Boolean logic for setting "colorize" var in log_init() 2021-09-15 16:18:05 +01:00
Daniel Eklöf
f84320b5d6
Merge branch 'braille'
Closes #702
2021-09-14 10:27:06 +02:00
Daniel Eklöf
e426e77b1d
box-drawing: braille: prefer increasing spacing over dot width
Too large dots make them harder to distinguish, when the spacing
between them is small.

Prefer increasing the spacing, instead of increasing the dot
size. This looks better at small font sizes in particular.
2021-09-14 10:20:07 +02:00
Daniel Eklöf
37b15adcd8
term: turn ‘box-drawings’ array into three dynamically allocated arrays
The box_drawings array is now quite large, and uses up ~4K
when *empty*.

This patch splits it up into three separate, dynamically allocated
arrays; one for the traditional box+line drawing and block elements
glyphs, one for braille, and one for the legacy computing symbols.

When we need to render a glyph, the *entire* array (that it belongs
to) is allocated.

I.e this is one step closer to a dynamic glyph cache (like the one
fcft uses), but doesn’t go all the way.

This is especially nice for people with
‘box-drawings-uses-font-glyphs=yes’; for them, the custom glyphs now
uses 3*8 bytes (for the three array pointers), instead of 4K.
2021-09-14 09:50:49 +02:00
Daniel Eklöf
ac2091f107
box-drawing: NOINLINE braille 2021-09-12 19:22:14 +02:00
Daniel Eklöf
896825f50c
render: codespell: aquire -> acquire 2021-09-12 19:22:14 +02:00
Daniel Eklöf
b4c759e2de
box-drawing: add braille characters
Render braille ourselves, instead of using font glyphs. Decoding a
braille character is easy enough; there are 256 codepoints,
represented by an 8-bit integer (i.e. subtract the Unicode codepoint
offset, 0x2800, and you’re left with an integer in the range 0-255).

Each bit corresponds to a dot. The first 6 bits represent the upper 6
dots, while the two last bits represent the fourth (and last) row of
dots.

The hard part is sizing the dots and the spacing between them.

The aim is to have the spacing between the dots be the same size as
the dots themselves, and to have the margins on each side be half the
size of the dots.

In a perfectly sized cell, this means two braille characters next to
each other will be evenly spaced.

This is however almost never the case. The layout logic currently:

* Set dot size to either the width / 4, or height / 8, depending on
  which one is smallest.

* Horizontal spacing is initialized to the width / 4

* Vertical spacing is initialized to the height / 8

* Horizontal margins are initialized to the horizontal spacing / 2

* Vertical margins are initialized to the vertical spacing / 2.

Next, we calculate the number of “remaining” pixels. That is, if we
add the left margin, two dots and the spacing between, how many pixels
are left on the horizontal axis?

These pixels are distributed in the following order (we “stop” as soon
as we run out of pixels):

* If the dot size is 0 (happens for very small font sizes), increase
  it to 1.
* If the margins are 0, increase them to 1.
* If we have enough pixels (need at 2 horizontal and 4 vertical),
  increase the dot size.
* Increase spacing.
* Increase margins.

Closes #702
2021-09-12 19:22:12 +02:00
Daniel Eklöf
f9d968b4c7
Merge branch 'pgo-script'
Closes #701
2021-09-12 19:11:44 +02:00
Daniel Eklöf
32900207f9
changelog: pgo build scripts 2021-09-12 16:59:23 +02:00
Daniel Eklöf
aa0f2a71cc
install.md: document pgo/*.sh scripts 2021-09-12 16:57:07 +02:00
Daniel Eklöf
b6df5f6456
pgo.sh: set -x *after* verifying input 2021-09-12 16:11:42 +02:00
Daniel Eklöf
7e53de263b
pkgbuild: add back --prefix --wrap-mode=nofallback 2021-09-12 10:39:45 +02:00
Daniel Eklöf
e77c3b3e4f
pkgbuild: add ‘auto’ to the list of possible PGO values 2021-09-12 10:39:45 +02:00
Daniel Eklöf
5493267bf7
pgo: pgo.sh: remove both gcc and clang generated profile stats 2021-09-12 10:39:45 +02:00
Daniel Eklöf
2181af0552
pkgbuild: the pgo script erases the old profdata files 2021-09-12 10:39:45 +02:00
Daniel Eklöf
a941253ba7
pgo: pgo.sh: add meson bld/src dir arguments last 2021-09-12 10:39:45 +02:00
Daniel Eklöf
6d67c2b4ab
pgo: pgo.sh: run ‘find’ in the build-directory, not cwd 2021-09-12 10:39:45 +02:00
Daniel Eklöf
e907ec209c
pgo: pgo.sh: allow a pre-existing build directory 2021-09-12 10:39:45 +02:00
Daniel Eklöf
579e1f80b4
pkgbuild: build using pgo/pgo.sh 2021-09-12 10:39:44 +02:00
Daniel Eklöf
cf7c5050f6
pgo: pgo.sh: auto: don’t use full-headless-sway
This requires Sway >= 1.6.2, which hasn’t been released yet. Thus,
don’t auto-use it.

Users can still request it explicitly.
2021-09-12 10:39:44 +02:00