Commit graph

454 commits

Author SHA1 Message Date
Taj Pereira
1de8233119 Hint swash_outline_commands 2024-12-22 18:00:31 -07:00
Carlos Diaz-Padron
c8c8aa3fb8 Handle single wrapped line scrolling
Before this change, scrolling down when there were multiple layout lines, that rendered beyond the screen, would not work properly. This is because the current logic only acts if there are two or more buffer lines, calculating the proper layout height for each line.

This adds an edge case check for single lines, ensuring the case is handled.
2024-12-21 19:17:35 -07:00
Taj Pereira
81c9666eaa Add get_outline_commands_uncached 2024-12-21 19:17:07 -07:00
Jan Beich
829a59bd95 Apply fallback font to more Unices
- DragonFly, FreeBSD, NetBSD, OpenBSD all use fontconfig
- Solaris-based systems use fontconfig
2024-12-21 19:16:14 -07:00
Caleb Yates
252078cfe4 fix: avoids panic 2024-12-21 19:15:58 -07:00
Jeremy Soller
1f4065c1c3
Drop ShapePlanCache
The ShapePlanCache was added to improve performance when shaping the same
strings over and over. However, it never had the ability to be trimmed
and when it was moved to FontSystem, this created a permanently growing
allocation. It is recommended to instead use the shape-run-cache feature
which supports trimming if it is desired to have higher performance for
repeated shaping, at the cost of manually specifying when to trim.
2024-11-06 18:59:56 -07:00
dekrain
4fe90bb612 Fix the character index used for getting a glyph attribute in basic shaping 2024-09-23 07:53:29 -06:00
Mohammad AlSaleh
e8f567cf5b Fix typo in fallback font name
The font name is "Noto Sans CJK JP", not "Noto Sans CJK JA".

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-09-09 13:43:16 -06:00
koe
9d132f8ebd cache the monospace fallbacks buffer in FontSystem 2024-09-05 07:57:55 -06:00
koe
069d3404bf build fixes 2024-09-03 15:59:15 -06:00
koe
9dc024616b move ShapeBuffer to FontSystem 2024-09-03 15:59:15 -06:00
koe
0935f549ee add alignment option to Buffer::set_rich_text 2024-09-01 15:26:38 -06:00
koe
c65f299e87 fix no_std 2024-09-01 15:00:17 -06:00
koe
cdf1e5b4ee fix lint error 2024-09-01 15:00:17 -06:00
koe
f89e64aa76 cleanup 2024-09-01 15:00:17 -06:00
koe
b68f4ad5c6 Optimize Buffer::set_rich_text for when the buffer is reconstructed 2024-09-01 15:00:17 -06:00
koe
c751217020 Add AttrsList::spans_iter and use it in Buffer::append 2024-09-01 07:20:07 -06:00
koe
caa214a755 Use SmolStr in FamilyOwned instead of String 2024-09-01 07:20:07 -06:00
Christian Westrom
7c25fcb7ae add the convenient API for setting tab width 2024-09-01 07:12:04 -06:00
Jeremy Soller
58c2ccd1fb
0.12.1: Make collection of monospace fallback information optional 2024-07-31 10:02:11 -06:00
JL710
4f31665805 fix for no_std 2024-07-19 19:28:25 -06:00
JL710
05374aa34d implement Clone for Editor 2024-07-19 19:28:25 -06:00
Jeremy Soller
0e2d050a8d
Fix LayoutRunIter returning lines beyond Buffer height 2024-07-09 11:21:03 -06:00
Jeremy Soller
7677ba388c Revert "Promote Noto Color Emoji fallback"
This reverts commit 5e82de11cf.
2024-06-17 17:20:34 -06:00
Kristoffer Ödmark
542b20ca43 Upgrade dependencies, and re-export ttf-parser so that dependents can verify fonts using the same ttf-parser version 2024-06-15 06:05:18 -06:00
Jeremy Soller
8bb45d7aca
Shape tabs as spaces, fixes #248 2024-06-12 10:34:19 -06:00
Piotr
a46e992396 add method to set syntax highlighting by file extension 2024-06-12 09:56:59 -06:00
Jeremy Soller
69d5aec7fc
Fix infinite loop if scroll is on invalid line 2024-06-12 09:42:27 -06:00
Jeremy Soller
93a7df859a Allow for undefined buffer width and/or height, fixes #70 2024-06-12 09:14:56 -06:00
Jeremy Soller
b288de13ae Allow layout to be calculated without specifying width 2024-06-12 08:00:33 -06:00
Pavel Strakhov
a3a6262e5d Add Edit::cursor_position 2024-06-10 10:39:58 -06:00
Jeremy Soller
320b034f5b Performance improvement in set_tab_width 2024-06-10 10:21:25 -06:00
Pavel Strakhov
10ae9a9b16 Add an option to set selected text color 2024-06-10 10:15:09 -06:00
Jeremy Soller
3c94352f3f Support expanding tabs 2024-06-10 08:12:42 -06:00
Jeremy Soller
56812a8348 Make vertical scroll by pixels instead of layout lines 2024-06-10 08:05:27 -06:00
Jeremy Soller
6eb67bb524
Use default metrics for empty lines, fixes #258 2024-06-07 11:27:49 -06:00
Jeremy Soller
21e88ebc45
Move line height calculation to LayoutLine 2024-06-07 10:52:26 -06:00
Jeremy Soller
c7100dc989 Format 2024-06-06 19:38:40 -06:00
Jeremy Soller
497003e67e Fall back to buffer line height only if no glyphs found 2024-06-06 19:38:40 -06:00
Jeremy Soller
020701734e Address review 2024-06-06 19:38:40 -06:00
Jeremy Soller
37688747e1 Use line height from attrs 2024-06-06 19:38:40 -06:00
Jeremy Soller
8638ec29bb Add metrics to attributes 2024-06-06 19:38:40 -06:00
Jeremy Soller
89503b254f
Fix compilation without std feature 2024-06-05 08:19:34 -06:00
Itsusinn
39c4e3e02b refactor: move "rayon" feature under "std" 2024-06-05 08:15:51 -06:00
Itsusinn
1f52b5211c fix: no redundant load 2024-06-05 08:15:51 -06:00
Itsusinn
658025314c feat: concurrently load & parse fonts 2024-06-05 08:15:51 -06:00
apricotbucket28
5e82de11cf Promote Noto Color Emoji fallback 2024-06-04 17:51:21 -06:00
Jeremy Soller
b0a70c70ff
Fix horizontal scrolling to start of empty line 2024-05-30 14:36:18 -06:00
Jeremy Soller
cb9d405c20
Fix horizontal scroll to end of line 2024-05-30 14:33:35 -06:00
Jeremy Soller
570999809c
Track horizontal scroll (which must be implemented by renderers) 2024-05-30 14:26:38 -06:00