# core/graphic/textstringtexturecache (vanilla.js 0.4.0)

> https://vanillapunch.com/docs/vanilla.js/0.4.0/api/core/graphic/textstringtexturecache/

Graphic 없이 글 재기. (measureTextMetrics 와 같다, 러스트 판 measure_text_without_graphic 과 같은 이름. 문서가 없으면 null)

예제: Graphic 없이 글 너비 재기

```js
import { measureTextWithoutGraphic } from "./build/vanilla.js";

const textMetrics = measureTextWithoutGraphic("bold 16px sans-serif", "Hello");
if (textMetrics !== null) {
	console.log(textMetrics.width);
}
```

## Functions and constants

- `measureTextWithoutGraphic(fontString, text)` (method, since 0.4.0): Graphic 없이 글 재기. (measureTextMetrics 와 같다, 러스트 판 measure_text_without_graphic 과 같은 이름. 문서가 없으면 null)
  - `fontString` string: CSS 글꼴 글. (예: "bold 16px sans-serif")
  - `text` string: 잴 글.
  - returns TextMetrics | null: 글의 치수. (캐시가 나눠 쓰므로 고치지 않는다, 문서가 없으면 null)
