@@ -13,19 +13,19 @@ internal sealed class CompositeGlyphLoader : GlyphLoader
1313
1414 public CompositeGlyphLoader ( IEnumerable < Composite > composites , Bounds bounds , ReadOnlyMemory < byte > instructions )
1515 {
16- this . composites = composites . ToArray ( ) ;
16+ this . composites = [ .. composites ] ;
1717 this . bounds = bounds ;
1818 this . instructions = instructions ;
1919 }
2020
2121 public override GlyphVector CreateGlyph ( GlyphTable table )
2222 {
23- List < ControlPoint > controlPoints = new ( ) ;
24- List < ushort > endPoints = new ( ) ;
23+ List < ControlPoint > controlPoints = [ ] ;
24+ List < ushort > endPoints = [ ] ;
2525 for ( int i = 0 ; i < this . composites . Length ; i ++ )
2626 {
2727 Composite composite = this . composites [ i ] ;
28- var clone = GlyphVector . DeepClone ( table . GetGlyph ( composite . GlyphIndex ) ) ;
28+ GlyphVector clone = GlyphVector . DeepClone ( table . GetGlyph ( composite . GlyphIndex ) ) ;
2929 GlyphVector . TransformInPlace ( ref clone , composite . Transformation ) ;
3030 ushort endPointOffset = ( ushort ) controlPoints . Count ;
3131
@@ -41,7 +41,7 @@ public override GlyphVector CreateGlyph(GlyphTable table)
4141
4242 public static CompositeGlyphLoader LoadCompositeGlyph ( BigEndianBinaryReader reader , in Bounds bounds )
4343 {
44- List < Composite > composites = new ( ) ;
44+ List < Composite > composites = [ ] ;
4545 CompositeGlyphFlags flags ;
4646 do
4747 {
@@ -76,7 +76,7 @@ public static CompositeGlyphLoader LoadCompositeGlyph(BigEndianBinaryReader read
7676 }
7777 while ( ( flags & CompositeGlyphFlags . MoreComponents ) != 0 ) ;
7878
79- byte [ ] instructions = Array . Empty < byte > ( ) ;
79+ byte [ ] instructions = [ ] ;
8080 if ( ( flags & CompositeGlyphFlags . WeHaveInstructions ) != 0 )
8181 {
8282 // Read the instructions if they exist.
0 commit comments