@@ -238,29 +238,13 @@ class CSSBasedConfiguration extends Disposable {
238
238
const wsmiddotWidth = this . createRequest ( String . fromCharCode ( 0x2E31 ) , CharWidthRequestType . Regular , all , null ) ;
239
239
240
240
// monospace test: some characters
241
- this . createRequest ( '|' , CharWidthRequestType . Regular , all , monospace ) ;
242
- this . createRequest ( '/' , CharWidthRequestType . Regular , all , monospace ) ;
243
- this . createRequest ( '-' , CharWidthRequestType . Regular , all , monospace ) ;
244
- this . createRequest ( '_' , CharWidthRequestType . Regular , all , monospace ) ;
245
- this . createRequest ( 'i' , CharWidthRequestType . Regular , all , monospace ) ;
246
- this . createRequest ( 'l' , CharWidthRequestType . Regular , all , monospace ) ;
247
- this . createRequest ( 'm' , CharWidthRequestType . Regular , all , monospace ) ;
248
-
249
- // monospace italic test
250
- this . createRequest ( '|' , CharWidthRequestType . Italic , all , monospace ) ;
251
- this . createRequest ( '_' , CharWidthRequestType . Italic , all , monospace ) ;
252
- this . createRequest ( 'i' , CharWidthRequestType . Italic , all , monospace ) ;
253
- this . createRequest ( 'l' , CharWidthRequestType . Italic , all , monospace ) ;
254
- this . createRequest ( 'm' , CharWidthRequestType . Italic , all , monospace ) ;
255
- this . createRequest ( 'n' , CharWidthRequestType . Italic , all , monospace ) ;
256
-
257
- // monospace bold test
258
- this . createRequest ( '|' , CharWidthRequestType . Bold , all , monospace ) ;
259
- this . createRequest ( '_' , CharWidthRequestType . Bold , all , monospace ) ;
260
- this . createRequest ( 'i' , CharWidthRequestType . Bold , all , monospace ) ;
261
- this . createRequest ( 'l' , CharWidthRequestType . Bold , all , monospace ) ;
262
- this . createRequest ( 'm' , CharWidthRequestType . Bold , all , monospace ) ;
263
- this . createRequest ( 'n' , CharWidthRequestType . Bold , all , monospace ) ;
241
+ const monospaceTestChars = '|/-_ilm%' ;
242
+ for ( let i = 0 , len = monospaceTestChars . length ; i < len ; i ++ ) {
243
+ this . createRequest ( monospaceTestChars . charAt ( i ) , CharWidthRequestType . Regular , all , monospace ) ;
244
+ this . createRequest ( monospaceTestChars . charAt ( i ) , CharWidthRequestType . Italic , all , monospace ) ;
245
+ this . createRequest ( monospaceTestChars . charAt ( i ) , CharWidthRequestType . Bold , all , monospace ) ;
246
+
247
+ }
264
248
265
249
readCharWidths ( bareFontInfo , all ) ;
266
250
0 commit comments