Skip to content

Commit

Permalink
rename CustomGlyphDesc to CustomGlyph
Browse files Browse the repository at this point in the history
  • Loading branch information
BillyDM committed Aug 24, 2024
1 parent e99eda2 commit 28470b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions examples/custom-glyphs.rs
Original file line number Diff line number Diff line change
@@ -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,
};
Expand Down Expand Up @@ -252,31 +252,31 @@ 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,
size: 64.0,
color: Some(Color::rgb(200, 200, 255)),
metadata: 0,
},
CustomGlyphDesc {
CustomGlyph {
id: 1,
left: 400.0,
top: 5.0,
size: 64.0,
color: None,
metadata: 0,
},
CustomGlyphDesc {
CustomGlyph {
id: 0,
left: 300.0,
top: 130.0,
size: 64.0,
color: Some(Color::rgb(200, 255, 200)),
metadata: 0,
},
CustomGlyphDesc {
CustomGlyph {
id: 1,
left: 400.0,
top: 130.0,
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 28470b6

Please sign in to comment.