11use std:: error:: Error ;
22use wgpu:: CompositeAlphaMode ;
3- use wgpu_glyph:: { ab_glyph , GlyphBrushBuilder , Region , Section , Text } ;
3+ use wgpu_glyph:: { GlyphBrushBuilder , Region , Section , Text , ab_glyph } ;
44
55fn main ( ) -> Result < ( ) , Box < dyn Error > > {
66 env_logger:: init ( ) ;
@@ -143,9 +143,11 @@ fn main() -> Result<(), Box<dyn Error>> {
143143 glyph_brush. queue ( Section {
144144 screen_position : ( 30.0 , 30.0 ) ,
145145 bounds : ( size. width as f32 , size. height as f32 ) ,
146- text : vec ! [ Text :: new( "Hello wgpu_glyph!" )
147- . with_color( [ 0.0 , 0.0 , 0.0 , 1.0 ] )
148- . with_scale( 40.0 ) ] ,
146+ text : vec ! [
147+ Text :: new( "Hello wgpu_glyph!" )
148+ . with_color( [ 0.0 , 0.0 , 0.0 , 1.0 ] )
149+ . with_scale( 40.0 ) ,
150+ ] ,
149151 ..Section :: default ( )
150152 } ) ;
151153
@@ -164,9 +166,11 @@ fn main() -> Result<(), Box<dyn Error>> {
164166 glyph_brush. queue ( Section {
165167 screen_position : ( 30.0 , 90.0 ) ,
166168 bounds : ( size. width as f32 , size. height as f32 ) ,
167- text : vec ! [ Text :: new( "Hello wgpu_glyph!" )
168- . with_color( [ 1.0 , 1.0 , 1.0 , 1.0 ] )
169- . with_scale( 40.0 ) ] ,
169+ text : vec ! [
170+ Text :: new( "Hello wgpu_glyph!" )
171+ . with_color( [ 1.0 , 1.0 , 1.0 , 1.0 ] )
172+ . with_scale( 40.0 ) ,
173+ ] ,
170174 ..Section :: default ( )
171175 } ) ;
172176
0 commit comments