Commit graph

529 commits

Author SHA1 Message Date
John Nunley
831e025cb1
Upgrade missing glyphs to a warning
It is annoying to have to grep through DEBUG logs for this.
2023-07-21 18:04:00 -07:00
Jeremy Soller
9d2f7a443a
Merge pull request #152 from notgull/justify-font
Add Align::End for end-based alignment
2023-07-08 11:19:09 -06:00
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
John Nunley
aa1b37aede
Add Align::End for end-based alignment
For use cases that want to reverse the alignment of RTL
lines, this avoids needing to check the RTL status of every line
manually.

This is a breaking change.
2023-07-07 21:31:17 -07:00
Jeremy Soller
7d50d17369
0.9.0 2023-07-06 07:37:03 -06:00
Jeremy Soller
edd9eb8b23
Merge branch 'offsetting-and-scaling' 2023-07-06 06:47:34 -06:00
Jeremy Soller
85ac473056
Fix tests 2023-07-06 06:47:12 -06: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
0d9173c05b update rich_text example with set_rich_text 2023-06-27 21:56:17 +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
Jeremy Soller
e7f3e161b4
Merge pull request #145 from 0HyperCube/update-libcosmic-version
Update libcosmic version
2023-06-26 06:29:02 -06:00
Jeremy Soller
2c8d7c0bb9
Merge pull request #144 from 0HyperCube/light-syntax-highlighter
Add light syntax highligher to libcosmic example
2023-06-25 07:07:49 -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
Héctor Ramón Jiménez
c3cd24dc97
Truncate Y coordinate in LayoutGlyph::physical 2023-06-20 06:39:06 +02: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
2fbd65a64f
Compute ascent and descent only once in shape_skip 2023-06-16 02:39:54 +02:00
Héctor Ramón Jiménez
ffa08d2da1
Use rustybuzz in shape_fallback instead of swash 2023-06-16 02:38:00 +02: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
3640b5e1ef
Update rustybuzz to 0.8.0 2023-06-12 11:13:51 -06:00
Jeremy Soller
79275d15e8
Merge pull request #139 from StaffEngineer/cursor
allow setting cursor
2023-06-10 06:04:41 -06:00
Dima Rets
6dba04df08 allow setting cursor 2023-06-10 12:53:34 +01: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
Jeremy Soller
b6b03589b1
Merge pull request #127 from tigregalis/buffer-no-font-system
Allow creating a `Buffer` with no `FontSystem`
2023-06-09 07:00:30 -06:00
tigregalis
5ab509ebaa use alloc::vec instead of std::vec 2023-06-09 11:26:08 +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
tigregalis
e298259dd5 introduce BidiParagraphs iterator 2023-06-09 11:22:52 +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
Jeremy Soller
a93ec8adf8
Merge pull request #138 from StaffEngineer/allow-cursor
allow setting cursor color
2023-06-08 13:12:35 -06:00
Dima Rets
0eb08d218c allow setting cursor color 2023-06-08 20:04:56 +01:00
Jeremy Soller
9062cce140
Merge pull request #122 from hecrj/feature/shaping-switch
`Shaping` strategy selection
2023-06-08 12:47:04 -06:00
Jeremy Soller
bb176df59e
Merge pull request #128 from tigregalis/fontdb-0-14
bump `fontdb` to 0.14.1
2023-06-08 12:43:13 -06:00
Jeremy Soller
a8aa3b1122
Remove unnecessary cargo deny licenses and ignored vulnerabilities 2023-06-08 12:42:28 -06:00
Jeremy Soller
587bb5c98f
Remove syn from cargo deny skip, warn on multiple-versions 2023-06-08 12:40:55 -06:00
Jeremy Soller
39895c988a
Merge pull request #132 from trimental/monospaced-fallback
Fallback to monospaced font if Monospace family is not found
2023-06-08 12:38:17 -06:00
Jeremy Soller
ca48c86f2b
Merge pull request #131 from nicoburns/fix/non-wrapped-alignment
Fix alignment when using `Wrap::None`
2023-06-08 12:33:24 -06:00
Jeremy Soller
f0becfdb54
Fix comment typo 2023-06-08 12:32:34 -06:00
Jeremy Soller
b7f2687ada
Merge pull request #137 from bjorn3/no_ouroboros
Remove the dependency on ouroboros
2023-06-08 12:27:44 -06:00
bjorn3
95e36249d5 Remove the dependency on ouroboros
This reduces compilation time by removing a dependency on syn and other
dependencies of ouroboros_macros. In addition it saves a lot of unused
codegened methods.

On my laptop (2 core + HT) this reduces compilation time by ~20%. On a
many core system this doesn't help much though as the critical path path
consists of both ttf-parser -> rustybuzz and swash. Further gains will
likely need to be made by reducing compilation time for these crates.

Benchmark 1: cargo build
  Time (mean ± σ):     25.150 s ±  0.167 s    [User: 84.414 s, System: 7.335 s]
  Range (min … max):   24.909 s … 25.444 s    10 runs

Benchmark 1: cargo build
  Time (mean ± σ):     19.819 s ±  0.226 s    [User: 67.754 s, System: 5.592 s]
  Range (min … max):   19.492 s … 20.140 s    10 runs

The code is based on an expansion of the ouroboros macro, cleaned up to
remove all unused methods and inline most functions that are only called
once.
2023-06-08 18:00:42 +02:00
Lucas Timmins
e1e9fb5215 Fallback to monospaced font if Monospace family is not found 2023-05-20 02:05:52 +08:00
Nico Burns
8d37da51b9 Fix non-wrapped alignment 2023-05-19 02:45:35 +01:00
tigregalis
9c4fd35d8e bump fontdb to 0.14.1 2023-05-12 11:11:13 +08:00