Commit graph

305 commits

Author SHA1 Message Date
Hojjat
fdd3ee83a5 Fix selection highlighting when paragraph is justified 2023-02-24 13:00:25 -07:00
Jeremy Soller
f4b14f1210
Merge pull request #78 from hojjatabdollahi/main
Alignment and Justification
2023-02-24 10:54:09 -07:00
Hojjat
260748afe7 Make sure the lines exists before applying the alignment 2023-02-24 10:07:23 -07:00
Hojjat
fff8389bbf Allow set_align to clear the alignment by setting it to None 2023-02-24 08:39:24 -07:00
Jeremy Soller
5fc5d2bbdc
Merge pull request #82 from grovesNL/y-offset
Exclude line y offset in height comparison
2023-02-24 08:21:31 -07: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
Hojjat
45f6474a74 Apply alignment to selection in editor-libcosmic 2023-02-23 18:25:41 -07:00
Hojjat
d313713f44 Removed alignment from Buffer, added alignment per Bufferline to editor-libcosmic 2023-02-23 14:23:56 -07:00
Hojjat
4e7e1cc79e Alignment is based on text direction by default now 2023-02-23 13:45:34 -07:00
Hojjat
27d52a12e9 Fix the trailing space 2023-02-23 13:26:21 -07:00
Hojjat
2442422762 Add justification buttons to editor-libcosmic 2023-02-22 21:59:03 -07:00
Hojjat
59e89bdbaa Justified 2023-02-22 20:48:57 -07:00
Hojjat
00ff5b72f3 Align Left, Right, and Center works 2023-02-22 18:31:49 -07:00
Jeremy Soller
9a4d067f9d
Merge pull request #77 from notgull/early-div-zero
bugfix: Panic if a line height of zero is passed into Buffer
2023-02-19 14:34:38 -07:00
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
Jeremy Soller
cb4d544688
Merge pull request #71 from hecrj/new_with_fonts
Implement `FontSystem::new_with_fonts` helper
2023-02-09 07:06:27 -07:00
Jeremy Soller
0d7308b775
0.7.0 2023-02-07 12:28:48 -07:00
Héctor Ramón Jiménez
655de0af5f
Implement FontSystem::new_with_fonts helper
This helper is useful to initialize a `FontSystem` with some embedded
fonts, for instance.
2023-02-04 11:30:41 +01:00
Jeremy Soller
9b48d99666
Merge pull request #68 from hecrj/fix/emoji-fallback-order
Fix `Noto Color Emoji` font fallback order for Unix
2023-02-03 20:17:44 -07:00
Héctor Ramón Jiménez
66288ab2da
Fix Noto Color Emoji font fallback order for Unix 2023-01-31 06:08:07 +01:00
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