Wren [Undefined]
a03faa654d
Variable font support ( #400 )
...
* Variable font support
Here's a pretty naïve solution for variable fonts.
The iterator doesn't use the match keys' weight, but instead tries to
get the requested ideal weight, if the font is variable, otherwise it is
ignored and the actual (non-variable) weight is used. This is because I
didn't implement finding variable weight support for match keys; doing
so would be impossible without parsing TTF files when matching and I
didn't want to add that potentially expensive infrastructure if not
entirely necessary.
This is a breaking change, and I'm open for ideas on how to fix that
if it's an issue.
* cargo fmt
* Add variable font example to rich-text example
2025-07-07 08:50:40 -06:00
Jeremy Soller
d15011fba5
Format code
2025-07-02 11:02:56 -06:00
Jeremy Soller
4de1b13494
Add DISABLE_HINTING cache flag
2025-07-02 10:58:08 -06:00
Stewart Connor
e828131c92
fix for test.sh
2025-03-31 17:03:51 +11:00
dsgallups
485497973f
chore: updating newfound lints
2025-01-22 17:00:01 -07:00
dsgallups
f05a69a9d9
resolve all lints, update MSRV
2025-01-22 17:00:01 -07:00
koe
0935f549ee
add alignment option to Buffer::set_rich_text
2024-09-01 15:26:38 -06:00
Jeremy Soller
93a7df859a
Allow for undefined buffer width and/or height, fixes #70
2024-06-12 09:14:56 -06:00
Pavel Strakhov
a3a6262e5d
Add Edit::cursor_position
2024-06-10 10:39:58 -06:00
Pavel Strakhov
10ae9a9b16
Add an option to set selected text color
2024-06-10 10:15:09 -06:00
Jeremy Soller
56812a8348
Make vertical scroll by pixels instead of layout lines
2024-06-10 08:05:27 -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
0cfd9b64ef
Add line ending abstraction ( #250 )
...
* Add line ending abstraction
* Make Buffer::set_text use LineIter
* Add ctrl+s for saving to editor
2024-04-30 12:12:25 -06:00
Nico Burns
a53a0b3a8c
Convert rich-text example to winit
2024-03-03 17:22:33 -07:00
Nico Burns
9615978557
Refactor scrollbar width handling for editor example
2024-03-03 17:22:33 -07:00
Nico Burns
43d3620e44
Convert editor example to winit
...
Swap color channels
Remove unused code in rich-text-winit example
Port editor example to winit
WIP
Implement scroll logic + add shape_as_needed
Handle text input using named keys
request redraw on click
cargo fmt
Implement dragging
Refactor winit event handlers to avoid duplication
Re-enable text size keyboard shortcuts
Remove unused imports
Fix updating scale factor
Fix unused variable warnings
Remove logging
Remove commented code
Delete rich-text-winit example
Rename editor-winit example to editor
2024-03-02 18:33:51 -07:00
Jeremy Soller
0a24ee0423
Remove editor-libcosmic
2024-02-07 14:45:11 -07:00
Jeremy Soller
bd5f2f95e8
Add capability to synthesize italic
2024-01-17 13:31:03 -07:00
Jeremy Soller
0a11fb1045
Make Editor::buffer_ref accessible, rename lifetimes
2024-01-17 13:31:03 -07:00
Jeremy Soller
cbbf6f0d8f
Allow Editor to use reference or Arc of Buffer
2024-01-17 13:31:03 -07:00
Jeremy Soller
ae030e9885
Move color and x_opt out of Cursor
2024-01-17 13:31:03 -07:00
Jeremy Soller
d0b4b4635e
Refactor of scroll and shaping
...
- Scroll is identified by line index and layout index, instead of just
layout index
- Shaping has the option to prune, where caches outside of the scroll
view are cleared
- Syntax editor no longer requires layout of all lines, only of lines
inside scroll
- BufferLine has a metadata field that can be used by other abstractions
to know when text was changed
2024-01-17 13:31:03 -07:00
Jeremy Soller
018a2e9d2a
Move cursor motions to new Motion enum, move handling to Buffer
2024-01-17 13:31:03 -07:00
Jeremy Soller
6528e9f804
multiview example
2024-01-17 13:31:03 -07:00
Jeremy Soller
daa5a6615c
Merge pull request #129 from tigregalis/cross-platform-terminal-example
...
Update terminal example using `colored`
2023-11-28 15:22:21 -07:00
Jeremy Soller
cbd567d238
Support line selection
2023-11-28 10:42:50 -07:00
Jeremy Soller
659001dad8
editor-orbclient: fix scaling
2023-11-07 15:56:43 -07:00
Jeremy Soller
ad10e7373b
Require default Attrs to be specified in set_rich_text
2023-10-27 13:08:27 -06:00
Huang-Huang Bao
68ec25d38a
Fix building editor-libcosmic with vi feature
...
The vi editor has no update_theme method, fix it with feature gate.
2023-09-17 11:52:34 +08:00
tigregalis
0d9173c05b
update rich_text example with set_rich_text
2023-06-27 21:56:17 +08:00
Jeremy Soller
e7f3e161b4
Merge pull request #145 from 0HyperCube/update-libcosmic-version
...
Update libcosmic version
2023-06-26 06:29:02 -06:00
0hypercube
f6f56a93be
Update libcosmic example version
2023-06-25 12:01:18 +01:00
0hypercube
bc1a327371
Add light syntax highligher to libcosmic example
2023-06-25 11:58:10 +01:00
tigregalis
27d61e5514
update terminal example using colored
2023-06-09 11:37:24 +08:00
tigregalis
053efa77b6
remove todo comment
2023-06-09 11:26:08 +08:00
tigregalis
6e336ad1cd
replace use of str::lines with BidiParagraphs
2023-06-09 11:26:07 +08:00
Héctor Ramón Jiménez
0dce8b75d1
Fix examples
2023-04-21 20:35:59 +02:00
Jeremy Soller
615dc51907
Merge pull request #119 from CryZe/fix-no-std-signature
...
Fix `FontSystem::new_with_locale_and_db` Signature
2023-03-31 06:42:26 -06:00
Jeremy Soller
3c7dc1f657
Remove monospaced from attrs
2023-03-30 08:04:52 -06:00
Christopher Serr
71281a5d79
Fix FontSystem::new_with_locale_and_db Signature
...
It turns out that the `no_std` version of
`FontSystem::new_with_locale_and_db` doesn't match the `std` version.
This fixes that.
2023-03-29 22:36:54 +02:00
Jeremy Soller
6c355bf08b
Update libcosmic to fix memory leak
2023-03-24 09:59:03 -06:00
Jeremy Soller
3bb2868fbf
Update libcosmic
2023-03-24 08:05:46 -06:00
Jeremy Soller
d85f12af8b
Fix #106 with editor-libcosmic
2023-03-24 07:51:31 -06:00
Jeremy Soller
31a8427e10
Update libcosmic
2023-03-23 14:20:48 -06:00
Jeremy Soller
f101f5ca93
Merge branch 'example-deps' of https://github.com/geieredgar/cosmic-text into geieredgar-example-deps
2023-03-17 18:18:20 -06:00
Edgar Geier
384c5c1fdc
Remove Mutex from FontSystem
2023-03-12 10:39:56 +01:00
Edgar Geier
46e9ef0246
Make BorrowedWithFontSystem borrow FontSystem mutably
2023-03-12 10:39:56 +01:00
Edgar Geier
057b5b6fa9
Extract borrow of FontSystem from Buffer
2023-03-12 10:39:54 +01:00
Edgar Geier
d59fd3f46b
Update example dependencies
2023-03-06 22:43:25 +01:00