John Nunley
99d3d71a0f
Add benchmarks to accurately gauge improvements
...
Signed-off-by: John Nunley <dev@notgull.net>
2023-08-16 14:09:55 -07:00
John Nunley
64e469718b
Use a scratch buffer to reduce allocations
...
This commit adds a new ShapeBuffer type, which contains some buffers tha
are commonly re-created during the shaping process. New APIs are added
that take this structure, and old APIs are turned into wrappers around
the new API.
The goal is to reduce the number of per-layout allocations that happen
in a typical layout call.
2023-08-16 14:09:54 -07:00
Jeremy Soller
d7214b5417
Merge pull request #171 from genusistimelord/main
...
Add feature to allow fontdb to get fontconfig
2023-08-16 13:56:21 -06:00
genusistimelord
bd4b6cea3b
Add feature to allow fontdb to get fontconfig features for systems that dont auto have this support
2023-08-16 15:14:55 -04:00
Jeremy Soller
618896f1a5
Merge pull request #168 from grovesNL/nostd-hash
...
Move hashbrown behind `no_std` feature
2023-08-14 06:53:04 -06:00
grovesNL
3905312f5f
Add no_std to CI and add std per feature
2023-08-09 11:44:25 -02:30
grovesNL
c4d107563a
Require either std or no_std to be specified
2023-08-09 11:44:20 -02:30
grovesNL
14d0ceb81b
Move hashbrown behind no_std feature
2023-08-09 10:19:24 -02:30
Jeremy Soller
0476d7cdbb
Merge pull request #160 from forkgull/changable-fallback
...
Unify the no_std and std impls of FontSystem
2023-08-06 16:03:50 -06:00
Jeremy Soller
381b9ed87b
Merge pull request #158 from forkgull/comp-color
...
Add easy conversions for tuples/arrays for Color
2023-08-04 07:36:27 -06:00
Jeremy Soller
a74b0dedbf
Merge pull request #165 from Imberflur/patch-1
...
Small fix for BufferLine::set_align docs
2023-08-02 09:13:03 -06:00
Imbris
9d2d2dd7a6
Remove shape reset from BufferLine::set_align docs since that isn't performed
2023-08-02 00:15:46 -04:00
Jeremy Soller
bbebd312d6
Merge pull request #162 from forkgull/clonable-attrs
...
Derive Clone for AttrsList
2023-07-26 07:49:06 -06:00
John Nunley
84b6a4e086
Derive Clone for AttrsList
2023-07-24 22:13:34 -07:00
John Nunley
2509fc21e2
Fix a warning
2023-07-24 18:09:31 -07:00
John Nunley
7b289c945b
Fix no_std build
2023-07-24 17:57:46 -07:00
John Nunley
faa1ceafda
Unify the no_std and std impls of FontSystem
2023-07-24 08:51:19 -07:00
Jeremy Soller
bd58940c42
Merge pull request #153 from forkgull/more-debug
...
Add more Debug implementations
2023-07-24 09:45:58 -06:00
Jeremy Soller
78b24e09b3
Merge pull request #159 from forkgull/warn-on-error
...
Upgrade missing glyphs during shaping to a warning
2023-07-24 06:58:16 -06:00
John Nunley
e65bcbc4d3
Change to a feature
2023-07-22 08:24:28 -07:00
John Nunley
13146f65cc
Add easy conversions for tuples/arrays for Color
...
This makes it somewhat easier to convert Color to other color types,
such as piet::Color.
2023-07-21 18:41:49 -07:00
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
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