@@ -82,7 +82,7 @@ public TrueTypeInterpreter(int maxStack, int maxStorage, int maxFunctions, int m
8282 this . twilight = new Zone ( maxTwilightPoints , isTwilight : true ) ;
8383 this . controlValueTable = [ ] ;
8484 this . baseControlValueTable = [ ] ;
85- this . contours = Array . Empty < ushort > ( ) ;
85+ this . contours = [ ] ;
8686 }
8787
8888 public void InitializeFunctionDefs ( byte [ ] instructions )
@@ -191,7 +191,7 @@ public bool TryHintGlyph(
191191
192192 // FreeType's interpreter treats the storage area and glyph-level CVT modifications as non-persistent.
193193 // Reset storage and restore the baseline CVT state for each glyph.
194- Array . Clear ( this . storage ) ;
194+ Array . Clear ( this . storage , 0 , this . storage . Length ) ;
195195
196196 if ( this . baseControlValueTable . Length > 0 )
197197 {
@@ -235,14 +235,13 @@ public bool TryHintGlyph(
235235 }
236236 catch ( Exception )
237237 {
238- // TODO: Is there a general Reset I can call?
239238 // The interpreter can fail for malformed instructions; in that case we skip hinting.
240239 Array . Clear ( this . points . TouchState , 0 , this . points . TouchState . Length ) ;
241240
242241 // Reset interpreter state so nothing leaks if the caller catches.
243242 this . stack . Clear ( ) ;
244243 this . callStackSize = 0 ;
245- this . contours = Array . Empty < ushort > ( ) ;
244+ this . contours = [ ] ;
246245 this . zp0 = this . zp1 = this . zp2 = this . points = default ;
247246
248247 this . state = this . cvtState ;
@@ -268,7 +267,7 @@ private void ResetTwilightZone()
268267 twOriginal [ i ] . Point = default ;
269268 }
270269
271- Array . Clear ( this . twilight . TouchState ) ;
270+ Array . Clear ( this . twilight . TouchState , 0 , this . twilight . TouchState . Length ) ;
272271 }
273272
274273 private void Execute ( StackInstructionStream stream , bool inFunction , bool allowFunctionDefs )
0 commit comments