# FontRegistry Class

> FontRegistry class in the Node.js JavaScript API: Resolves document font faces and shapes glyph runs identically in browser and server rendering.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Path:** TX Sheet Control > API Reference > JavaScript API > Node.js Server > FontRegistry Class
- **567 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/llms-full.txt

---

Resolves document font faces and shapes glyph runs identically in browser and server rendering.

Package: `@txtextcontrol/tx-sheet-control-server`. Version: **2.0.0**.

Related workbook object-model type, returned through the server control. Obtain it from its owning workbook or collection; it is not a required browser-package import.

### Constructor

```javascript
new FontRegistry()
```

This overload has no parameters.

Returns: `FontRegistry`.

### Members

#### Properties

| Property | Description |
|---|---|
| [revision](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/revision-property/llms-full.txt) | Monotonic face-catalog revision, updated only when a face is registered. |

#### Methods

| Method | Description |
|---|---|
| [add](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/add-method/llms-full.txt) | Add/replace a TrueType-outline font face. |
| [has](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/has-method/llms-full.txt) | Check a family/weight/style face. |
| [measure](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/measure-method/llms-full.txt) | Read text width/ascent/descent. |
| [shape](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/shape-method/llms-full.txt) | Shape text into glyphs using a CSS font string. |
| [snapshot](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/snapshot-method/llms-full.txt) | Copy registered font faces. |

### Examples

Pass the FontRegistry value obtained from its owning control, collection, callback or operation. The function reads that value without constructing a replacement document object.

```javascript
'use strict';

function inspectFontRegistryRevision(fontRegistry) {
    const value = fontRegistry['revision'];
    console.log('FontRegistry.revision', value);
}
```

### See Also

- [JavaScript Node.js Server API](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/llms-full.txt)
- [Font Handling](https://docs.textcontrol.com/tx-sheet-control/deployment/fonts/llms-full.txt)
- [alias](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/alias-method/llms-full.txt): Map an original family to a registered target without changing workbook styles. Unknown targets and cyclic substitutions throw.

---

## In This Section

- [FontRegistry.add Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/add-method/llms-full.txt): FontRegistry.add method in the Node.js JavaScript API: Add/replace a TrueType-outline font face. Includes the syntax and a JavaScript example.
- [FontRegistry.alias Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/alias-method/llms-full.txt): FontRegistry.alias method in the TX Sheet Control JavaScript API for Node.js: Map an original family to a registered target without changing workbook styles.
- [FontRegistry.has Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/has-method/llms-full.txt): FontRegistry.has method in the TX Sheet Control JavaScript API for Node.js: Check a family/weight/style face. Includes the syntax and a JavaScript example.
- [FontRegistry.measure Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/measure-method/llms-full.txt): FontRegistry.measure method in the TX Sheet Control JavaScript API for Node.js: Read text width/ascent/descent. Includes the syntax and a JavaScript example.
- [FontRegistry.revision Property](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/revision-property/llms-full.txt): FontRegistry.revision property in the TX Sheet Control JavaScript API for Node.js: Monotonic face-catalog revision, updated only when a face is registered.
- [FontRegistry.shape Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/shape-method/llms-full.txt): FontRegistry.shape method in the TX Sheet Control JavaScript API for Node.js: Shape text into glyphs using a CSS font string.
- [FontRegistry.snapshot Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/snapshot-method/llms-full.txt): FontRegistry.snapshot method in the TX Sheet Control JavaScript API for Node.js: Copy registered font faces. Includes the syntax and a JavaScript example.

---

## Nearby

- **Previous:** [DrawingHandle.updateBarcode Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/drawinghandle/updatebarcode-method/llms-full.txt)
- **Next:** [FontRegistry.add Method](https://docs.textcontrol.com/tx-sheet-control/reference/javascript-api/nodejs/fontregistry/add-method/llms-full.txt)
