Age | Commit message (Collapse) | Author |
|
SGR codes 2 and 10.
|
|
Other formatting besides line breaks is ignored for now, although attributed strings could be used here.
|
|
|
|
Making the heading hierarchy even clearer. H3 is now indented like normal text lines, and uses a bolder font.
|
|
The bold weight was a little bit too strong compared to the regular-weight level 2 headings.
|
|
Swapped bold styling of heading levels 2 and 3 for better visual distinction of the hierarchy.
|
|
The background color of the current text run can be changed via ANSI SGR control sequences.
Improved the ANSI escape sequence regex to detect more than just SGR sequences, so they can be properly filtered out.
|
|
Warn the user about missing glyphs and potentially unsupported ANSI escapes.
TODO: Site-specific setting for dismissed warning; fonts preference about missing glyph warnings.
|
|
FG color and font style escapes can be enabled separately. FG color remains enabled by default like before.
|
|
It can be argued that using ANSI escapes to style text goes against the intended use of Gemtext. Therefore, all ANSI escapes are now disabled by default in Gemtext.
|
|
|
|
These changes concern the situation when the attributes of text (i.e., font, color) are changed via escape sequences.
The concept of "base attributes" was added so that the low-level text renderer knows which font/color to set when a "reset" escape sequence is encountered. This depends on what kind of text is being renderer, e.g., preformatted or regular paragraphs.
The base attributes were added as variables in Text because it was getting unwieldy to pass all the information via the draw/measure/WrapText functions.
GmDocument now has a GmTheme struct that collects the font and color information into a single place.
|
|
Added a second version of Iosevka with more line spacing, to be used as the default monospace document font.
|
|
The idea is that the amount of content should be the same per line regardless of the font.
|
|
The built-in fonts are loaded via FontPack, and the font table is now constructed dynamically based on available fonts.
A full set of variants (style, size) are prepared for each font, but some of the data gets allocated lazily when needed.
GmRun needed a larger allocation for fonts, so now all the fields are combined into a single bit field.
TODO: Glyph scaling, vertical offsets, and symbol lookup are still not fully working.
|
|
|
|
The 80% size is used in the toolbar.
|
|
|
|
Toe dipping into multiple window support by allowing popup menu widgets to be displayed in independent windows.
This is not a 100% replacement for native menus, but it gets pretty close.
|
|
|
|
At a low level when measuring/drawing text, replace all characters with an override character.
|
|
|
|
|
|
`InputWidget` needs to be better at handling multiple lines. The previous implementation assumed that the content was short enough to be fully redrawn each frame, which is not a great idea when you have thousands of lines.
|
|
`run_Font_` was moving the Y cursor position twice for each line break.
Checking for the HarfBuzz UNSAFE_TO_BREAK flag leads to some unexpected behavior near edges of words.
The old `tryAdvanceNoWrap` method should return the maximum horizontal advance of the text, and not the cursor position's advance.
`draw_WrapText` used the wrong foreground color.
`TextBuf` now uses WrapText to do all the measuring and drawing, making things much simpler.
|
|
|
|
|
|
It appears HarfBuzz's script autodetection isn't working here for Arabic.
|
|
The base text direction of each line of text is determined when the document is laid out. When drawing runs, use this predetermined base direction.
|
|
There is still some weirdness with wraps that occur inside a bidi region. The problem is that text drawing is done later, in smaller segments, without knowledge of the paragraph base direction. The base direction should be saved into each GmRun as a flag.
|
|
|
|
The distinction between measure_Text and advance_Text was not very clear. Now there are only measure_Text functions that return both the bounds and the cursor position advancement, and the appropriate metrics are used by the caller.
|
|
|
|
Todo: This seems a little late in the game. The reordering should be done for each paragraph of text.
|
|
|
|
|
|
# Conflicts:
# CMakeLists.txt
|
|
|
|
Shuffled the widget flags a bit to make room for a new one.
|
|
|
|
|
|
Draw the circle and the number/letter separately since we don't
have a font with all the glyphs.
|
|
Some of the icons in the Bookmarks list and lookup results were misaligned.
|
|
Symbola's license is not permissive enough, so it has been removed. Added "Smol Emoji" with face emoticons and other UI characters for Lagrange. More symbols provided by Noto Sans Symbols and Noto Sans Symbols 2.
The fallback fonts are now Iosevka, which has a pretty good coverage (although monospace), and the user's chosen TrueType font (which could still be a local copy of Symbola).
Still a work in progress: some characters are missing.
IssueID #283
|
|
Improved TextBuf to handle word/bound-wrapped content.
|
|
|
|
|
|
Added a font for Arabic, making the glyphs available for rendering.
Of course, this doesn't solve Arabic text rendering yet. There is still the RTL direction to work out and possibly some missing glyph combining rules.
IssueID #195
|
|
Added the Noto Sans Simplified Chinese font. This adds another ~10 MB to resources.lgr, increasing the urgency of distributing fonts via separate downloads.
The font table was getting difficult to manage, so now the sizes are broken out into a separate enum, and the table is reordered to match the FontSize order.
|
|
Fill glyph backgrounds individually based on current color.
|