()
| 152 | |
| 153 | @computed() |
| 154 | protected characterSize() { |
| 155 | this.requestFontUpdate(); |
| 156 | const context = this.cacheCanvas(); |
| 157 | context.save(); |
| 158 | this.applyStyle(context); |
| 159 | context.font = this.styles.font; |
| 160 | const width = context.measureText('X').width; |
| 161 | context.restore(); |
| 162 | |
| 163 | return new Vector2(width, parseFloat(this.styles.lineHeight)); |
| 164 | } |
| 165 | |
| 166 | protected override desiredSize(): SerializedVector2<DesiredLength> { |
| 167 | const custom = super.desiredSize(); |
no test coverage detected