Commit graph

61 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
0e4a392731
Introduce text::Alignment with Justified support 2025-03-11 02:30:50 +01:00
Héctor Ramón Jiménez
179a34d37b
Fix horizontal text alignment 2025-03-11 00:43:51 +01:00
Héctor Ramón
616689ca54
Update cosmic-text and resvg (#2416)
* Update `cosmic-text`, `glyphon`, and `resvg`

* Fix slow font fallback with `Shaping::Basic` in `cosmic-text`

* Update `cosmic-text` and `resvg`

* Update `cosmic-text`

* Fix `SelectAll` action in `editor`

* Fix some panics in `graphics::text::editor`

* Remove empty `if` statement in `tiny_skia::vector`

* Update `cosmic-text`, `glyphon`, and `rustc-hash`
2024-07-17 13:00:00 +02:00
Héctor Ramón Jiménez
6ad5bb3597
Port iced_tiny_skia to new layering architecture 2024-04-09 22:25:16 +02:00
Héctor Ramón Jiménez
5cd98f069d
Use built-in [lints] table in Cargo.toml 2024-04-07 12:42:12 +02:00
Daniel Yoon
7a572655c1
Fix text transparency in iced_tiny_skia 2024-02-15 03:10:15 +01:00
Mohammad AlSaleh
5bd93181f3
tiny_skia: Add a capacity limit to GlyphCache
* Trim the cache if `recently_used` size reaches the limit, even if a
   trim interval hasn't passed.
 * Shrink `entries` and `recently_used` to the limit when trimming.

Signed-off-by: Mohammad AlSaleh <CE.Mohammad.AlSaleh@gmail.com>
2024-02-07 14:27:35 +01:00
Héctor Ramón Jiménez
f4d6648601
Introduce with_transformation to Renderer trait 2024-02-02 02:24:45 +01:00
Héctor Ramón Jiménez
d948ca6f09
Update glyphon to 0.4
`Color` is now always in the sRGB color space.
2024-01-15 23:49:20 +01:00
Héctor Ramón Jiménez
603832e66c
Introduce RawText to Primitive in iced_graphics
This should allow users to directly render a
`cosmic_text::Buffer`.
2023-12-05 02:19:17 +01:00
Héctor Ramón Jiménez
be340a8cd8
Fix gamma correction for colored glyphs in iced_wgpu 2023-09-19 23:00:20 +02:00
Héctor Ramón Jiménez
9af0a27e67
Draw colored glyphs in iced_tiny_skia 2023-09-19 22:28:28 +02:00
Héctor Ramón Jiménez
c7d02e24e6
Remove Editor::min_bounds and use bounds instead 2023-09-14 18:57:09 +02:00
Héctor Ramón Jiménez
6448429103
Draft Editor API and TextEditor widget 2023-09-12 14:51:00 +02:00
Héctor Ramón Jiménez
346af3f8b0
Make FontSystem global and simplify Paragraph API 2023-09-11 02:47:24 +02:00
Héctor Ramón Jiménez
b8e5693a30
Merge branch 'master' into explicit-text-caching 2023-09-10 00:34:21 +02:00
Héctor Ramón Jiménez
f60884f6f8
Deny broken_intradoc_links and verify documentation in CI 2023-09-09 20:58:45 +02:00
Héctor Ramón Jiménez
3450987355
Invalidate existing paragraphs when new fonts are loaded 2023-09-09 11:21:32 +02:00
Josh Megnauth
cee0ed6469
Use the correct text size and height in tiny_skia 2023-09-05 20:45:27 -04:00
Josh Megnauth
bdf18554fe
Check LineHeight > 0.0 before allocating text 2023-09-04 23:47:44 -04:00
Josh Megnauth
20681b4777
Ensure LineHeight is always > 0.0 for tiny skia. 2023-09-04 21:03:16 -04:00
Héctor Ramón Jiménez
1a1da6a1f0
Remove unnecessary mutable reference in iced_tiny_skia 2023-09-03 08:11:36 +02:00
Héctor Ramón Jiménez
8129e2c208
Implement draw_paragraph in iced_tiny_skia 2023-09-03 08:08:27 +02:00
Héctor Ramón Jiménez
89acf0217e
Use min_bounds for cached text 2023-08-30 05:06:08 +02:00
Héctor Ramón Jiménez
ed3454301e
Implement explicit text caching in the widget state tree 2023-08-30 04:31:21 +02:00
lufte
e86363837d Make the style attribute available on Font 2023-08-18 18:46:22 -03:00
Héctor Ramón Jiménez
9f73ee3206
Fix import consistency for bytemuck 2023-07-12 09:03:24 +02:00
Alec Deason
af386fd0a3
Upgrade resvg to 0.34 and tiny_skia to 0.10 2023-07-12 08:59:07 +02:00
Héctor Ramón Jiménez
00859c25f5
Retain text measurements as long as original entries 2023-06-28 01:27:09 +02:00
Héctor Ramón Jiménez
975eebfc62
Retain measurements for text entries even if not directly used 2023-06-28 00:51:40 +02:00
Héctor Ramón Jiménez
c8d79a5cd9
Fix needless borrow in iced_wgpu and iced_tiny_skia 2023-06-28 00:45:41 +02:00
Héctor Ramón Jiménez
73dca5e323
Reuse entries in text::Cache in iced_tiny_skia 2023-06-28 00:44:23 +02:00
Héctor Ramón Jiménez
78ad365db2
Reuse entries in text::Cache in iced_wgpu 2023-06-28 00:35:37 +02:00
Héctor Ramón
ef18ecf4ef
Merge pull request #1921 from iced-rs/subpixel-glyph-positioning
Subpixel glyph positioning and layout linearity
2023-06-26 19:17:34 +02:00
Cory Forsstrom
8152513bf8
Provide access to font from each crate 2023-06-22 20:18:38 -07:00
Héctor Ramón Jiménez
ef87ff1e8a
Clear text caches after a font is loaded 2023-06-21 21:47:29 +02:00
Héctor Ramón Jiménez
5bc7cbf5bc
Use subpixel glyph positioning and layout linearity
... for offsetting and scaling text
2023-06-20 06:50:36 +02:00
Héctor Ramón Jiménez
c6d9221ee4
Round paragraph position until we implement subpixel glyph positioning 2023-05-08 16:20:05 +02:00
Héctor Ramón Jiménez
9499a8f9e6
Support configurable LineHeight in text widgets 2023-05-04 18:39:31 +02:00
Héctor Ramón Jiménez
edf3432bf5
Update glyphon and cosmic-text 2023-05-02 01:02:33 +02:00
Héctor Ramón Jiménez
4bd290afe7
Introduce text::Shaping enum and replace magic boolean 2023-05-02 01:02:32 +02:00
Héctor Ramón Jiménez
33b5a90019
Make basic text shaping the default shaping strategy 2023-05-02 01:02:13 +02:00
Héctor Ramón Jiménez
9c63eb7df5
Update tiny-skia and resvg 2023-04-26 16:46:27 +02:00
Héctor Ramón Jiménez
3ee367355d
Merge branch 'advanced-text' into incremental-rendering 2023-04-08 04:47:54 +02:00
Héctor Ramón Jiménez
c0431aedd3
Update wgpu and cosmic-text 2023-04-08 04:47:05 +02:00
Héctor Ramón Jiménez
f8cd1faa28
Group damage regions by area increase 2023-04-05 05:40:44 +02:00
Héctor Ramón Jiménez
0b459c8e24
Introduce font::Stretch 2023-03-30 02:01:20 +02:00
Héctor Ramón Jiménez
707de9d788
Introduce support for Font attributes 2023-03-30 00:56:00 +02:00
Héctor Ramón Jiménez
5f9e7f6cb9
Update cosmic-text to latest 🎉 2023-03-19 14:52:30 +01:00
Héctor Ramón Jiménez
ea50ec8df1
Trim text Buffer cache every frame in iced_wgpu and iced_tiny_skia 2023-03-17 19:58:42 +01:00