Age | Commit message (Collapse) | Author |
|
The only remaining clients of this API are specific to bitmap fonts and
editing thereof.
|
|
This returns the font's size (distance between ascender and descender)
in pixels, rounded up to the nearest integer.
This is the number we want to use in a lot of UI code, so let's have
a friendly API for it instead of ceil'ing the pixel_size() in a million
random places.
|
|
This fixes an issue where the title would shift around at the subpixel
level when appended to. (Only matters for vector fonts.)
|
|
Required by Shadertoy.
|
|
For vector fonts in particular, we need to take care to compute offsets
using floating point math. For example, with Berkeley Mono at font size
16, with syntax highlighting enabled, we are currently truncating these
offsets to integers. This results in a leftward-drift when we paint the
text.
This changes the rect in which we paint syntax-highlighted text spans to
a float rect. As we traverse the spans, we now no longer truncate any of
the text offsets, and we draw the text in the correct positions.
This is likely not a complete solution. TextEditor blindly casts ints to
floats all over, and we will want to make all of these (hundred+) float-
aware. But this should be a step in the right direction and makes vector
fonts immediately more comfortable to use.
|
|
This adds the regions generated from embedded CSS and JS, and also for
HTML block comments.
The glaring omission is that we don't add them for start/end tags. HTML
allows start and end tags to not always match up, and I believe that's
going to require some variation on the adoption-agency algorithm to
make it work correctly.
|
|
|
|
|
|
This just looks at {} blocks. Unfortunately the two highlighters work
differently enough that the code has to be duplicated.
|
|
This lets you fold sections into a single line. We attempt to keep 1
blank line after the folded section if possible.
|
|
This disallows erroneous `#if ARCH(x86_64)` (note lowercase x).
|
|
|
|
The majority of error strings are StringView literals, and it seems
silly to require heap-allocating strings for these.
This idea is stolen from a recent change in fd1fbad :^)
|
|
This will raise a compile error if an emoji image was neglected to be
added to e.g. emoji-serenity.txt, or if the code points are not correct.
|
|
This was added in d1de7f7782, but these are not the right code points
(missing U+200D), and we already have a BLACK CAT emoji with the right
code points.
|
|
This was missed in 2f7873d427.
|
|
We are currently only validating long strings.
|
|
It will soon be included in the Kernel by way of String.h. Utf8View
includes DeprecatedString, which is not allowed in the Kernel.
|
|
For example, the code point U+002F could be encoded as UTF-8 with the
bytes 0x80 0xAF. This trick has historically been used to bypass
security checks.
|
|
This will allow validating UTF-8 strings at compile time, such as from
String::from_utf8_short_string.
|
|
The scrollback is really a property of the view, not the terminal.
|
|
- Use sentence style capitalization for CheckBox and GroupBox titles
- Remove excessive explanation of bell mode.
- Put a "lines" label after the scrollback history length input instead
of saying "(Lines)" in the GroupBox title.
- Tweak bell mode titles to make them self explanatory.
- Tweak language for exit confirmation.
|
|
- Use sentence style capitalization for CheckBox and GroupBox titles.
- Move the terminal font to the top.
- Split the cursor settings into two GroupBoxes (one for the shape,
and one for the blinking behavior).
|
|
Remove assymmetric vertical padding in various places.
|
|
Let's put the "View" tab first, since the most common reason to open
TerminalSettings is to adjust something about the appearance.
|
|
This looks better at larger checkbox sizes than just drawing it in the
top left corner. Ideally we'd have a scalable checkmark, of course.
|
|
|
|
|
|
|
|
If no HackStudio specific code font is set, we fall back to the system
default fixed-width font.
|
|
The Core::Version API now returns ErrorOr<String>, and the
GUI::AboutDialog API was adjusted to accommodate this.
|
|
|
|
|
|
This matches the spec's "parse a MIME type".
|
|
The type attribute of a blob is supposed to be a complete mime type of
the form "type/subtype", not just the determined mime type's type.
|
|
|
|
|
|
|
|
Since BodyInit and Headers are tightly coupled to both Request and
Response, I chose to do all of them at once instead of introducing a
bunch of temporary conversion glue code.
|
|
This regressed in e3a9ed0.
|
|
Also update the incomplete and slightly incorrect dummy interface code
snippet I used to generate this.
|
|
Seems nice to keep these in the same order as the input and have
deterministic codegen of interfaces in LibWeb (for the purpose of
diffing two build revisions, for example).
|
|
This is needed to have code for creating an in-memory sRGB profile using
the (floating-ppoint) numbers from the sRGB spec and having the
fixed-point values in the profile match what they are in other software
(such as GIMP).
It has the side effect of making the FixedPoint ctor no longer constexpr
(which seems fine; nothing was currently relying on that).
Some of FixedPoint's member functions don't round yet, which requires
tweaking a test.
|
|
This API is used by LibWeb's text painter. Bring it up to date with the
glyph width computations performed in draw_text_line() used by other GUI
applications.
|
|
|
|
These are not yet actually parsed, but detecting them means we at least
don't fail to understand the *actual* format value, which was causing
some CFF fonts to fail to load.
|
|
Type1 imposes a stack limit of 24 elements, but Type2 has a limit of 48.
We are better off relaxing the limit of the former in favour of properly
supporting the latter.
|
|
There were two issues with how we counted hints with Type2 CharString
commands: the first was that we assumed a single hint per command, even
though there are commands that accept multiple hints thanks to taking a
variable number of operands; and secondly, the hintmask/ctrlmask
commands can also take operands (i.e., hints) themselves in certain
situations.
This commit fixes these two issues by correctly counting hints in both
cases. This in turn fixes cases when there were more than 8 hints in
total, therefore a hintmask/ctrlmask command needed to read more than
one byte past the operator itself.
|
|
This could happen because there was a problem while loading the first
font in the document.
|
|
These streams might need a Filter that isn't implemented yet, and thus
cannot be blindly MUST()-ed.
|