I've added dingbats to the fallback list on macos as that is needed
for some symbols we use in tools at work.
With that, and some tweaks for allowing for missing letter glyphs
when loading a symbol font as a fallback, we can make that the
default for macOS
Closes https://github.com/wez/wezterm/issues/5
This results in a less blurry display.
As a bonus, this lays down some plumbing for changing the font
size on the fly.
Refs: https://github.com/wez/wezterm/issues/2
We can now render bg colors, selection, cursor, and the text has
reasonable proportions, and coloring.
bright cyan on blue has some black AA artifacts that I need to
investigate.
Adds some plumbing to track the current mouse position and
extract the hyperlink from the cell that is being hovered over.
We render those cells with underline, possibly in a different color.
We don't yet do anything on click.
I wasn't pleased with how text was rendering on a colored background,
and after some research I discovered that I was neglecting to convert
from sRGB to a linear RGB colorspace, and that this was causing the
blending to have inaccurate results.
This diff pulls in the palette crate to handle the heavy lifting.
It doesn't appear to have any especially fast optimizations for this
though, which is a shame because the blending code I was using
previously was largely integer math with few branches. The colorspace
conversion has several floating point operations and branches that
are unavoidable :-/
We run a bit hotter on the CPU but the results are much more pleasing
to the eye.
This enables selecting an italic font when the cell is italic,
but has more power beyond just that simple property.
This runs a little hot on the CPU so there's probably some caching and
tweaking that can be done to make the evaluation a bit cheaper.
We weren't quite right with handling the cursor around double-width
characters. We're now a bit more robust at this because we're
clustering and taking pains to consider the printable width of the
cell as well as the width of the shaped (eg: with contextual ligatures)
glyph.
There may still be issues with contextual ligatures of length 3,
but I haven't managed to nail down exactly the issue yet.
Actually, the flicker was caused by the back pixel setting on the
window; I spent a long time running this down and finally got the
clue from this crusade against flicker:
http://www.ruska.it/michal/flicker.html
The spacing between glyphs seems too wide. Need to figure this out.
A bunch of the integer vs float changes in this diff were a result
of trying to run this down, but success has been limited, and in fact
the spacing has increased as a result of making this more correct(!)
Initially I wanted to make the font code separate from
the main wterm executable in the hope that it would be
reusable. However, we do need to be able to reach in
to both the font implementation and the SDL texture
implementation in order to capture the glyph data
into textures, so let's just embrace it all being
in the same crate.