Commit graph

3087 commits

Author SHA1 Message Date
Héctor Ramón Jiménez
7d4c63d411
Set Attrs::monospaced if Font::Monospace is selected 2023-02-24 13:36:03 +01:00
Héctor Ramón Jiménez
dd80772da9
Set a minimum height for Buffer of size * 1.2
This avoids text from misteriously disappearing, even if the user uses a
`height` that isn't enough to fit the text.
2023-02-24 13:36:03 +01:00
Héctor Ramón Jiménez
15d257a52a
Stop truncating the renderers in text::Pipeline
We avoid recreating buffers this way, and the amount of layers should
stay relatively low anyways.
2023-02-24 13:36:02 +01:00
Héctor Ramón Jiménez
f37b87fbab
Avoid allocating text_areas in text::Pipeline 2023-02-24 13:36:02 +01:00
Héctor Ramón Jiménez
6cf4a10906
Stop reusing SwashCache in text::Pipeline
`SwashCache` can't be easily trimmed and it's not really getting us
anything since `glyphon` already caches using a glyph atlas anyways.
2023-02-24 13:36:02 +01:00
Héctor Ramón Jiménez
32309f0140
Introduce Weight enum to font 2023-02-24 13:36:02 +01:00
Héctor Ramón Jiménez
eb3cd3a321
Fix overlay::Menu line height 2023-02-24 13:36:01 +01:00
Héctor Ramón Jiménez
a2ab9e9395
Use Pixels for Text::size 2023-02-24 13:34:59 +01:00
Héctor Ramón Jiménez
de7fc637cf
Fix test workflow 2023-02-24 13:31:20 +01:00
Héctor Ramón Jiménez
b4dd9b6d93
Update glyphon fork (sRGB support) 2023-02-24 13:31:19 +01:00
Héctor Ramón Jiménez
da4182099d
Disable std feature for twox-hash to fix Wasm build 2023-02-24 13:31:19 +01:00
Héctor Ramón Jiménez
17470bf7d3
Fix clippy lints 🎉 2023-02-24 13:31:19 +01:00
Héctor Ramón Jiménez
d2825360a7
Load Iced-Icons.ttf font in text::Pipeline::new 2023-02-24 13:29:12 +01:00
Héctor Ramón Jiménez
5a82fc654e
Use floating coordinates directly in text::Pipeline 2023-02-24 13:29:12 +01:00
Héctor Ramón Jiménez
238154af4a
Implement font::load command in iced_native 2023-02-24 13:29:11 +01:00
Héctor Ramón Jiménez
b29de28d1f
Overhaul Font type to allow font family selection 2023-02-24 13:28:24 +01:00
Héctor Ramón Jiménez
a7580e0696
Count layout_runs instead of using visible_lines in text::Pipeline::prepare 2023-02-24 13:22:58 +01:00
Héctor Ramón Jiménez
0a324f0aeb
Implement hit_test for text::Pipeline in iced_wgpu 2023-02-24 13:22:58 +01:00
Héctor Ramón Jiménez
c8e8b1a7ba
Use bounds directly for measure in text pipeline 2023-02-24 13:22:58 +01:00
Héctor Ramón Jiménez
6b70771146
Avoid unnecessary Vec allocation in text pipeline 2023-02-24 13:22:58 +01:00
Héctor Ramón Jiménez
02fc7e6e89
Trim text render_cache after rendering in iced_wgpu 2023-02-24 13:22:58 +01:00
Héctor Ramón Jiménez
1d0c44fb25
Implement basic text caching in iced_wgpu 2023-02-24 13:22:57 +01:00
Héctor Ramón Jiménez
032e860f13
Fix PickList line height 2023-02-24 13:22:56 +01:00
Héctor Ramón Jiménez
bb27982009
Convert sRGB to linear RGB for text in iced_wgpu 2023-02-24 13:20:55 +01:00
Héctor Ramón Jiménez
c68edb3278
Fix TextInput line height 2023-02-24 13:20:54 +01:00
Héctor Ramón Jiménez
98a16fd670
Implement proper text alignment support in iced_wgpu 2023-02-24 13:19:49 +01:00
Héctor Ramón Jiménez
ba258f8fbc
Implement support for multiple text layers in iced_wgpu 2023-02-24 13:19:49 +01:00
Héctor Ramón Jiménez
baf51a8fcf
Draft glyphon implementation of text pipeline for iced_wgpu 2023-02-24 13:19:48 +01:00
Héctor Ramón Jiménez
b9a9576207
Remove iced_glow, glyph-brush, and wgpu_glyph dependencies 2023-02-24 13:17:58 +01:00
Héctor Ramón
573d27eb52
Merge pull request #1731 from tarkah/fix/debug-bytes
Remove logging large bytes arrays
2023-02-23 19:38:43 +01:00
Cory Forsstrom
07a7681dba
Remove logging large bytes arrays 2023-02-23 09:31:48 -08:00
Héctor Ramón
666f3cd143
Merge pull request #1723 from iced-rs/subscription-run
Change `subscription::run` to take a function pointer
2023-02-21 21:18:01 +01:00
Héctor Ramón Jiménez
1fb413fd80
Change subscription::run to take a function pointer
... and rename the old `run` to `run_with_id`.
2023-02-21 20:56:10 +01:00
Héctor Ramón
8c83d40e11
Merge pull request #1721 from casperstorm/feat/no-bleed-slider
Sliders no longer bleed over rail
2023-02-20 14:54:54 +01:00
Casper Storm
96c0bd65df
Sliders no longer bleed over rail 2023-02-20 12:24:31 +01:00
Héctor Ramón Jiménez
2b8742937f
Bump version of iced_native 🎉 2023-02-18 22:16:44 +01:00
Héctor Ramón
1b79df4433
Merge pull request #1717 from iced-rs/remove-clone-image-bytes
Remove `Clone` bound for `Bytes::new` in `image`
2023-02-18 22:15:11 +01:00
Héctor Ramón
f0decca8bc
Merge pull request #1716 from iced-rs/fix/draw-base-cursor
Fix base cursor position during `UserInterface::draw` when overlay is present
2023-02-18 22:05:31 +01:00
Héctor Ramón Jiménez
bf061a0d62
Remove Clone bound for Bytes::new in image 2023-02-18 21:55:49 +01:00
Héctor Ramón Jiménez
3d8f1ad238
Fix base cursor position during UserInterface::draw when overlay is present 2023-02-18 21:52:08 +01:00
Héctor Ramón Jiménez
0d1656937b
Bump versions 🎉 2023-02-18 12:04:40 +01:00
Héctor Ramón
c6218cbc55
Merge pull request #1714 from iced-rs/fix/overlay-menu-height
Fix height of `overlay::Menu`
2023-02-18 09:00:44 +01:00
Héctor Ramón Jiménez
ffcd4f1bec
Fix height of overlay::Menu 2023-02-18 08:45:54 +01:00
Héctor Ramón
7dc1fb488d
Merge pull request #1711 from iced-rs/feature/generic-pixel-units
Generic pixel units
2023-02-17 16:53:02 +01:00
Héctor Ramón Jiménez
fd14086933
Use Pixels for padding in image::Viewer 2023-02-17 16:24:37 +01:00
Héctor Ramón Jiménez
a467a037c3
Use Pixels for spacing 2023-02-17 16:23:29 +01:00
Héctor Ramón Jiménez
fd3a141024
Use f32 for Icon::size in checkbox 2023-02-17 16:18:27 +01:00
Héctor Ramón Jiménez
3320ac1126
Use f32 for Padding 2023-02-17 16:09:49 +01:00
Héctor Ramón Jiménez
0872d078e2
Use Pixels for size methods 2023-02-17 15:56:19 +01:00
Héctor Ramón Jiménez
67e3da5669
Use Pixels for Slider::height and VerticalSlider::width 2023-02-17 15:55:12 +01:00