diff --git a/Cargo.toml b/Cargo.toml index e210e48..216f294 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cryoglyph" description = "Fast, simple 2D text rendering for wgpu" version = "0.1.0" -edition = "2021" +edition = "2024" repository = "https://github.com/iced-rs/cryoglyph" license = "MIT OR Apache-2.0 OR Zlib" diff --git a/benches/prepare.rs b/benches/prepare.rs index ce30b1e..0e5669d 100644 --- a/benches/prepare.rs +++ b/benches/prepare.rs @@ -1,5 +1,5 @@ use cosmic_text::{Attrs, Buffer, Color, Family, FontSystem, Metrics, Shaping, SwashCache}; -use criterion::{criterion_group, criterion_main, Criterion}; +use criterion::{Criterion, criterion_group, criterion_main}; use cryoglyph::{ Cache, ColorMode, Resolution, TextArea, TextAtlas, TextBounds, TextRenderer, Viewport, Weight, }; diff --git a/src/lib.rs b/src/lib.rs index 3b31120..9360b30 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -21,11 +21,11 @@ use text_render::ContentType; // Re-export all top-level types from `cosmic-text` for convenience. #[doc(no_inline)] pub use cosmic_text::{ - self, fontdb, Action, Affinity, Attrs, AttrsList, AttrsOwned, Buffer, BufferLine, CacheKey, - Color, Command, Cursor, Edit, Editor, Family, FamilyOwned, Font, FontSystem, LayoutCursor, + self, Action, Affinity, Attrs, AttrsList, AttrsOwned, Buffer, BufferLine, CacheKey, Color, + Command, Cursor, Edit, Editor, Family, FamilyOwned, Font, FontSystem, LayoutCursor, LayoutGlyph, LayoutLine, LayoutRun, LayoutRunIter, Metrics, ShapeGlyph, ShapeLine, ShapeSpan, ShapeWord, Shaping, Stretch, Style, SubpixelBin, SwashCache, SwashContent, SwashImage, Weight, - Wrap, + Wrap, fontdb, }; use etagere::AllocId; diff --git a/src/text_atlas.rs b/src/text_atlas.rs index 8313672..54a0536 100644 --- a/src/text_atlas.rs +++ b/src/text_atlas.rs @@ -1,7 +1,7 @@ use crate::{ - text_render::ContentType, Cache, CacheKey, FontSystem, GlyphDetails, GpuCacheStatus, SwashCache, + Cache, CacheKey, FontSystem, GlyphDetails, GpuCacheStatus, SwashCache, text_render::ContentType, }; -use etagere::{size2, Allocation, BucketedAtlasAllocator}; +use etagere::{Allocation, BucketedAtlasAllocator, size2}; use lru::LruCache; use rustc_hash::FxHasher; use std::{collections::HashSet, hash::BuildHasherDefault}; diff --git a/src/text_render.rs b/src/text_render.rs index ff6dc60..8b73fe7 100644 --- a/src/text_render.rs +++ b/src/text_render.rs @@ -5,9 +5,9 @@ use crate::{ use std::{num::NonZeroU64, slice}; use wgpu::util::StagingBelt; use wgpu::{ - Buffer, BufferDescriptor, BufferUsages, CommandEncoder, DepthStencilState, Device, Extent3d, - MultisampleState, Origin3d, Queue, RenderPass, RenderPipeline, TexelCopyBufferLayout, - TexelCopyTextureInfo, TextureAspect, COPY_BUFFER_ALIGNMENT, + Buffer, BufferDescriptor, BufferUsages, COPY_BUFFER_ALIGNMENT, CommandEncoder, + DepthStencilState, Device, Extent3d, MultisampleState, Origin3d, Queue, RenderPass, + RenderPipeline, TexelCopyBufferLayout, TexelCopyTextureInfo, TextureAspect, }; /// A text renderer that uses cached glyphs to render text into an existing render pass.