Commit graph

284 commits

Author SHA1 Message Date
Jeremy Soller
f92a2058cf
Merge pull request #67 from grovesNL/add-docs
Fill out some more docs
2023-01-30 05:27:22 -07:00
grovesNL
a3e035881b Fill out some more docs 2023-01-29 22:29:17 -03:30
Jeremy Soller
983d6b7eac
Merge pull request #66 from grovesNL/clamp-size
Avoid negative width/height in `Buffer::set_size`
2023-01-26 20:18:22 -07:00
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
Audrey Dutcher
e00109d77f Downgrade some logging messages 2023-01-05 21:51:10 -07:00
Jeremy Soller
63ae69df0a Add formatting to tests 2023-01-04 20:18:47 -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
25d04ace1c Do not crash when inserting empty string 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
4616ca7dd9 Fix Insert('\n') 2023-01-04 18:41:26 -07:00
Audrey Dutcher
8e09a128bb Many upgrades for Editor 2023-01-04 18:41:26 -07:00
Audrey Dutcher
39d3219df9 Add Editor::insert_text 2023-01-04 18:41:26 -07:00
Audrey Dutcher
c5a5913981 re-export fontdb 2023-01-04 18:41:26 -07:00
Audrey Dutcher
58d292a6f1 Add FontSystem::into_locale_and_db for std system 2023-01-04 18:41:26 -07:00
Audrey Dutcher
92b3758909 Add ExactSizeIterator impl for LayoutRunsIter 2023-01-04 18:41:26 -07:00
Audrey Dutcher
06ad8ff7fb run cargo check next time thx 2023-01-04 18:41:26 -07:00
Audrey Dutcher
5533af1a53 Add FontSystem::new_with_locale_and_db for std system 2023-01-04 18:41:26 -07:00
Audrey Dutcher
cd15418315 Add BufferLine::into_text 2023-01-04 18:41:26 -07:00
Andrew Wheeler
8614a7a398 Updated RangeMap to Add Clear(). 2022-12-30 08:33:00 -07:00
Hojjat
b9fef72f76 Added an enum with the option for "No Wraping" 2022-12-20 13:38:34 -07:00
Hojjat
48087b592b Updated Doc String 2022-12-20 13:37:21 -07:00
Jeremy Soller
cf9bf26d49
0.6.0 2022-12-20 09:03:39 -07:00
Jeremy Soller
0e302e540a
0.5.6 2022-12-20 08:58:17 -07:00
Hojjat
1454a53b21 Glyph based wrapping implemeted 2022-12-20 04:48:53 -07:00
Hojjat
a4ed73b664 Simplify the layout algorithm 2022-12-20 04:48:53 -07:00
Hojjat
1bc476c06e This solves a few bugs:
Fixes long words in BiDi text.
Fixes issues with small text area and large font (no duplicates)
But I feel I need to rewirte this function. It's too convluted and ugly
2022-12-20 04:48:53 -07:00
Hojjat
499e6ccb06 Bug fix: duplicate lines in specific conditions. 2022-12-20 04:48:53 -07:00
Hojjat
8beeca2822 Fix duplicate visual lines when a word is too long
Words longer than the linewidth used to show up duplicated
2022-12-20 04:48:53 -07:00
Hojjat
e38a302599 Make ShapeWord::x/y_advance pub 2022-12-20 04:48:53 -07:00
Hojjat
25a3367ef9 Turn a consequtive whitespaces into separate words
Currently a sequence like this "hello      " (a word followed by
6 spaces). Would be shaped into two words: ["hello     " , " "]
This causes issues, since the first word is only 5 letters long,  not 10
This commit will break this sequence into:
["hello", " ", " ", " ", " ", " ", " "]
This helps with correct line wrappipng
2022-12-20 04:48:53 -07:00
Hojjat
3ef56b7112 Ignore the last space when wrapping. 2022-12-20 04:48:53 -07:00
Hojjat
cb958c63f8 Clean up 2022-12-20 04:48:53 -07:00
Hojjat
089a926615 Bidi reordering works with wrapping. 2022-12-20 04:48:53 -07:00
Jeremy Soller
82d5fc02a5
0.5.5 2022-12-16 13:51:05 -07:00
Héctor Ramón Jiménez
034c5248d9 Replace unless ... not with simply if ... in docs 2022-12-16 13:50:40 -07:00
Héctor Ramón Jiménez
be6dea75a8 Clarify when to use x_offset and y_offset in LayoutGlyph 2022-12-16 13:50:40 -07:00
Héctor Ramón Jiménez
01f6c1fd89 Expose subpixel offsets in LayoutGlyph 2022-12-16 13:50:40 -07:00
Jeremy Soller
ac28f5d77c
Update dependencies 2022-12-15 14:48:27 -07:00
Jeremy Soller
ba39c81656
Fix no_std compilation 2022-12-15 14:31:19 -07:00
Héctor Ramón Jiménez
be4dc2749c Fix line width in LayoutLine for RTL 2022-12-15 11:17:54 -07:00
Héctor Ramón Jiménez
67950724c3 Add line width field to LayoutLine 2022-12-15 11:17:54 -07:00
Héctor Ramón Jiménez
652543f9aa Implement method to obtain glyph outlines
This is useful for drawing text with non-bitmap based renderers (e.g. vectorial, tessellators, etc.).
2022-12-14 23:45:45 -07:00
Jeremy Soller
445da52efb
Fix inverted colors in libcosmic example 2022-12-14 09:24:54 -07:00
Jeremy Soller
21e0078d25
cargo upgrade 2022-12-14 09:21:42 -07:00