]> git.nega.tv - josh/narcissus/commitdiff
narcissus-font: Add `as_u32` to `TouchedGlyphInstance`
authorJosh Simmons <josh@nega.tv>
Thu, 22 Aug 2024 17:21:06 +0000 (19:21 +0200)
committerJosh Simmons <josh@nega.tv>
Thu, 22 Aug 2024 17:21:06 +0000 (19:21 +0200)
engine/narcissus-font/src/cache.rs

index e96b60d01c8633472f03bf9f2f5d28ced9a83712..7b62ba6dc91c0fd2080e40b942d75d36a3322f8c 100644 (file)
@@ -19,6 +19,13 @@ struct GlyphKey<Family> {
 #[repr(transparent)]
 pub struct TouchedGlyphIndex(u32);
 
+impl TouchedGlyphIndex {
+    #[must_use]
+    pub fn as_u32(self) -> u32 {
+        self.0
+    }
+}
+
 /// Holds data required to draw a glyph from the glyph atlas.
 #[derive(Clone, Copy, Default)]
 #[repr(C)]