The glyph shapes behind the rasterised fonts in Drafter.Widget.Digits.Font.
Each character is one 8×16 pixel bitmap: seven columns of shape and one of
side bearing, twelve rows of shape between a row of ascender space and three
of leading. Cap height is ten rows, leaving two for the descenders on , and
;.
Drafter.Widget.Digits.Raster downsamples these bitmaps into the :tall,
:pixel and :braille fonts. See the large text guide.
In the source shapes, # is an ink pixel and . is paper.
Examples
iex> Drafter.Widget.Digits.Bitmap.width()
8
iex> Drafter.Widget.Digits.Bitmap.height()
16
iex> Drafter.Widget.Digits.Bitmap.drawable?("Q")
true
iex> Drafter.Widget.Digits.Bitmap.drawable?("\u2603")
false
iex> Drafter.Widget.Digits.Bitmap.pixels("\u2603")
MapSet.new([])
Summary
Functions
@spec characters() :: [String.t()]
Every character with a bitmap, sorted.
Whether a character has a bitmap in some case.
@spec height() :: pos_integer()
Pixel height of every bitmap, ascender space and leading included.
@spec pixels(String.t()) :: MapSet.t({non_neg_integer(), non_neg_integer()})
The lit pixels of a character as a MapSet of {x, y}, origin top left.
Returns an empty set for a character with no bitmap.
@spec width() :: pos_integer()
Pixel width of every bitmap, side bearing included.