| 60 | } |
| 61 | |
| 62 | public parse() { |
| 63 | this._reset(); |
| 64 | // default font flags |
| 65 | if (this._tokens.length === 1) { |
| 66 | switch (this._currentToken?.text) { |
| 67 | case 'caption': |
| 68 | case 'icon': |
| 69 | case 'menu': |
| 70 | case 'message-box': |
| 71 | case 'small-caption': |
| 72 | case 'status-bar': |
| 73 | case 'inherit': |
| 74 | return; |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | if (!this.parseOnlyFamilies) { |
| 79 | this._fontStyleVariantWeight(); |
| 80 | this._fontSizeLineHeight(); |
| 81 | } |
| 82 | this._fontFamily(); |
| 83 | } |
| 84 | |
| 85 | public static parseFamilies(value: string): string[] { |
| 86 | const parser = new FontParser(value); |