diff options
| author | 2023-06-01 03:10:02 +0200 | |
|---|---|---|
| committer | 2023-06-01 03:10:02 +0200 | |
| commit | b5fc0f4a3aa45d33d81d5799396f0b0770c4dff3 (patch) | |
| tree | b5debf16402c38b2048613c6902f78a05a6686f9 | |
| parent | c528f2129e5ce3b30e313f731588082c49beb30b (diff) | |
| download | iced-b5fc0f4a3aa45d33d81d5799396f0b0770c4dff3.tar.gz iced-b5fc0f4a3aa45d33d81d5799396f0b0770c4dff3.tar.bz2 iced-b5fc0f4a3aa45d33d81d5799396f0b0770c4dff3.zip  | |
Use consistent color strategy in `glyphon`
| -rw-r--r-- | wgpu/Cargo.toml | 2 | ||||
| -rw-r--r-- | wgpu/src/text.rs | 11 | 
2 files changed, 11 insertions, 2 deletions
diff --git a/wgpu/Cargo.toml b/wgpu/Cargo.toml index badd165b..7e50dff2 100644 --- a/wgpu/Cargo.toml +++ b/wgpu/Cargo.toml @@ -45,7 +45,7 @@ path = "../graphics"  [dependencies.glyphon]  version = "0.2"  git = "https://github.com/hecrj/glyphon.git" -rev = "cf7fe9df00499b868a6a94fa5fdb0a4ca368c9f9" +rev = "26f92369da3704988e3e27f0b35e705c6b2de203"  [dependencies.glam]  version = "0.24" diff --git a/wgpu/src/text.rs b/wgpu/src/text.rs index a12bc9f7..0d88865c 100644 --- a/wgpu/src/text.rs +++ b/wgpu/src/text.rs @@ -36,7 +36,16 @@ impl Pipeline {                  .into_iter(),              )),              renderers: Vec::new(), -            atlas: glyphon::TextAtlas::new(device, queue, format), +            atlas: glyphon::TextAtlas::new( +                device, +                queue, +                format, +                if color::GAMMA_CORRECTION { +                    glyphon::ColorMode::Accurate +                } else { +                    glyphon::ColorMode::Web +                }, +            ),              prepare_layer: 0,              measurement_cache: RefCell::new(Cache::new()),              render_cache: Cache::new(),  | 
