summaryrefslogtreecommitdiff
path: root/src/gmdocument.c
AgeCommit message (Collapse)Author
2022-02-17Tab button coloring with colored backgroundsJaakko Keränen
It's best to match the active tab button color to the document's background in case the latter is colored.
2022-02-17Fixed mismatched banner and backgroundJaakko Keränen
There was an issue with loss of color precision. Saturation dropped to zero when converting to 8-bit RGB.
2022-02-15Working on site-specific settings dialogJaakko Keränen
2022-02-14Added option for autoshowing images in data URLsJaakko Keränen
Disabled by default to be consistent with behavior of other links.
2022-02-13Added a preference for maximum URL sizeJaakko Keränen
The setting defaults to 8 KB. Link lines with longer URLs are not recognized as links.
2022-02-11Paperclip icon for data URLsJaakko Keränen
2022-02-09Merge branch 'dev' into work/v1.11Jaakko Keränen
# Conflicts: # res/lang/eo.bin # res/lang/ie.bin
2022-02-08DocumentWidget: Fixed continuous redraw issueJaakko Keränen
It was possible that the progressive rendering of runs repeatedly kept drawing the first run of the page (e.g., the top heading). It should still be investigated if a similar issue can occur in the other direction, when drawing downward. A run may exist on the bottom border of a buffer, too.
2022-02-07GmDocument: Added more link iconsJaakko Keränen
The U+2Bnn symbols are accepted as link icons.
2022-02-07DocumentWidget: No link number for image captionJaakko Keränen
2022-02-07GmDocument: Icon for "data" URLsJaakko Keränen
2022-02-07GmDocument: Handling images in "data:" URLsJaakko Keränen
One can embed arbitrary data inside a "data:" URL. If an image is recognized, attempt to show it as part of the document.
2022-02-04Fixed issues with stripping ANSI escapesJaakko Keränen
2022-01-29Changed a couple of iconsJaakko Keränen
2022-01-28GmDocument: Don't crash when a line turns out emptyJaakko Keränen
A line with nothing but ANSI escapes was not considered empty, but it didn't produce any text runs so the typesetter was confused. IssueID #443
2022-01-04Date in Gemini feed links is de-emphasizedJaakko Keränen
Use a regular font weight and dimmer color for the entry date.
2022-01-04Text: Light and regular font weight via ANSI escapesJaakko Keränen
SGR codes 2 and 10.
2021-12-26GmDocument: Detect an invalid linkJaakko Keränen
IssueID #427 # Conflicts: # res/about/version.gmi
2021-12-18Image metadata; improved open URLs indicatorJaakko Keränen
Put a new GmRun under an inlined image with the image metadata, so it doesn't overlap the caption text. Open URLs are now indicated with a document-width box instead of window-width box. The box is also slightly expanded for a nicer look. Links have a bit of padding around them so this doesn't cause overlaps with other runs.
2021-12-18Nicer image metadata and open URLs highlightJaakko Keränen
Metadata of inlined images shouldn't overlap the caption text. Open URL highlights are not drawn fullwidth to avoid clashing with side elements and generally to look more consistent.
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-14Fixed missing document width updatesJaakko Keränen
2021-12-07Document-specific palettesJaakko Keränen
Manage a color palette separately for each GmDocument, and activate one of them globally whenever a document is being drawn. Palettes are cached in memory.
2021-11-27GmDocument: Heading level 3 indents like text linesJaakko Keränen
Making the heading hierarchy even clearer. H3 is now indented like normal text lines, and uses a bolder font.
2021-11-27GmDocument: Changed heading 3 to semiboldJaakko Keränen
The bold weight was a little bit too strong compared to the regular-weight level 2 headings.
2021-11-27GmDocument: Allow ANSI BG setting to take effectJaakko Keränen
2021-11-25GmDocument: Heading font stylesJaakko Keränen
Swapped bold styling of heading levels 2 and 3 for better visual distinction of the hierarchy.
2021-11-22GmDocument: Arrows as custom link iconsJaakko Keränen
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-03Redo cached document layout if neededJaakko Keränen
Changing the fonts, zoom level, or window width will cause cached documents to be laid out again if they are restored from memory.
2021-11-02GmDocument: Remove heading line overlapJaakko Keränen
Spacing of heading lines was being reduced for a nicer appearance, but since backgrounds are erased behind text runs, it was causing issues with some fonts. Therefore this is disabled for now until I figure out how I want to fix the background issue. Maybe smarter clipping could be applied in the page renderer so that runs are only drawn once, and erasing the background becomes unnecessary? IssueID #364
2021-10-28GmDocument: Markdown regex tweakJaakko Keränen
2021-10-28GmDocument: Restore old themes after CRC-32 was fixedJaakko Keränen
The corrected CRC-32 function produces different theme seeds. This restores the old behavior.
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-25Banner: Error items; improved appearanceJaakko Keränen
2021-10-24Added BannerJaakko Keränen
Banner will take over everything related to the page top banner. DocumentWidget's content positioning is a bit messy, and now that the banner is no longer part of the GmDocument, it needed a bit of revising. It would still benefit from proper functions for mapping coordinates to/from the GmDocument coordinate space.
2021-10-24GmDocument: Fixed build issueJaakko Keränen
Use the standard `isdigit` from ctype.h.
2021-10-20GmDocument: "file://" is unthemedJaakko Keränen
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-18GmDocument: Fixed a potential crashJaakko Keränen
2021-10-17FontPack management via "about:fonts"Jaakko Keränen
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-15Preferences: Option to bold visited links, tooJaakko Keränen
Cleaned up serialization of the bool preferences a little.
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-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-11Merge branch 'dev' into work/v1.8Jaakko Keränen
# 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
2021-10-11DocumentWidget: Fixed text selection regressionsJaakko Keränen
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