Age | Commit message (Collapse) | Author |
|
Resources are now stored in a ZIP archive, and it comes with an explicit version number. All the old embed/bincat stuff was removed as unnecessary.
resources.lgr is also a valid fontpack, for loading the built-in fonts.
IssueID #363
|
|
|
|
|
|
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.
|
|
When GlyphBuffers were freed, the array holding them wasn't.
|
|
When the last safe break position was not in the current attributed run, the calculated wrap advance came out incorrect. This was possible when the first glyph in an attributed run didn't fit.
|
|
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.
|
|
|
|
Convert Markdown to Gemtext and use ANSI escape sequences to switch fonts (bold, italic, monospace). The conversion is still a bit buggy...
|
|
Now all the available fonts are selectable in the dialog. Added preformatted and UI font settings and shuffled the order a bit to make more sense.
|
|
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.
|
|
Check auxiliary fonts first, and then all primary fonts that haven't been checked yet.
|
|
Scaling of monospace and symbols; cache reset.
|
|
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.
|
|
Widgets can now be marked for buffering their contents, which is useful if their contents change seldom but they are drawn often.
For example, the navbar is always visible but doesn't change very often, and during animations menu contents are static but there is a moving animation so everything gets drawn 60 FPS.
Focus handling was also improved so the lookup results can be scrolled while entering text, and one can tap outside an input field to unfocus it.
|
|
# Conflicts:
# CMakeLists.txt
# res/about/version.gmi
|
|
When multiple codepoints are in the same cluster, the hit test should only consider the first codepoint of the cluster, or otherwise the cursor is positioned somewhere in the middle of the cluster and not at the start.
|
|
In word-wrapped lines, a character will be hit multiple times and the
latest hit is what counts.
|
|
These options are mostly useful on mobile platforms that are not iOS or Android, and for testing purposes.
|
|
|
|
Emoji variation selectors would confuse cursor positioning and insertion behavior, breaking the assumption that each line ends with a single newline.
|
|
|
|
|
|
|
|
At a low level when measuring/drawing text, replace all characters with an override character.
|
|
Cursor movement and pasting.
|
|
|
|
|
|
Finding cursor position via coordinates. Handling the mark. Visual wrapped lines vs. content lines. Vertical scrolling inside the visual range.
|
|
|
|
`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.
|
|
Updated the old simple text renderer for the new WrapText wrapping.
|
|
|
|
|
|
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.
|