summaryrefslogtreecommitdiff
path: root/src/ui/text.h
AgeCommit message (Collapse)Author
2021-07-23InputWidget: Buffer contents not activeJaakko Keränen
2021-07-22InputWidget: Sensitive input modeJaakko Keränen
At a low level when measuring/drawing text, replace all characters with an override character.
2021-07-21Text: Finding the advance position of a characterJaakko Keränen
2021-07-20Text: Hit testing during a text runJaakko Keränen
2021-07-20Revising InputWidgetJaakko Keränen
`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.
2021-07-15Fixing regressions text metrics, InputWidgetJaakko Keränen
`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.
2021-07-15CleanupJaakko Keränen
2021-07-15GmDocument: Right-align RTL decorationsJaakko Keränen
2021-07-14Text: Detect Arabic scriptJaakko Keränen
It appears HarfBuzz's script autodetection isn't working here for Arabic.
2021-07-13Drawing document RTL text runsJaakko Keränen
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.
2021-07-13Text: Bidi text wrappingJaakko Keränen
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.
2021-07-13Text: Working on bidi text wrappingJaakko Keränen
2021-07-06Text run measurement API change; bug fixesJaakko Keränen
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.
2021-07-04Text: Adjusted Noto Symbols scalingJaakko Keränen
2021-07-03Text: Use FriBidi for visual orderJaakko Keränen
Todo: This seems a little late in the game. The reordering should be done for each paragraph of text.
2021-07-02Text: Word wrapping; fixed glyph cachingJaakko Keränen
2021-07-01Text: Working on HarfBuzzJaakko Keränen
2021-06-25Merge branch 'dev' into work/v1.6Jaakko Keränen
# Conflicts: # CMakeLists.txt
2021-06-24Text: Tune kerning on NunitoJaakko Keränen
2021-06-15Mobile: Show identity name in toolbarJaakko Keränen
Shuffled the widget flags a bit to make room for a new one.
2021-06-15Mobile: Draw Identity button as outlineJaakko Keränen
2021-05-28DocumentWidget: Improved drawing of link key shortcutsJaakko Keränen
2021-05-27DocumentWidget: Composited link numbers/lettersJaakko Keränen
Draw the circle and the number/letter separately since we don't have a font with all the glyphs.
2021-05-27Fixed icon alignmentsJaakko Keränen
Some of the icons in the Bookmarks list and lookup results were misaligned.
2021-05-25Removed Symbola, replaced with other/new fontsJaakko Keränen
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
2021-05-13InputWidget: Drawing hint and buffered textJaakko Keränen
Improved TextBuf to handle word/bound-wrapped content.
2021-04-13Text: Added a semibold Fira Sans fontJaakko Keränen
2021-04-07Text: Promoted codepoint type detection to the_FoundationJaakko Keränen
2021-03-28Added Noto Sans ArabicJaakko Keränen
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
2021-03-26Added Noto Sans SC; font table cleanupJaakko Keränen
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.
2021-03-17TextBuf: Support for colorJaakko Keränen
Fill glyph backgrounds individually based on current color.
2021-03-13Text: Separate glyph caching procedureJaakko Keränen
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.
2021-03-13Text: Removed pending glyphs trackerJaakko Keränen
2021-03-11Text: Additional custom link iconsJaakko Keränen
2021-03-10GmDocument: Links use a bold, tinted fontJaakko Keränen
Links are important enough to stand out clearly. A bold font can be tinted with the primary theme color without losing readability.
2021-03-09GmDocument: Light mode Gray document themeJaakko Keränen
The Gray theme now has a light and dark variant.
2021-03-08Improved custom link icons; link list spacingJaakko Keränen
Link lists and bullet lists are spaced the same way.
2021-03-08Local Gemini links can use Emoji/symbol from label textJaakko Keränen
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.
2021-03-06Rasterize a few glyphs on every frameJaakko Keränen
Also various widget fixes/improvements.
2021-03-06Mobile: Dealing with keyboard heightJaakko Keränen
The software keyboard obstructs part of the UI, so need to offset the view if the focused input widget would not be visible.
2021-02-24Source Sans Pro and Iosevka as font optionsJaakko Keränen
Allow the UI and monospace fonts to be used as page content fonts.
2021-02-24UI font consistencyJaakko Keränen
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.
2021-02-23Added a Large Bold UI fontJaakko Keränen
2021-02-22iOS: Font adjustmentsJaakko Keränen
2021-02-21Text: Added a 1.33x sized UI fontJaakko Keränen
2020-12-29Added a bold UI fontJaakko Keränen
The bold UI label font is used for highlighted sidebar items and default buttons.
2020-12-18Text: Improved handling of tab stopsJaakko Keränen
Text drawing can now be made aware of the available horizontal space.
2020-12-12New monospace font; flexible mono spacingJaakko Keränen
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
2020-12-12InputWidget: Allow variable-width fontsJaakko Keränen
2020-12-08Text: Ignore Unicode joiners and modifiersJaakko Keränen
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