# ServerSheetControl.getFontFile Method

> ServerSheetControl.getFontFile method in the Node.js JavaScript API: Reads a catalogued font for HTTP hosting without exposing trusted server paths.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Method
- **Path:** TX Sheet Control > API Reference > JavaScript API > Node.js Server > ServerSheetControl > ServerSheetControl.getFontFile Method
- **451 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/serversheetcontrol/getfontfile-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/serversheetcontrol/getfontfile-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/serversheetcontrol/getfontfile-method/llms-full.txt

---

Reads a catalogued font for HTTP hosting without exposing trusted server paths.

Owner: [ServerSheetControl](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/serversheetcontrol/llms-full.txt). Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

### Syntax

```javascript
await owner.getFontFile(fileName, hash)
```

### Parameters

| Parameter | Type | Optional | Description |
|---|---|---|---|
| `fileName` | `string` | No | The unescaped basename from a catalog face URL. |
| `hash` | `string` | No | SHA-256 content version from that URL; stale versions fail instead of changing bytes. |

### Return Value

`Promise<Uint8Array<ArrayBufferLike>>`.

Owned TrueType bytes identical to those used for PDF export.

### Exceptions

Error if the file is unavailable, unsupported or no longer matches the requested version.

### Examples

Pass an existing ServerSheetControl from the owning document. Related handles and input bytes must belong to the intended document and application; the function applies the operation and inspects its result.

```javascript
async function inspectServerSheetControlGetFontFile(sheetControl, hash) {
    const result = await sheetControl['getFontFile']('LiberationSans-Regular.ttf', hash);
    console.log(result);
}
```

### Remarks

Use this member on an object from the current document. Reacquire document-bound handles after replacement/deletion. Validate arguments against the declared types and documented bounds; handle exceptions or rejected promises.

### See Also

- [ServerSheetControl Class](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/serversheetcontrol/llms-full.txt)
- [Font Handling](https://docs.textcontrol.com/tx-sheet-control/deployment/fonts/llms-full.txt)

---

## Nearby

- **Previous:** [ServerSheetControl.getFontCatalog Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/serversheetcontrol/getfontcatalog-method/llms-full.txt)
- **Next:** [ServerSheetControl.getPdfInfo Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/serversheetcontrol/getpdfinfo-method/llms-full.txt)
