Skip to content

Commit

Permalink
Rearrange
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Nov 3, 2024
1 parent ba269d6 commit bb8fd4b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/engine/tw-font-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,6 @@ class FontManager extends EventEmitter {
return /^[-\w ]+$/.test(family);
}

/**
* @deprecated only exists for extension compatibility, use isValidSystemFont or isValidCustomFont instead
*/
isValidFamily (family) {
return this.isValidSystemFont(family) && this.isValidCustomFont(family);
}

/**
* @param {string} family Untrusted font name input
* @returns {boolean} true if the family is valid for a custom font
Expand All @@ -84,6 +77,13 @@ class FontManager extends EventEmitter {
return /^[-\w ]+$/.test(family) && !this.restrictedFonts.has(family.toLowerCase());
}

/**
* @deprecated only exists for extension compatibility, use isValidSystemFont or isValidCustomFont instead
*/
isValidFamily (family) {
return this.isValidSystemFont(family) && this.isValidCustomFont(family);
}

/**
* @param {string} family Untrusted font name input
* @returns {string}
Expand Down

0 comments on commit bb8fd4b

Please sign in to comment.