summaryrefslogtreecommitdiff
path: root/src/ui/text.c
AgeCommit message (Collapse)Author
2021-04-05Text: Fixed crash during word wrappingJaakko Keränen
Word wrap position must not go past end of input.
2021-04-05Fixed color escapes in link visit dateJaakko Keränen
A color escape may be longer than two characters. `run_Font_()` was not parsing extended color escapes correctly.
2021-04-04Text: Kerning was brokenJaakko Keränen
Kerning has been broken by the changes for adaptive Emoji spacing inside monospace text. Now the current X position is updated correctly also for kerning.
2021-04-03Drawing only during window updateJaakko Keränen
Glyphs were inadvertently being cached already during measuring for layout. DocumentWidget was buffering graphics too early. Now buffered draws are prepared during normal drawing, when needed.
2021-03-31Text: Preserve alpha when caching glyphsJaakko Keränen
Ensure no blending is done. Glyphs are supposed to be cached as-is.
2021-03-31Text: Workaround for glyph rasterization problem with older SDL versionsJaakko Keränen
2021-03-28Text: Word wrapping and whitespaceJaakko Keränen
When wrapping, continue after whitespace.
2021-03-28Text: Added a noteJaakko 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-27DocumentWidget: Advanced text selectionJaakko Keränen
Double click to select by word, triple click by paragraph. IssueID #134
2021-03-27Text: Further word wrap fixesJaakko Keränen
Set the correct break position in noWrap mode.
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-25Text: Improved word wrappingJaakko Keränen
This was complicated by the wrap position being placed one character later than intended. IssueID #201
2021-03-25Text: Trying more conservative word wrapping rulesJaakko Keränen
IssueID #201
2021-03-17Moved "Find on page" menu itemJaakko Keränen
Mobile "Find on page" is now in the nav menu. Added icons to sidebar toggle items.
2021-03-17TextBuf: Support for colorJaakko Keränen
Fill glyph backgrounds individually based on current color.
2021-03-15Text: Don't crash after cache resetJaakko Keränen
2021-03-14Text: Monospace and zero-advance glyphsJaakko Keränen
Don't force the same advance on all glyphs, since some don't advance the position. IssueID #204
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-11Bring back regular-bold Nunito for linksJaakko Keränen
The extra bold that is used for titles is too bold for links.
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-07Processing per-pixel scroll eventsJaakko Keränen
Do platform-specific processing of scroll events up front so widgets can support both types of scrolls everywhere. IssueID #166
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-23Added a Large Bold UI fontJaakko Keränen
2021-02-23Text: Escape for restoring original colorJaakko Keränen
2021-02-22iOS: Font adjustmentsJaakko Keränen
2021-02-21Text: Added a 1.33x sized UI fontJaakko Keränen
2021-02-19iOS: Adjusting the UI for a tablet screenJaakko Keränen
2021-02-18iOS: Working on touch event handlingJaakko Keränen
Handle finger down, motion, and up events to implement basic taps, long presses, and inertia scrolling. Much finetuning still to be done, and certain widgets like input fields and scrollbars need a direct drag mode (they were working fine via the "mouse" events already).
2021-02-14Color: Extended range for color escapesJaakko Keränen
Use a double \r for color IDs 95 and beyond.
2021-02-13Text: No scaling for text glyphsJaakko Keränen
2021-02-13Windows: Further custom frame improvementsJaakko Keränen
Saving the window rectangle and snap mode. Frame title alignment.
2021-01-10Text: Lazy glyph rasterizationJaakko Keränen
Glyphs are now rasterized only when they are needed for drawing. Otherwise, only the metrics and the cache position are set. This is more robust as we can retry rasterizing glyphs that previously failed, and faster because measuring (e.g., document layout) doesn't rasterize anything.
2021-01-04Text: Fixed a very minor memory leakJaakko Keränen
Sometimes a glyph was rasterized but it was not possible to create a texture out of it. In this case, the surface was never released.
2020-12-31Text: Clear glyph cache when it fills upJaakko Keränen
We can use a smaller glyph cache if we clear it when it fills up. Even a large cache would eventually fill up, so clearing is a good strategy anyway. Clears occur still rather infrequently.
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-24Fixed: InputWidget cursor positioningJaakko Keränen
2020-12-20CleanupJaakko Keränen
2020-12-19Text: Recognize more ANSI escapesJaakko Keränen
2020-12-19Text: Line wrapping tweakJaakko Keränen
2020-12-18Text: Improved handling of tab stopsJaakko Keränen
Text drawing can now be made aware of the available horizontal space.
2020-12-17Text: Tuned content monospace line spacingJaakko Keränen
2020-12-13Fixed UI text color regressionJaakko Keränen
2020-12-12Text: Clip glyphs to fit verticallyJaakko Keränen
There may be partial overlaps with full-height glyphs because the fonts are scaled unhinted.
2020-12-12Text: Smaller monospace body fontJaakko Keränen
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