@@ -43,7 +43,7 @@ function lookupCoverage(glyphIndex, coverage) {
4343 case 1 :
4444 return coverage . glyphs . indexOf ( glyphIndex ) ;
4545
46- case 2 :
46+ case 2 : {
4747 let ranges = coverage . ranges ;
4848 for ( let i = 0 ; i < ranges . length ; i ++ ) {
4949 const range = ranges [ i ] ;
@@ -53,6 +53,7 @@ function lookupCoverage(glyphIndex, coverage) {
5353 }
5454 }
5555 break ;
56+ }
5657 default :
5758 return - 1 ; // not found
5859 }
@@ -230,7 +231,7 @@ FeatureQuery.prototype.getScriptFeaturesIndexes = function(scriptTag) {
230231 return script . script . defaultLangSys . featureIndexes ;
231232 } else {
232233 let langSysRecords = script . langSysRecords ;
233- if ( ! ! langSysRecords ) {
234+ if ( langSysRecords ) {
234235 for ( let j = 0 ; j < langSysRecords . length ; j ++ ) {
235236 const langSysRecord = langSysRecords [ j ] ;
236237 if ( langSysRecord . tag === scriptTag ) {
@@ -265,7 +266,7 @@ FeatureQuery.prototype.mapTagsToFeatures = function (features, scriptTag) {
265266 */
266267FeatureQuery . prototype . getScriptFeatures = function ( scriptTag ) {
267268 let features = this . features [ scriptTag ] ;
268- if ( this . features . hasOwnProperty ( scriptTag ) ) return features ;
269+ if ( Object . prototype . hasOwnProperty . call ( this . features , scriptTag ) ) return features ;
269270 const featuresIndexes = this . getScriptFeaturesIndexes ( scriptTag ) ;
270271 if ( ! featuresIndexes ) return null ;
271272 const gsub = this . font . tables . gsub ;
@@ -318,7 +319,7 @@ FeatureQuery.prototype.getLookupMethod = function(lookupTable, subtable) {
318319 throw new Error (
319320 `lookupType: ${ lookupTable . lookupType } - ` +
320321 `substFormat: ${ subtable . substFormat } ` +
321- ` is not yet supported`
322+ ' is not yet supported'
322323 ) ;
323324 }
324325} ;
@@ -428,7 +429,7 @@ FeatureQuery.prototype.lookupFeature = function (query) {
428429FeatureQuery . prototype . supports = function ( query ) {
429430 if ( ! query . script ) return false ;
430431 this . getScriptFeatures ( query . script ) ;
431- const supportedScript = this . features . hasOwnProperty ( query . script ) ;
432+ const supportedScript = Object . prototype . hasOwnProperty . call ( this . features , query . script ) ;
432433 if ( ! query . tag ) return supportedScript ;
433434 const supportedFeature = (
434435 this . features [ query . script ] . some ( feature => feature . tag === query . tag )
@@ -467,8 +468,8 @@ FeatureQuery.prototype.getFeatureLookups = function (feature) {
467468 * @param {any } query an object that describes the properties of a query
468469 */
469470FeatureQuery . prototype . getFeature = function getFeature ( query ) {
470- if ( ! this . font ) return { FAIL : ` No font was found` } ;
471- if ( ! this . features . hasOwnProperty ( query . script ) ) {
471+ if ( ! this . font ) return { FAIL : ' No font was found' } ;
472+ if ( ! Object . prototype . hasOwnProperty . call ( this . features , query . script ) ) {
472473 this . getScriptFeatures ( query . script ) ;
473474 }
474475 const scriptFeatures = this . features [ query . script ] ;
0 commit comments