Files
ghostty/src
Charly Delay 96b4ff39a6 Tentative fix for unexpected font-codepoint-map behavior
In particular when configured to replace several ranges with multiple fonts.

Given the following `font-codepoint-map` config:

```
font-codepoint-map=U+0030-U+0039=Monaco       # 0-9
font-codepoint-map=U+0040=mononoki            # @
font-codepoint-map=U+0041-U+005a=Pixel Code   # A-Z
font-codepoint-map=U+0061-U+007a=Victor Mono  # a-z
```

I noticed a couple of unexpected behavior:

1. Codepoint ranges were assigned the wrong font
2. The declaration order had a direct impact on the font assignment
   (seemed to be rotating in some fashion)

If my understanding of the current implementation is correct, for a
given range index `n` in the `MultiArrayList` `CodepointMap.get(…)`
returns the font descriptor at index `len - n - 1`. In other words, it
returns the descriptor symmetrically opposite relative to the middle of
the list.

I've added a couple test cases that I would expect to pass if my
understanding of the expected behavior is correct, verified that they
were broken under the current behavior, and updated the implementation
of `CodepointMap.get(…)` accordingly.

My understanding of the original intent is to give priority to the
latest range match in the list (which is a use case already tested by
the `codepointmap` test, but which I believe happened to pass "by
accident"), so I opted for a reverse traversal of the codepoint list.
2024-10-19 15:51:08 +09:00
..
2024-03-26 16:14:25 -07:00
2024-07-25 08:56:06 -05:00
2024-08-16 10:49:37 -07:00
2024-08-16 10:57:19 -07:00
2024-06-24 15:16:24 -07:00
2024-09-26 22:00:11 -07:00
2023-06-30 12:15:31 -07:00
2024-06-23 09:44:54 -07:00
2024-10-18 08:11:11 -07:00
2024-08-31 11:12:40 -07:00
2024-02-09 20:05:11 +01:00
2024-10-08 21:55:00 -07:00
2024-08-16 14:35:10 -07:00
2022-08-18 11:42:32 -07:00
2024-08-16 10:43:32 -07:00
2024-10-18 08:10:41 -07:00
2024-08-16 10:36:10 -07:00