Age | Commit message (Collapse) | Author |
|
|
|
Preparation for using Error.h from Vector.h. This required moving some
things out of line.
|
|
|
|
BitmapFont header now contains a slope byte. Slope is used to
indicate slant style and is mapped in LibGfx/FontStyleMapping.h
|
|
Removes the concept of Type enumeration in favor of a bitmask which
represents 544 potential byte ranges of 256 characters per bit,
supporting the current unicode code point set (0x0000-0x10FFFF).
Range positions are indexed in a vector for code point lookup and
conversion.
Co-authored-by: Lynn <lynn@foldr.moe>
|
|
Non-printable characters should always have a width of 0. This is not
true for some characters like tab, but those can be exempted as the need
arises. Doing this here saves us from a bunch of checks in any place
that needs to figure out glyph widths for text which can contain
non-printable characters.
|
|
There's no need for this to be a virtual, it's just a font database
lookup and can be done in the Font base class.
|
|
|
|
Previously calculating multiline text width would return invalid value,
this change makes it so that we are returning the longest line width.
We are now also reusing same width() implementation for both UTF-8 and
UTF-32 strings.
|
|
|
|
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
|
|
This uses the per glyph width to determine if the glyph is actually
present in the font, and not just inside the range the font can covers
This means that characters that are in the font's range but that are
missing a glyph will show up as the missing character glyph instead of
being invisible.
|
|
This replaces the glyph width spinbox in the font editor with a
checkbox when editing fixed width fonts that indicates if the
currently selected character's glyph is present in the edited font
(For variable width fonts a non zero width implies presence)
This commit also changes the background color of glyphs in the glyph
map based on the presence of each specific glyph in the font.
|
|
The count is always non-negative
|
|
|
|
These were all getting converted into String internally anyway.
|
|
|
|
This is a very quick and diry hack to implement support for cyrillic bitmap fonts.
|
|
(...and ASSERT_NOT_REACHED => VERIFY_NOT_REACHED)
Since all of these checks are done in release builds as well,
let's rename them to VERIFY to prevent confusion, as everyone is
used to assertions being compiled out in release.
We can introduce a new ASSERT macro that is specifically for debug
checks, but I'm doing this wholesale conversion first since we've
accumulated thousands of these already, and it's not immediately
obvious which ones are suitable for ASSERT.
|
|
This would cause question marks to be rendered when a ttf with fewer
glyphs than the value of the code_point was used.
|
|
This adds a new structure 'Typeface' to the FontDatabase that
represents all fonts of the same family and variant.
It can contain a list of BitmapFonts with varying size but of
the same family and weight or a pointer to a single TTF font
for all sizes of this Typeface.
|
|
|