Jeremy Soller
a13fd9c591
Improve docs
2022-10-31 11:36:54 -06:00
Jeremy Soller
7d26e332f0
Make cursor_moved private
2022-10-31 11:26:05 -06:00
Jeremy Soller
92cad6fe13
Decouple editing from buffer
2022-10-31 11:24:36 -06:00
Jeremy Soller
26c83be35a
Combine spans in add_span if possible
2022-10-31 10:25:08 -06:00
Andrew Wheeler(Genusis)
f2a60a8dcc
Rework add_span ( #25 )
...
* Rework Ranges to split and change or overwrite based on old ranges to new range
* set array size to 3 instead of 5. added some comments
* Avoid adding ranges that the start and end == each other
* actually remove the start != end requirement since get_span doesnt care and would work for single characters.
* Add 1 to forward map so it cant overlap ranges like 11..11
* optimize the span lookup so if it is outside the search parameters it doesnt keep looping. update get span to iterate normally since there should be no duplicates. Maybe optimize this to a btree now instead?
* make the range changes for front to end have the end -1 so as to not overlap since get span is <=
* Readded block for ranges like 1..1
Moved rework ranges into the first loop.
Removed the -1 and +1 from the range clips.
2022-10-29 17:56:14 -06:00
Jeremy Soller
a4a4eb7783
Fix rgba ordering
2022-10-27 18:16:42 -06:00
Jeremy Soller
88bd1c9235
Add layout_opt and shape_opt getters to TextBufferLine
2022-10-27 17:40:00 -06:00
Jeremy Soller
cce821e99f
Adjust attribute spans when buffer lines change
2022-10-27 14:51:46 -06:00
Jeremy Soller
e2b9aa77b9
Iterate attr spans in reverse for efficiency
2022-10-27 13:50:14 -06:00
Jeremy Soller
2b1e884ca7
Use SwashCache in doc example
2022-10-27 11:02:56 -06:00
Jeremy Soller
8f8cf80bf6
Update documentation
2022-10-27 10:29:19 -06:00
Jeremy Soller
e4c8d4ba6b
Make attribute spans use ranges and update docs
2022-10-27 09:56:53 -06:00
Jeremy Soller
3ece9236b3
Use Color in more places
2022-10-27 09:07:47 -06:00
Jeremy Soller
f133b1fca1
Improve API to set line attributes
2022-10-27 08:37:07 -06:00
Jeremy Soller
40175aac10
Always match emoji regardless of attributes
2022-10-27 08:25:30 -06:00
Jeremy Soller
1e1164f4b2
Cache syntax highlighting results
2022-10-26 22:25:37 -06:00
Jeremy Soller
f85223b376
Only reset lines where highlight changes
2022-10-26 21:27:29 -06:00
Jeremy Soller
6f7e59e092
Add TODO to fix bidi ordering when character wrapping
2022-10-26 20:14:27 -06:00
Jeremy Soller
87c12b11ae
Combine both simple and word wrapping into one layout function
2022-10-26 20:10:38 -06:00
Jeremy Soller
5d1aa8b814
Add simple per-glyph wrapping option
2022-10-26 19:56:13 -06:00
Jeremy Soller
57feeb2901
Preserve cursor glyph when moving up/down
2022-10-26 19:45:28 -06:00
Jeremy Soller
846c646043
Syntax highlighting while editing
2022-10-26 19:31:33 -06:00
Jeremy Soller
559a83faa5
Improve attribute setting
2022-10-26 18:45:31 -06:00
Jeremy Soller
a51f5ac4a8
Highlight empty lines correctly
2022-10-26 17:52:51 -06:00
Jeremy Soller
ea64291abb
Make it possible to set attributes per glyph
2022-10-26 15:16:06 -06:00
Jeremy Soller
4798c7ee1a
Add initial rich text example
2022-10-26 14:16:48 -06:00
Jeremy Soller
119a570ee9
Cache font matches, use usize for line index, use font system for swash
2022-10-26 12:23:03 -06:00
Jeremy Soller
cdc2868c10
Remove completed TODO
2022-10-25 22:10:15 -06:00
Jeremy Soller
80e0a31188
Make font_matches accessible via function only
2022-10-25 21:38:47 -06:00
Jeremy Soller
808e75a54d
Add Menlo as a fallback on macOS
2022-10-25 21:31:42 -06:00
Jeremy Soller
ea18576032
Make it possible to set and use default family
2022-10-25 21:16:02 -06:00
Jeremy Soller
d04337075a
Make fontdb database public
2022-10-25 20:56:31 -06:00
grovesNL
dcb8add5f4
Re-export SwashContent
2022-10-25 20:52:10 -06:00
Jeremy Soller
e53956cb2d
Fix scrolling with cursor
2022-10-25 20:49:15 -06:00
Jeremy Soller
c031944b45
Make hit detection public
2022-10-25 20:27:46 -06:00
grovesNL
e32cfedfcf
Make font_matches public for now
2022-10-25 19:52:59 -06:00
Jeremy Soller
f652dd1a99
Add function for getting swash image without caching
2022-10-25 19:40:17 -06:00
Jeremy Soller
22036a0f9e
Font does not need to store index, it is part of info
2022-10-25 19:17:40 -06:00
Jeremy Soller
3e8e28f0b3
Do not require lifetime for swash fontref
2022-10-25 18:16:14 -06:00
Jeremy Soller
525c4efaa5
Add ability to set global buffer attributes
2022-10-25 16:29:33 -06:00
Jeremy Soller
59a4f8a4c1
Produce FontMatches inside of Buffer
2022-10-25 16:13:07 -06:00
Jeremy Soller
085231c153
Move font matching to Attrs
2022-10-25 15:51:28 -06:00
Jeremy Soller
324c8837fd
Cache fonts
2022-10-25 15:47:55 -06:00
Jeremy Soller
c60aaaf9d2
Ensure orbclient example reshapes
2022-10-25 15:33:48 -06:00
Jeremy Soller
1a5b01575d
Record font mapping time
2022-10-25 14:52:43 -06:00
Jeremy Soller
66885686a0
Move fontdb source handling to font
2022-10-25 14:49:44 -06:00
Jeremy Soller
a3ccbd0481
Add spdx identifiers
2022-10-25 14:42:26 -06:00
Jeremy Soller
84f4381cdf
Add text attributes
2022-10-25 14:14:23 -06:00
Jeremy Soller
bc04887b35
Update docstring again
2022-10-25 13:15:52 -06:00
Jeremy Soller
8f9d9de87f
Update TextLayoutRun::rtl doc
2022-10-25 13:14:38 -06:00