Mudlet icon indicating copy to clipboard operation
Mudlet copied to clipboard

Fonts with ligatures resolve ligatures in the input bar, but not the output window.

Open gesslar opened this issue 2 years ago • 1 comments

Brief summary of issue / Description of requested feature:

When using a font that offers ligatures, input in the input bar that includes characters that would resolve to ligatured characters do. While the results in the output window do not.

Steps to reproduce the issue / Reasons for adding feature:

  1. Use a font that offers ligatures, such as Cascadia Code
  2. Type => <= != (or whatever command you want)
  3. Hit enter to see the difference between the input and output.

image

Error output / Expected result of feature

Ideally, this should be consistent. If it resolves ligatures in the input bar, it should resolve them in the output bar. However, it is my opinion that it shouldn't really resolve them anywhere. Unless an option were provided to toggle ligatures on/off, but should still be consistent regardless of where the text is (input or output).

Extra information, such as the Mudlet version, operating system and ideas for how to solve / implement:

Mudlet 4.17.2 Win11

gesslar avatar Jan 14 '24 03:01 gesslar

I think that is down to one of a couple of things:

  • The font used in the input line is not identical to the one used for the output window - from what I recall from a bit of font-handling munging setting the main font shown in the output window may not (or not always) propagate to the input line as well.
  • The code that paints the text in the input line is built-in Qt library code - whereas for the output window it is our own, in-project (optimised, well supposedly, :laughing:) code that uses our own text storage/display methods - to allow said text to be frobbed by the end-user/scripts/packages (in a mono-spaced, or rather pseudo-mono-spaced format). Ideally they would look the same but that is probably not achievable...

SlySven avatar Jan 20 '24 15:01 SlySven