From 28470b6fdbc333ede416a3212df4c5654bf4e446 Mon Sep 17 00:00:00 2001 From: Billy Messenger <60663878+BillyDM@users.noreply.github.com> Date: Sat, 24 Aug 2024 11:23:13 -0500 Subject: [PATCH] rename CustomGlyphDesc to CustomGlyph --- examples/custom-glyphs.rs | 10 +++++----- src/lib.rs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/custom-glyphs.rs b/examples/custom-glyphs.rs index 83b2b71..7428cc9 100644 --- a/examples/custom-glyphs.rs +++ b/examples/custom-glyphs.rs @@ -1,5 +1,5 @@ use glyphon::{ - Attrs, Buffer, Cache, Color, ContentType, CustomGlyphDesc, CustomGlyphInput, CustomGlyphOutput, + Attrs, Buffer, Cache, Color, ContentType, CustomGlyph, CustomGlyphInput, CustomGlyphOutput, Family, FontSystem, Metrics, Resolution, Shaping, SwashCache, TextArea, TextAtlas, TextBounds, TextRenderer, Viewport, }; @@ -252,7 +252,7 @@ impl winit::application::ApplicationHandler for Application { }, default_color: Color::rgb(255, 255, 255), custom_glyphs: &[ - CustomGlyphDesc { + CustomGlyph { id: 0, left: 300.0, top: 5.0, @@ -260,7 +260,7 @@ impl winit::application::ApplicationHandler for Application { color: Some(Color::rgb(200, 200, 255)), metadata: 0, }, - CustomGlyphDesc { + CustomGlyph { id: 1, left: 400.0, top: 5.0, @@ -268,7 +268,7 @@ impl winit::application::ApplicationHandler for Application { color: None, metadata: 0, }, - CustomGlyphDesc { + CustomGlyph { id: 0, left: 300.0, top: 130.0, @@ -276,7 +276,7 @@ impl winit::application::ApplicationHandler for Application { color: Some(Color::rgb(200, 255, 200)), metadata: 0, }, - CustomGlyphDesc { + CustomGlyph { id: 1, left: 400.0, top: 130.0, diff --git a/src/lib.rs b/src/lib.rs index 489baa5..941f12f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -118,12 +118,12 @@ pub struct TextArea<'a> { pub default_color: Color, /// Additional custom glyphs to render - pub custom_glyphs: &'a [CustomGlyphDesc], + pub custom_glyphs: &'a [CustomGlyph], } /// A custom glyph to render #[derive(Default, Debug, Clone, Copy, PartialEq)] -pub struct CustomGlyphDesc { +pub struct CustomGlyph { /// The unique identifier for this glyph pub id: CustomGlyphID, /// The position of the left edge of the glyph