Age | Commit message (Collapse) | Author |
|
|
|
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.
|
|
Previously glyph caching was done during text rendering, but that would mean lots of swapping between rendering stuff to the cache and then immediately afterward rendering to the display. There would be a swap per each new glyph.
Now the entire document's glyphs are precached at once when a request is finished. Glyphs are also cached in larger batches when new text needs to be drawn.
|
|
|
|
|
|
Links are important enough to stand out clearly. A bold font can be tinted with the primary theme color without losing readability.
|
|
The Gray theme now has a light and dark variant.
|
|
Link lists and bullet lists are spaced the same way.
|
|
Instead of the default link icon, if a label starts with an Emoji or
symbol, use that as the icon. This only works with local Gemini links so
important information about link destination is not hidden.
|
|
Also various widget fixes/improvements.
|
|
The software keyboard obstructs part of the UI, so need to offset the view if the focused input widget would not be visible.
|
|
Allow the UI and monospace fonts to be used as page content fonts.
|
|
Try to minimize the number of fonts in the UI. Input fields now use the same UI font as everything else. The monospace font was originally used because the widget required one, but that is no longer the case.
|
|
|
|
|
|
|
|
The bold UI label font is used for highlighted sidebar items and default buttons.
|
|
Text drawing can now be made aware of the available horizontal space.
|
|
Iosevka replaces Fira Mono as the monospace font.
Emojis are now allowed to be wider than normal monospace glyphs. However, if whitespace permits, the original monospacing is restored.
IssueID #73
|
|
|
|
The fonts bundled with Lagrange currently do not have all the latest Unicode symbols, so we'll ignore the joiners and modifiers for gender and skin color.
A better option would be to fall back to system-provided text rendering, if that is available.
IssueID #81
|