You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
Added
Shapes in the font — mossaic-art "I :heart: RUST". Nineteen of them: :star::heart::smile::sad::check::circle::square: :triangle::diamond::note::sun::moon::bolt::up::down: :left::right::skull::flower:, several with aliases (:cry: is :sad:, :zap: is :bolt:). A shape is written between colons so it can be
typed on any keyboard; the symbol works where you can type one, and so does a
pasted emoji — ⭐ draws :star:, 😢 draws :cry:, and the variation selector
an emoji keyboard adds is dropped rather than refused. All three spellings
become the same character before anything else sees them, which is what lets
a shape survive being written to a plan, uppercased, and read back by --track every morning — including into the commit message --write leaves
behind.
Punctuation: !?,'"+=<>()/\*_ @&#%. The font is 77 glyphs where it was 39.
A picture of everything the font can draw,
in the README and in docs/ART.md — every glyph rendered as contribution
cells by the same rasteriser that draws the chart, in real Primer greens on a
level-1 field. An image rather than a table of characters for the same reason
the sextant chart is gone: half of these symbols are ones a browser may have
no font for, and a picture of the cells has nothing to be missing.
mossaic-art --font --png PATH, which writes that sheet. The terminal
view is still --font on its own.
graphics::sheet, the rasteriser generalised from a calendar's seven
rows to any rectangle — so the sheet is drawn by the code that draws the
chart rather than by a second one that would drift from it. graphics::grid
is now a call to it and draws identical pixels.
A list of everything the font can draw in the README as text as well, and
tests that check both against the font: every symbol and emoji in the table,
and the image itself, regenerated and compared byte for byte. A table of
glyphs is exactly the documentation that rots, and it is the only place most
people will look.
Changed
: is the shape delimiter and has no glyph of its own, which is what
keeps the grammar to one reading. A name nobody has drawn, or a colon that
closes nothing, is refused with the list of shapes rather than guessed at.
mossaic-art --font names its shapes (:star:) instead of printing the
symbol. Several of them are ambiguous-width, so a terminal may draw one in
two columns and tear the aligned output apart.
The README no longer prints the sextant chart inline. It was 740
block-sextant characters (U+1FB2B, U+1FB1B, Unicode 13) that too few
systems have a font for: where one is missing the browser substitutes a font
of a different width and shears every row of a 176-column chart apart, which
is a worse advertisement for the fallback than no picture at all. The promise
it was making stays, with the one command that shows it in a terminal, where
the characters are guaranteed to work.
Tests
The pixel path is asserted as a picture, not as a byte count. termlens
0.6 hands back the payloads an application transmitted and decodes them, so tests/pixels.rs now checks what the chart actually drew: that the year is
pinned to the 106x7 character cells the layout reserved and placed on the
grid's own origin, that it goes out as one image however many of kitty's
4096-byte chunks it takes, that one moved cursor sends a single day-sized
image rather than a cheap-looking year, and that the chart deletes its
images before it exits instead of leaving them over whatever comes next.
None of that changes a cell on screen, which is why none of it was
assertable before.
The year drawn is checked against the year described. Every day's centre
pixel is read out of the decoded image and counted: the number drawn in
Primer's brightest green has to equal the number the footer calls active.
The two halves of the chart — the picture and the text under it — had never
been compared to each other, and nothing on screen can compare them.
The in-process sixel decoder rounds the way a terminal does. It
converted a percentage back with p * 255 / 100, the exact inverse of the
encoder's own rounding, so a systematic disagreement with real terminals
would have round-tripped perfectly through a test whose stated purpose was
to catch exactly that.
Changed
Esc no longer quits the chart. It cancels the username prompt and
dismisses the help overlay, which is all the UI ever implied it did, and q
is the only quit key. 0.4.0 took the other half of #34's suggestion and
documented Esc instead, which left the complaint the issue opens with
untouched: pressing Esc to dismiss a tooltip exited the program. Documenting
a surprise is not the same as removing it. (#34, #44)