Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
Cleaned up serialization of the bool preferences a little.
|
|
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...
|
|
# Conflicts:
# CMakeLists.txt
# res/lang/es.bin
# res/lang/fr.bin
# res/lang/gl.bin
# res/lang/ie.bin
# res/lang/ru.bin
# res/lang/sk.bin
# res/lang/sr.bin
# res/lang/tok.bin
# src/ui/documentwidget.c
|
|
The HarfBuzz and wrapped text changes introduced subtle differences in how text selection works. Fixed a bunch of issues regarding how the individual character selection mode works in edge cases.
IssueID #357
|
|
Media still needs more work to get rid of redundancies and make lookups faster.
FontPacks are manipulated as Media items (not unlike images) so they can be previewed on page, and installed via a click.
FontPack management is not trivial as it includes such details as versioning and whether individual packs are enabled or disabled.
|
|
Added a second version of Iosevka with more line spacing, to be used as the default monospace document 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.
|
|
|
|
|
|
|
|
Option to colorize images to grayscale, text color, or preformatted color.
|
|
|
|
|
|
|
|
IssueID #312
|
|
A better way to keep track of the scheme used in a link.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
When an URL is visited, ensure that links to that URL update their visual state.
|
|
Font size should not suddenly change halfway through a paragraph.
|
|
`WrapText` iterates over the wrapped line segments and does a callback on each one, without losing any work buffers and text shaping information along the way.
|
|
The goal is to switch to `WrapText` so the entire paragraph can be processed in one go without having to re-initialize the HarfBuzz buffers after every wrap.
|
|
IssueID #229
|
|
|
|
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.
|
|
|
|
|
|
|
|
Internally, all URIs should be converted to a canonical form so that they can be compared against each other.
The canonical form is an IRI with spaces and reserved characters percent-encoded.
|
|
# Conflicts:
# CMakeLists.txt
|
|
Set a formatting flag on opened links.
|
|
IssueID #300
|
|
# Conflicts:
# src/gmdocument.c
|
|
|
|
When a page is opened from the sidebar, swiping back will now reopen the sidebar. Another swipe will dismiss the sidebar and navigate back as usual.
Attempted to cache theme colors in GmDocument, but there were issues with theme changes.
|
|
|
|
|
|
# Conflicts:
# src/gmdocument.c
# src/ui/documentwidget.c
# src/ui/inputwidget.h
|
|
The text renderer has problems with composites so normalizing the text (using Unicode normalization form C) yields better results for now.
|
|
|