ink-sdl 0.1.1 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -9,7 +9,8 @@ Render [Ink](https://github.com/vadimdemedes/ink) TUI applications to an SDL win
9
9
  - Window resizing with automatic terminal dimension updates
10
10
  - HiDPI/Retina display support
11
11
  - Glyph caching for efficient text rendering
12
- - Bundled monospace font (Cozette)
12
+ - Bundled monospace font (Cozette) with system font option
13
+ - Emoji support via platform font fallback
13
14
 
14
15
  ## Prerequisites
15
16
 
@@ -64,17 +65,21 @@ pnpm exec tsx examples/hello.tsx --font-size 20
64
65
  # Override scale factor (useful for HiDPI testing)
65
66
  pnpm exec tsx examples/hello.tsx --scale-factor 2.0
66
67
 
68
+ # Use system font instead of bundled Cozette
69
+ pnpm exec tsx examples/hello.tsx --system-font
70
+
67
71
  # All options
68
- pnpm exec tsx examples/hello.tsx --title "Test" --width 800 --height 600 --font-size 18 --scale-factor 1.5
72
+ pnpm exec tsx examples/hello.tsx --title "Test" --width 800 --height 600 --font-size 18 --scale-factor 1.5 --system-font
69
73
  ```
70
74
 
71
- | Flag | Description |
72
- | ---------------- | ----------------------------------- |
73
- | `--title` | Window title |
74
- | `--width` | Window width in pixels |
75
- | `--height` | Window height in pixels |
76
- | `--font-size` | Font size in points |
77
- | `--scale-factor` | Scale factor (omit for auto-detect) |
75
+ | Flag | Description |
76
+ | ---------------- | -------------------------------------------- |
77
+ | `--title` | Window title |
78
+ | `--width` | Window width in pixels |
79
+ | `--height` | Window height in pixels |
80
+ | `--font-size` | Font size in points |
81
+ | `--scale-factor` | Scale factor (omit for auto-detect) |
82
+ | `--system-font` | Use system monospace font instead of Cozette |
78
83
 
79
84
  > **Note:** This project uses [pnpm](https://pnpm.io/) for development. You can install and use ink-sdl in your own project with npm or pnpm, but if you're contributing to the library itself, use pnpm.
80
85
 
@@ -129,14 +134,15 @@ Creates stdin/stdout streams and a window for use with Ink.
129
134
 
130
135
  #### Options
131
136
 
132
- | Option | Type | Default | Description |
133
- | ------------- | ---------------- | ----------- | ------------------------------------------ |
134
- | `title` | `string` | `"ink-sdl"` | Window title |
135
- | `width` | `number` | `800` | Window width in pixels |
136
- | `height` | `number` | `600` | Window height in pixels |
137
- | `vsync` | `boolean` | `true` | Enable vertical sync |
138
- | `fontSize` | `number` | `16` | Font size in points |
139
- | `scaleFactor` | `number \| null` | `null` | Override scale factor (null = auto-detect) |
137
+ | Option | Type | Default | Description |
138
+ | ------------- | ---------------- | ----------- | -------------------------------------------- |
139
+ | `title` | `string` | `"ink-sdl"` | Window title |
140
+ | `width` | `number` | `800` | Window width in pixels |
141
+ | `height` | `number` | `600` | Window height in pixels |
142
+ | `vsync` | `boolean` | `true` | Enable vertical sync |
143
+ | `fontSize` | `number` | `16` | Font size in points |
144
+ | `scaleFactor` | `number \| null` | `null` | Override scale factor (null = auto-detect) |
145
+ | `systemFont` | `boolean` | `false` | Use system monospace font instead of Cozette |
140
146
 
141
147
  #### Returns
142
148
 
@@ -190,8 +196,8 @@ import {
190
196
  AnsiParser,
191
197
  TextRenderer,
192
198
  InputBridge,
193
- getSDL2,
194
- getSDL_ttf,
199
+ getSdl2,
200
+ getSdlTtf,
195
201
  } from "ink-sdl";
196
202
  ```
197
203
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ink-sdl",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Render Ink terminal apps in native SDL windows",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
Binary file