> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ploterr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Dimension styles

> The text heights, font and terminators that a dimension uses.

## Import

```typescript theme={null}
import {
  resolveDimensionStyle,
  DEFAULT_DIMENSION_STYLE,
  DEFAULT_FONT_FAMILY,
  TEXT_HEIGHTS_MM,
} from '@opengeometry/floorkit';
```

## resolveDimensionStyle

The style an annotation resolves to.

```typescript theme={null}
function resolveDimensionStyle(
  styleId: string | undefined,
  registry: DimensionStyleRegistry | undefined,
): DimensionStyleSpec;
```

## DEFAULT\_DIMENSION\_STYLE

What a dimension gets when its document names no style.

```typescript theme={null}
const DEFAULT_DIMENSION_STYLE: DimensionStyleSpec;
```

## DEFAULT\_FONT\_FAMILY

The font stack for drawing text.

```typescript theme={null}
const DEFAULT_FONT_FAMILY = '"Paper Mono", "Courier New", Courier, monospace';
```

## TEXT\_HEIGHTS\_MM

ISO 3098 text heights, in millimetres.

```typescript theme={null}
const TEXT_HEIGHTS_MM: readonly [1.8, 2.5, 3.5, 5, 7, 10, 14, 20];
```

## Types

### DimensionStyleRegistry

Named styles a document carries, keyed by the id an annotation points at.

```typescript theme={null}
type DimensionStyleRegistry = Record<string, DimensionStyleSpec>;
```

### DimensionStyleSpec

How dimensions and leaders are drawn on one document.

```typescript theme={null}
interface DimensionStyleSpec extends StrokeStyle {
  terminator?: TerminatorKind;
  terminatorSizeMm?: number;
  textHeightMm?: number;
  precision?: number;
  fontFamily?: string;
}
```

<ResponseField name="terminator" type="TerminatorKind">
  Mark at each end of the dimension line. Default "slash".
</ResponseField>

<ResponseField name="terminatorSizeMm" type="number">
  Terminator size in paper mm. Defaults to the label height.
</ResponseField>

<ResponseField name="textHeightMm" type="number">
  Text height in paper mm.
</ResponseField>

<ResponseField name="precision" type="number">
  Decimal places (metric) or fraction denominator (imperial).
</ResponseField>

<ResponseField name="fontFamily" type="string" />

## Related

* [`StrokeStyle`](/floorkit/api/annotations/dimension-geometry#strokestyle)
* [`TerminatorKind`](/floorkit/api/annotations/dimension-geometry#terminatorkind)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.