summaryrefslogtreecommitdiff
path: root/src/ui/text.c
AgeCommit message (Collapse)Author
2022-02-18Serializing multiple windowsJaakko Keränen
Not quite fully functional yet. The window positioning still needs to be written to prefs.cfg.
2022-02-09Merge branch 'dev' into work/v1.11Jaakko Keränen
# Conflicts: # res/lang/eo.bin # res/lang/ie.bin
2022-02-09Text: Double-wide Emoji in preformatted blocksJaakko Keränen
Borrowed Emoji glyphs are laid out double-wide in monospace runs, because they most likely are wider than the monospace advance.
2022-02-08Fonts: Improved fallback glyph searchJaakko Keränen
The fontpack documentation says that when a glyph isn't found, all available fonts are checked in priority order. However, the implementation didn't actually do this. Now there is a separate priority mapping for loaded fonts so they can be quickly scanned for any missing glyphs in the right order. "iosevka-body" was prioritized higher because it provides a number of UI icons.
2022-02-06Merge branch 'dev' into work/v1.11Jaakko Keränen
# Conflicts: # CMakeLists.txt # res/fonts/SmolEmoji-Regular.ttf # res/lang/gl.bin # src/app.c
2022-02-04Fixed issues with stripping ANSI escapesJaakko Keränen
2022-02-02Improved legibility of ANSI FG colorsJaakko Keränen
Brighten dark colors on a (nearly) black background. On light backgrounds, reduce the darkening as it was a bit too strong; more of the color is now shown.
2022-02-01Fixed ANSI color handling issuesJaakko Keränen
Added the missing BG escapes 100-107, and fixed how the FG is adjusted to keep text legible. Previously it was not considering the actual BG color being applied to a text run.
2022-01-30Text: Break words at backslashesJaakko Keränen
2022-01-19Fontpack lookup via missing glyphsJaakko Keränen
IssueID #435
2022-01-07Text: Minor optimizationJaakko Keränen
When drawing glyphs, each one of them may be individually cached. Allocate less heap memory during these calls.
2022-01-07Text: CJK word wrappingJaakko Keränen
Improve mixed-language word wrapping, and position U+3001 and U+3002 near the baseline. IssueID #380
2022-01-06Text: Detect Bengali, Oriya, Tamil scriptsJaakko Keränen
IssueID #345
2022-01-06Detect Devanagari textJaakko Keränen
Tell HarfBuzz when Devanagari has been detected. TODO: Check for other languages supported by HarfBuzz (there's a long list). IssueID #345
2022-01-04Text: Light and regular font weight via ANSI escapesJaakko Keränen
SGR codes 2 and 10.
2021-12-27Text: Fixed simple text rendererJaakko Keränen
2021-12-18TextBuf: Set base attributes for ANSI escapesJaakko Keränen
2021-12-15macOS: Newlines in native menusJaakko Keränen
Other formatting besides line breaks is ignored for now, although attributed strings could be used here.
2021-12-14Text: Warning about unchecked FriBidi return valueJaakko Keränen
2021-12-07InputWidget: Buffered content is limited by max heightJaakko Keränen
2021-11-30iOS: CleanupJaakko Keränen
Skip the font download suggestion, and fixed an uninitialized value.
2021-11-29Fixed issues with tab button labelsJaakko Keränen
Fixed issue with very short text not being truncated at all. A short truncated label will now just show the icon, if one is set. The tab close buttons don't appear if the buttons are too small.
2021-11-21Apply ANSI SGR background colorsJaakko Keränen
The background color of the current text run can be changed via ANSI SGR control sequences. Improved the ANSI escape sequence regex to detect more than just SGR sequences, so they can be properly filtered out.
2021-11-14Merge branch 'dev' into work/v1.9Jaakko Keränen
# Conflicts: # CMakeLists.txt # Depends.cmake # src/lang.c
2021-11-12FontPack: Font dropdown includes IDs if ambiguousJaakko Keränen
If some fonts have the same human-readable name, the unique font ID will be added to show which font it actually is.
2021-11-04Merge branch 'dev' into work/v1.9Jaakko Keränen
# Conflicts: # src/lang.c
2021-11-01Fixed build with the simple text rendererJaakko Keränen
IssueID #372
2021-10-31Changed format of resources.lgrJaakko Keränen
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
2021-10-29FontPack: Loading fonts from TTC filesJaakko Keränen
2021-10-26Text: Use "alternative font 1" escape for monospaceJaakko Keränen
2021-10-25Document presentation warningsJaakko Keränen
Warn the user about missing glyphs and potentially unsupported ANSI escapes. TODO: Site-specific setting for dismissed warning; fonts preference about missing glyph warnings.
2021-10-20Installing individual TTF files; generate fontpack.iniJaakko Keränen
2021-10-18Preferences: ANSI escape flagsJaakko Keränen
FG color and font style escapes can be enabled separately. FG color remains enabled by default like before.
2021-10-18Text: Fixed a memory leakJaakko Keränen
When GlyphBuffers were freed, the array holding them wasn't.
2021-10-15Text: Fixed a line wrapping issueJaakko Keränen
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.
2021-10-14Preferences: ANSI escape sequences in GemtextJaakko Keränen
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.
2021-10-13Text attributes that change inside a runJaakko Keränen
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.
2021-10-13Added preference for font smoothingJaakko Keränen
2021-10-12Experimental Markdown renderingJaakko Keränen
Convert Markdown to Gemtext and use ANSI escape sequences to switch fonts (bold, italic, monospace). The conversion is still a bit buggy...
2021-10-09Preferences: Selecting fonts to useJaakko Keränen
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.
2021-10-08Font configuration; Prefs has a string value arrayJaakko Keränen
Added a second version of Iosevka with more line spacing, to be used as the default monospace document font.
2021-10-07DocumentWidget: Line width based on font glyph widthJaakko Keränen
The idea is that the amount of content should be the same per line regardless of the font.
2021-10-06Text: Fixed font lookup orderJaakko Keränen
Check auxiliary fonts first, and then all primary fonts that haven't been checked yet.
2021-10-06Fixed a couple of font issuesJaakko Keränen
Scaling of monospace and symbols; cache reset.
2021-10-06Revised runtime font managementJaakko Keränen
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.
2021-10-05Started working on font packsJaakko Keränen
2021-10-01Text: Fixed a symbol for sizeJaakko Keränen
2021-10-01Added a 90% sized UI font for URL bar indicatorsJaakko Keränen
The 80% size is used in the toolbar.
2021-10-01Text: Added small size to symbol fontsJaakko Keränen
2021-09-21Text: Use 8-wide tabs; hide indicators for nowJaakko Keränen