John Nunley
440d24ffa0
Add more Debug implementations
...
I generally like to implement Debug on these kind of types.
2023-07-07 21:44:21 -07:00
tigregalis
fb8bb60972
update comments
2023-06-30 20:40:12 +08:00
tigregalis
7db01ebf3a
use core::mem::{replace, take} not std::
2023-06-30 20:31:29 +08:00
tigregalis
48f6aefb80
remove unnecessary into_iter in doctests
2023-06-27 21:59:58 +08:00
tigregalis
4a05c9c1cf
add BorrowedWithFontSystem<_>::set_rich_text
2023-06-27 21:53:27 +08:00
tigregalis
f092bdde73
add Buffer::set_rich_text method
2023-06-27 21:53:05 +08:00
Héctor Ramón Jiménez
eb09cf0259
Introduce PhysicalGlyph for offsetting and scaling
2023-06-20 06:07:24 +02:00
Jeremy Soller
e8b10fd675
Base selection on the top of the line
2023-06-16 07:03:43 -06:00
Jeremy Soller
10bf182c5d
Fix line wrap and scroll
2023-06-16 06:51:11 -06:00
Héctor Ramón Jiménez
431163dc35
Consider the centering_offset for visibility in LayoutRunIter
2023-06-16 02:25:45 +02:00
Héctor Ramón Jiménez
c2bef6a345
Align glyphs in a LayoutRun to baseline
2023-06-16 02:15:44 +02:00
Jeremy Soller
b5f45f81f6
Merge pull request #124 from tigregalis/iter-bidi-para
...
Replace use of `str::Lines` with `unicode-bidi`-based iterator
2023-06-09 07:03:07 -06:00
tigregalis
6e336ad1cd
replace use of str::lines with BidiParagraphs
2023-06-09 11:26:07 +08:00
tigregalis
2ed9c34796
use Buffer::new_empty in Buffer::new
2023-06-09 11:11:42 +08:00
tigregalis
cfb6760fa2
introduce Buffer::new_empty
2023-06-09 11:09:16 +08:00
Dima Rets
0eb08d218c
allow setting cursor color
2023-06-08 20:04:56 +01:00
Héctor Ramón Jiménez
87d75531b7
Allow Shaping::Basic only if swash feature is enabled
2023-04-21 20:47:02 +02:00
Héctor Ramón Jiménez
0f055c0a13
Replace skip_shaping boolean with Shaping enum
2023-04-21 20:24:44 +02:00
Héctor Ramón Jiménez
ad111a1df1
Add skip_shaping flag to avoid expensive shaping when not needed
2023-04-19 00:24:43 +02:00
13r0ck
e790e8e718
use checked_sub to fix panic on window resize.
...
bug link: https://github.com/iced-rs/iced/issues/1773
2023-03-30 12:40:14 -06:00
Edgar Geier
3331f41d7a
Improve documentation
2023-03-12 10:39:57 +01: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
Jeremy Soller
bd27ca8ad8
Merge pull request #88 from geieredgar/clippy-fixes
...
Fix clippy warnings
2023-03-02 14:53:08 -07:00
Edgar Geier
6c501c6640
Fix clippy warnings
2023-03-01 22:58:41 +01:00
Edgar Geier
4e93853765
Remove lifetime from SwashCache
2023-03-01 22:41:59 +01:00
Héctor Ramón Jiménez
22b8a534fa
Avoid division by zero in LayoutRunIter
2023-02-28 20:40:31 +01:00
Héctor Ramón Jiménez
4320ae6329
Use f32 instead of i32 for lengths
...
This allows users to use logical coordinates instead of physical ones.
2023-02-28 03:39:31 +01:00
grovesNL
6a656e9a0f
Exclude line y offset in height comparison
...
We start `line_y` at an initial offset, so we need to account for this
later when checking if the total height is beyond the buffer height.
2023-02-24 11:27:45 -03:30
notgull
86d7ba959e
Forgot about set_metrics
2023-02-18 18:00:57 -08:00
notgull
c4ee3ba64e
Early panic on divide by zero
2023-02-18 17:59:30 -08:00
grovesNL
a3e035881b
Fill out some more docs
2023-01-29 22:29:17 -03:30
grovesNL
be9b4cb36c
Avoid negative width/height in Buffer::set_size
...
Negative width/height may cause unexpected effects on the layout, which
we can avoid by clamping.
2023-01-26 22:16:23 -03:30
Audrey Dutcher
a5903bb3bf
Don't do profile timing on wasm32
2023-01-23 14:18:44 -07:00
Audrey Dutcher
1225106ddc
Fix docs
2023-01-19 09:19:54 -07:00
Audrey Dutcher
c6cf57e213
Add enum for cursor affinity; rename constructor to new_with_affinity
2023-01-19 09:19:54 -07:00
Audrey Dutcher
da842ec10d
Add cursor affinity
2023-01-19 09:19:54 -07:00
Jeremy Soller
8cc988d374
Run cargo fmt
2023-01-04 20:03:03 -07:00
Jeremy Soller
00bc4d1e88
Fix tests
2023-01-04 20:02:00 -07:00
Audrey Dutcher
210ca61f13
remove highlight_blocks, add LayoutRun::highlight
2023-01-04 18:41:26 -07:00
Audrey Dutcher
961b10d7b1
Add Buffer::highlight_blocks
2023-01-04 18:41:26 -07:00
Audrey Dutcher
92b3758909
Add ExactSizeIterator impl for LayoutRunsIter
2023-01-04 18:41:26 -07:00
Hojjat
b9fef72f76
Added an enum with the option for "No Wraping"
2022-12-20 13:38:34 -07:00
Hojjat
089a926615
Bidi reordering works with wrapping.
2022-12-20 04:48:53 -07:00
Héctor Ramón Jiménez
67950724c3
Add line width field to LayoutLine
2022-12-15 11:17:54 -07:00
Jeremy Soller
ee54e7626b
Vi-style editor and other editor improvements ( #40 )
...
* WIP VI wrapper for editor
* WIP: block cursor
* Create Edit trait, run CI on all feature options
* Add prints describing build steps to ci.sh
* Custom rendering for Vi editor
* Clippy fixes
* More clippy fixes
* Show clippy results in CI
* Fix for Redox
* Fix clippy lint
* Add vi feature to enable vi-style editor
* Add escape to libcosmic text box
2022-11-15 12:26:59 -07:00
Hojjat
b253800383
Add Padding to the TextBox ( #36 )
...
* WIP: initial text-margin support
* Fix the selection issue when clicking the margins
* Move the margin size into the main
* using padding, consistent with iced text_input
* Added top and bottom margin
* bugfix: selection starting from the top margin works
* bugfix: left half of first glyph was being ignored
2022-11-10 11:55:12 -07:00
Jeremy Soller
bbe7d77b7b
Improvements to syntax editor, integrate with libcosmic editor
2022-11-09 10:44:51 -07:00
Jeremy Soller
268805ba0c
no_std support
2022-11-08 13:24:14 -07:00