summaryrefslogtreecommitdiffstats
path: root/tiny_skia/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-01-16 02:11:48 +0100
committerLibravatar GitHub <noreply@github.com>2024-01-16 02:11:48 +0100
commitc4ba657de86d7606587dad5124f435141258f570 (patch)
treed7a105c8173218c9a279ecd96766c536dbd5f940 /tiny_skia/src
parent50c310fd9f692eafb2350827636ffbd6d7b6c9b9 (diff)
parent73e7cf16e315cd179bf416e9051a562f7a8b648a (diff)
downloadiced-c4ba657de86d7606587dad5124f435141258f570.tar.gz
iced-c4ba657de86d7606587dad5124f435141258f570.tar.bz2
iced-c4ba657de86d7606587dad5124f435141258f570.zip
Merge pull request #2203 from iced-rs/update-glyphon
Update `glyphon` to `0.4`
Diffstat (limited to 'tiny_skia/src')
-rw-r--r--tiny_skia/src/text.rs14
1 files changed, 1 insertions, 13 deletions
diff --git a/tiny_skia/src/text.rs b/tiny_skia/src/text.rs
index a5a0a1b6..9413e311 100644
--- a/tiny_skia/src/text.rs
+++ b/tiny_skia/src/text.rs
@@ -1,7 +1,6 @@
use crate::core::alignment;
use crate::core::text::{LineHeight, Shaping};
use crate::core::{Color, Font, Pixels, Point, Rectangle, Size};
-use crate::graphics::color;
use crate::graphics::text::cache::{self, Cache};
use crate::graphics::text::editor;
use crate::graphics::text::font_system;
@@ -244,18 +243,7 @@ fn draw(
fn from_color(color: cosmic_text::Color) -> Color {
let [r, g, b, a] = color.as_rgba();
- if color::GAMMA_CORRECTION {
- // `cosmic_text::Color` is linear RGB in this case, so we
- // need to convert back to sRGB
- Color::from_linear_rgba(
- r as f32 / 255.0,
- g as f32 / 255.0,
- b as f32 / 255.0,
- a as f32 / 255.0,
- )
- } else {
- Color::from_rgba8(r, g, b, a as f32 / 255.0)
- }
+ Color::from_rgba8(r, g, b, a as f32 / 255.0)
}
#[derive(Debug, Clone, Default)]