fontisan 0.4.54-java → 0.4.55-java

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.
Files changed (38) hide show
  1. checksums.yaml +4 -4
  2. data/Cargo.lock +1 -1
  3. data/docs/.gitignore +4 -0
  4. data/docs/astro.config.mjs +16 -0
  5. data/docs/package-lock.json +4022 -1496
  6. data/docs/package.json +12 -5
  7. data/docs/scripts/sitemap-base.mjs +81 -0
  8. data/docs/src/content.config.ts +32 -0
  9. data/docs/{.vitepress/config.ts → src/data/sidebar.ts} +235 -146
  10. data/docs/src/layouts/Site.astro +320 -0
  11. data/docs/src/pages/404.astro +14 -0
  12. data/docs/src/pages/api/[...slug].astro +22 -0
  13. data/docs/src/pages/api/index.astro +12 -0
  14. data/docs/src/pages/cli/[...slug].astro +22 -0
  15. data/docs/src/pages/cli/index.astro +12 -0
  16. data/docs/src/pages/guide/[...slug].astro +22 -0
  17. data/docs/src/pages/guide/index.astro +12 -0
  18. data/docs/src/pages/history/[...slug].astro +22 -0
  19. data/docs/src/pages/history/index.astro +24 -0
  20. data/docs/src/pages/index.astro +234 -0
  21. data/docs/src/pages/root/[...slug].astro +20 -0
  22. data/docs/src/styles/site.css +88 -0
  23. data/lib/fontisan/byte_ops.rb +0 -5
  24. data/lib/fontisan/ffi/darwin-arm64/libfontisan_cdylib.dylib +0 -0
  25. data/lib/fontisan/ffi/darwin-x86_64/libfontisan_cdylib.dylib +0 -0
  26. data/lib/fontisan/ffi/linux-x86_64/libfontisan_cdylib.so +0 -0
  27. data/lib/fontisan/ffi/windows-x86_64/fontisan_cdylib.dll +0 -0
  28. data/lib/fontisan/native.rb +1 -1
  29. data/lib/fontisan/version.rb +1 -1
  30. metadata +18 -10
  31. data/docs/.vitepress/theme/components/ApiMethod.vue +0 -127
  32. data/docs/.vitepress/theme/components/Badge.vue +0 -51
  33. data/docs/.vitepress/theme/components/FeatureComparison.vue +0 -87
  34. data/docs/.vitepress/theme/components/HeroCodeBlock.vue +0 -98
  35. data/docs/.vitepress/theme/components/WithinHero.vue +0 -30
  36. data/docs/.vitepress/theme/index.ts +0 -22
  37. data/docs/.vitepress/theme/style.css +0 -628
  38. data/docs/scripts/post-build.mjs +0 -81
@@ -1,373 +1,462 @@
1
- import { defineConfig, type HeadConfig } from "vitepress";
2
-
3
- const SITE_ORIGIN = "https://www.fontist.org";
4
- const BASE_PATH = "/fontisan/";
5
- const DEFAULT_DESCRIPTION =
6
- "The most comprehensive font processing library for Ruby — 100% Pure Ruby, no Python, no C++, no C# dependencies.";
7
- const DEFAULT_OG_IMAGE = `${SITE_ORIGIN}/og-image.png`;
8
-
9
- // Map a page's source path to its canonical public URL (origin + base + clean path).
10
- function pathToUrl(relativePath: string): string {
11
- const bare = relativePath.replace(/\.md$/, "").replace(/\\/g, "/");
12
- if (bare === "index") return `${SITE_ORIGIN}${BASE_PATH}`;
13
- if (bare.endsWith("/index"))
14
- return `${SITE_ORIGIN}${BASE_PATH}${bare.slice(0, -6)}/`;
15
- return `${SITE_ORIGIN}${BASE_PATH}${bare}`;
16
- }
17
-
18
- // https://vitepress.dev/reference/site-config
19
- export default defineConfig({
20
- lang: "en-US",
21
-
22
- // https://vitepress.dev/guide/routing#generating-clean-url
23
- cleanUrls: true,
24
-
25
- // Exclude standalone guide stubs that collide with directory routes.
26
- // Both guide/<name>.md and guide/<name>/index.md exist for these three
27
- // (hinting, validation, conversion); the directory version is the canonical
28
- // one (sidebar-linked, richer content). Excluding the standalone stub from
29
- // the build resolves the duplicate-route collision while keeping the source
30
- // files in the repo.
31
- srcExclude: [
32
- "guide/hinting.md",
33
- "guide/validation.md",
34
- "guide/conversion.md",
35
- ],
36
-
37
- title: "Fontisan",
38
- description:
39
- "The most comprehensive font processing library for Ruby — 100% Pure Ruby, no Python, no C++, no C# dependencies.",
40
-
41
- lastUpdated: true,
42
-
43
- // https://vitepress.dev/reference/site-config#sitemap
44
- sitemap: {
45
- hostname: SITE_ORIGIN,
46
- },
47
-
48
- // Base path for deployment (e.g., /fontisan/ for fontist.org/fontisan/)
49
- base: process.env.BASE_PATH || "/fontisan/",
50
-
51
- head: [
52
- [
53
- "link",
54
- { rel: "icon", type: "image/png", href: "/favicon-96x96.png", sizes: "96x96" },
55
- ],
56
- ["link", { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" }],
57
- ["link", { rel: "shortcut icon", href: "/favicon.ico" }],
58
- [
59
- "link",
60
- { rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" },
61
- ],
62
- ["link", { rel: "manifest", href: "/site.webmanifest" }],
63
- ["meta", { property: "og:type", content: "website" }],
64
- ["link", { rel: "preconnect", href: "https://fonts.googleapis.com" }],
65
- ["link", { rel: "preconnect", href: "https://fonts.gstatic.com", crossorigin: "" }],
66
- [
67
- "link",
68
- {
69
- rel: "stylesheet",
70
- href: "https://fonts.googleapis.com/css2?family=Spectral:ital,opsz,wght@0,7..72,200..800;1,7..72,200..800&family=IBM+Plex+Mono:wght@400;500&family=IBM+Plex+Sans:wght@300;400;500;600&display=swap",
71
- },
72
- ],
73
- ],
74
-
75
- // Per-page og:* and twitter:* tags are derived from each page's frontmatter.
76
- // https://vitepress.dev/reference/site-config#transformhead
77
- transformHead(ctx) {
78
- const { pageData } = ctx;
79
- const url = pathToUrl(pageData.relativePath);
80
- const title = pageData.title || "Fontisan";
81
- const description = pageData.description || DEFAULT_DESCRIPTION;
82
- const image = pageData.frontmatter.image || DEFAULT_OG_IMAGE;
83
-
84
- const tags: HeadConfig[] = [
85
- ["meta", { property: "og:title", content: title }],
86
- ["meta", { property: "og:description", content: description }],
87
- ["meta", { property: "og:url", content: url }],
88
- ["meta", { property: "og:image", content: image }],
89
- ["meta", { name: "twitter:card", content: "summary_large_image" }],
90
- ["meta", { name: "twitter:title", content: title }],
91
- ["meta", { name: "twitter:description", content: description }],
92
- ["meta", { name: "twitter:image", content: image }],
93
- ];
94
-
95
- return tags;
96
- },
97
-
98
- // https://vitepress.dev/reference/default-theme-config
99
- themeConfig: {
100
- logo: "/logo-full.svg",
101
- siteTitle: false,
102
-
103
- // Local search with MiniSearch
104
- search: {
105
- provider: "local",
106
- options: {
107
- detailedView: true,
108
- miniSearch: {
109
- searchOptions: {
110
- fuzzy: 0.2,
111
- prefix: true,
112
- boost: { title: 4, text: 2, titles: 1 },
113
- },
114
- },
115
- },
116
- },
117
-
118
- // Top navigation (minimal: 4 items)
119
- nav: [
120
- { text: "← Fontist.org", link: "https://www.fontist.org" },
121
- { text: "Guide", link: "/guide/" },
122
- { text: "CLI", link: "/cli/" },
123
- { text: "API", link: "/api/" },
124
- { text: "Fontist", link: "https://www.fontist.org/fontist/", target: "_self" },
125
- { text: "Formulas", link: "https://www.fontist.org/formulas/", target: "_self" },
126
- ],
127
-
128
- // Sidebar configuration
129
- sidebar: {
1
+ // Ported verbatim from the VitePress sidebar configuration.
2
+
3
+ export const SIDEBAR: Record<string, { text: string; items?: { text: string; link: string }[]; collapsed?: boolean }[]> = {
4
+
5
+
6
+
130
7
  "/guide/": [
8
+
131
9
  {
10
+
132
11
  text: "Getting Started",
12
+
133
13
  items: [
14
+
134
15
  { text: "Introduction", link: "/guide/" },
16
+
135
17
  { text: "Installation", link: "/guide/installation" },
18
+
136
19
  { text: "Quick Start", link: "/guide/quick-start" },
20
+
137
21
  ],
22
+
138
23
  },
24
+
139
25
  {
26
+
140
27
  text: "CLI Reference",
28
+
141
29
  collapsed: true,
30
+
142
31
  items: [
32
+
143
33
  { text: "Overview", link: "/guide/cli/" },
34
+
144
35
  { text: "convert", link: "/guide/cli/convert" },
36
+
145
37
  { text: "info", link: "/guide/cli/info" },
38
+
146
39
  { text: "validate", link: "/guide/cli/validate" },
40
+
147
41
  { text: "subset", link: "/guide/cli/subset" },
42
+
148
43
  { text: "pack/unpack", link: "/guide/cli/pack" },
44
+
149
45
  { text: "export", link: "/guide/cli/export" },
46
+
150
47
  ],
48
+
151
49
  },
50
+
152
51
  {
52
+
153
53
  text: "Font Formats",
54
+
154
55
  collapsed: true,
56
+
155
57
  items: [
58
+
156
59
  { text: "Overview", link: "/guide/formats/" },
60
+
157
61
  { text: "TrueType (TTF)", link: "/guide/formats/ttf" },
62
+
158
63
  { text: "OpenType (OTF)", link: "/guide/formats/otf" },
64
+
159
65
  { text: "Type 1 (PFB/PFA)", link: "/guide/formats/type1" },
66
+
160
67
  { text: "WOFF & WOFF2", link: "/guide/formats/woff" },
68
+
161
69
  { text: "Collections (TTC/OTC)", link: "/guide/formats/collections" },
70
+
162
71
  { text: "Apple dfont", link: "/guide/formats/dfont" },
72
+
163
73
  { text: "SVG Fonts", link: "/guide/formats/svg" },
74
+
164
75
  ],
76
+
165
77
  },
78
+
166
79
  {
80
+
167
81
  text: "Conversion Guide",
82
+
168
83
  collapsed: true,
84
+
169
85
  items: [
86
+
170
87
  { text: "Overview", link: "/guide/conversion/" },
88
+
171
89
  { text: "TTF ↔ OTF", link: "/guide/conversion/ttf-otf" },
90
+
172
91
  { text: "Type 1 → Modern", link: "/guide/conversion/type1" },
92
+
173
93
  { text: "Web Formats", link: "/guide/conversion/web" },
94
+
174
95
  { text: "Collections", link: "/guide/conversion/collections" },
96
+
175
97
  { text: "Curve Conversion", link: "/guide/conversion/curves" },
98
+
176
99
  { text: "Options Reference", link: "/guide/conversion/options" },
100
+
177
101
  ],
102
+
178
103
  },
104
+
179
105
  {
106
+
180
107
  text: "Validation",
108
+
181
109
  collapsed: true,
110
+
182
111
  items: [
112
+
183
113
  { text: "Overview", link: "/guide/validation/" },
114
+
184
115
  { text: "Validation Profiles", link: "/guide/validation/profiles" },
116
+
185
117
  { text: "Validation Helpers", link: "/guide/validation/helpers" },
118
+
186
119
  { text: "Custom Validators", link: "/guide/validation/custom" },
120
+
187
121
  ],
122
+
188
123
  },
124
+
189
125
  {
126
+
190
127
  text: "Variable Fonts",
128
+
191
129
  collapsed: true,
130
+
192
131
  items: [
132
+
193
133
  { text: "Overview", link: "/guide/variable-fonts/" },
134
+
194
135
  { text: "Axes & Instances", link: "/guide/variable-fonts/axes" },
136
+
195
137
  { text: "Instance Generation", link: "/guide/variable-fonts/instances" },
138
+
196
139
  { text: "Format Conversion", link: "/guide/variable-fonts/conversion" },
140
+
197
141
  { text: "Named Instances", link: "/guide/variable-fonts/named-instances" },
142
+
198
143
  { text: "Static Fonts", link: "/guide/variable-fonts/static" },
144
+
199
145
  { text: "Advanced Topics", link: "/guide/variable-fonts/advanced" },
146
+
200
147
  ],
148
+
201
149
  },
150
+
202
151
  {
152
+
203
153
  text: "Font Hinting",
154
+
204
155
  collapsed: true,
156
+
205
157
  items: [
158
+
206
159
  { text: "Overview", link: "/guide/hinting/" },
160
+
207
161
  { text: "TrueType Hinting", link: "/guide/hinting/truetype" },
162
+
208
163
  { text: "PostScript Hinting", link: "/guide/hinting/postscript" },
164
+
209
165
  { text: "Hint Conversion", link: "/guide/hinting/conversion" },
166
+
210
167
  { text: "Autohint", link: "/guide/hinting/autohint" },
168
+
211
169
  ],
170
+
212
171
  },
172
+
213
173
  {
174
+
214
175
  text: "Color Fonts",
176
+
215
177
  collapsed: true,
178
+
216
179
  items: [
180
+
217
181
  { text: "Overview", link: "/guide/color-fonts/" },
182
+
218
183
  { text: "COLR/CPAL", link: "/guide/color-fonts/colr-cpal" },
184
+
219
185
  { text: "sbix & CBDT", link: "/guide/color-fonts/bitmaps" },
186
+
220
187
  { text: "SVG Color", link: "/guide/color-fonts/svg" },
188
+
221
189
  ],
190
+
222
191
  },
192
+
223
193
  {
194
+
224
195
  text: "Migration Guides",
196
+
225
197
  collapsed: true,
198
+
226
199
  items: [
200
+
227
201
  { text: "Overview", link: "/guide/migrations/" },
202
+
228
203
  { text: "From fonttools (Python)", link: "/guide/migrations/fonttools" },
204
+
229
205
  { text: "From extract_ttc", link: "/guide/migrations/extract-ttc" },
206
+
230
207
  { text: "From otfinfo", link: "/guide/migrations/otfinfo" },
208
+
231
209
  { text: "From Font-Validator", link: "/guide/migrations/font-validator" },
210
+
232
211
  ],
212
+
233
213
  },
214
+
234
215
  {
216
+
235
217
  text: "Feature Comparisons",
218
+
236
219
  collapsed: true,
220
+
237
221
  items: [
222
+
238
223
  { text: "Overview", link: "/guide/comparisons/" },
224
+
239
225
  { text: "vs fonttools", link: "/guide/comparisons/fonttools" },
226
+
240
227
  { text: "vs lcdf-typetools", link: "/guide/comparisons/lcdf-typetools" },
228
+
241
229
  { text: "vs Font-Validator", link: "/guide/comparisons/font-validator" },
230
+
242
231
  ],
232
+
243
233
  },
234
+
244
235
  {
236
+
245
237
  text: "Advanced Topics",
238
+
246
239
  collapsed: true,
240
+
247
241
  items: [
242
+
248
243
  { text: "Engines", link: "/guide/engines" },
244
+
249
245
  { text: "Universal Outline Model", link: "/guide/universal-outline" },
246
+
250
247
  ],
248
+
251
249
  },
250
+
252
251
  {
252
+
253
253
  text: "Contributing",
254
+
254
255
  collapsed: true,
256
+
255
257
  items: [
258
+
256
259
  { text: "Contributing Guide", link: "/guide/contributing" },
260
+
257
261
  ],
262
+
258
263
  },
264
+
259
265
  ],
266
+
260
267
  "/cli/": [
268
+
261
269
  {
270
+
262
271
  text: "CLI Reference",
272
+
263
273
  items: [
274
+
264
275
  { text: "Overview", link: "/cli/" },
276
+
265
277
  ],
278
+
266
279
  },
280
+
267
281
  {
282
+
268
283
  text: "Font Information",
284
+
269
285
  collapsed: true,
286
+
270
287
  items: [
288
+
271
289
  { text: "info", link: "/cli/info" },
290
+
272
291
  { text: "ls", link: "/cli/ls" },
292
+
273
293
  { text: "tables", link: "/cli/tables" },
294
+
274
295
  { text: "glyphs", link: "/cli/glyphs" },
296
+
275
297
  { text: "unicode", link: "/cli/unicode" },
298
+
276
299
  { text: "scripts", link: "/cli/scripts" },
300
+
277
301
  { text: "features", link: "/cli/features" },
302
+
278
303
  { text: "variable", link: "/cli/variable" },
304
+
279
305
  { text: "optical-size", link: "/cli/optical-size" },
306
+
280
307
  ],
308
+
281
309
  },
310
+
282
311
  {
312
+
283
313
  text: "Font Operations",
314
+
284
315
  collapsed: true,
316
+
285
317
  items: [
318
+
286
319
  { text: "convert", link: "/cli/convert" },
320
+
287
321
  { text: "subset", link: "/cli/subset" },
322
+
288
323
  { text: "validate", link: "/cli/validate" },
324
+
289
325
  { text: "validate-collection", link: "/cli/validate-collection" },
326
+
290
327
  { text: "instance", link: "/cli/instance" },
328
+
291
329
  { text: "export", link: "/cli/export" },
330
+
292
331
  { text: "dump-table", link: "/cli/dump-table" },
332
+
293
333
  ],
334
+
294
335
  },
336
+
295
337
  {
338
+
296
339
  text: "Collection Operations",
340
+
297
341
  collapsed: true,
342
+
298
343
  items: [
344
+
299
345
  { text: "pack/unpack", link: "/cli/pack" },
346
+
300
347
  ],
348
+
301
349
  },
350
+
302
351
  {
352
+
303
353
  text: "Utilities",
354
+
304
355
  collapsed: true,
356
+
305
357
  items: [
358
+
306
359
  { text: "version", link: "/cli/version" },
360
+
307
361
  ],
362
+
308
363
  },
364
+
309
365
  ],
366
+
310
367
  "/api/": [
368
+
311
369
  {
370
+
312
371
  text: "API Reference",
372
+
313
373
  items: [
374
+
314
375
  { text: "Overview", link: "/api/" },
376
+
315
377
  ],
378
+
316
379
  },
380
+
317
381
  {
382
+
318
383
  text: "Core Classes",
384
+
319
385
  collapsed: true,
386
+
320
387
  items: [
388
+
321
389
  { text: "FontLoader", link: "/api/font-loader" },
390
+
322
391
  { text: "FontWriter", link: "/api/font-writer" },
392
+
323
393
  { text: "ConversionOptions", link: "/api/conversion-options" },
394
+
324
395
  { text: "SfntFont", link: "/api/sfnt-font" },
396
+
325
397
  { text: "Type1Font", link: "/api/type1-font" },
398
+
326
399
  { text: "Ufo::Layer", link: "/api/layer" },
400
+
327
401
  ],
402
+
328
403
  },
404
+
329
405
  {
406
+
330
407
  text: "Converters",
408
+
331
409
  collapsed: true,
410
+
332
411
  items: [
412
+
333
413
  { text: "OutlineConverter", link: "/api/converters/outline-converter" },
414
+
334
415
  { text: "CurveConverter", link: "/api/converters/curve-converter" },
416
+
335
417
  { text: "HintConverter", link: "/api/converters/hint-converter" },
418
+
336
419
  ],
420
+
337
421
  },
422
+
338
423
  {
424
+
339
425
  text: "Validators",
426
+
340
427
  collapsed: true,
428
+
341
429
  items: [
430
+
342
431
  { text: "FontValidator", link: "/api/validators/font-validator" },
432
+
343
433
  { text: "ValidationProfile", link: "/api/validators/profile" },
434
+
344
435
  { text: "ValidationHelper", link: "/api/validators/helper" },
436
+
345
437
  ],
438
+
346
439
  },
440
+
347
441
  {
442
+
348
443
  text: "Models",
444
+
349
445
  collapsed: true,
446
+
350
447
  items: [
448
+
351
449
  { text: "Glyph", link: "/api/models/glyph" },
450
+
352
451
  { text: "GlyphAccessor", link: "/api/models/glyph-accessor" },
452
+
353
453
  { text: "TableAnalyzer", link: "/api/models/table-analyzer" },
454
+
354
455
  ],
456
+
355
457
  },
458
+
356
459
  ],
357
- },
358
-
359
- socialLinks: [
360
- { icon: "github", link: "https://github.com/fontist/fontisan" },
361
- ],
362
-
363
- footer: {
364
- message: 'Fontisan is a [Ribose](https://www.ribose.com/) project',
365
- copyright: `Copyright &copy; 2026 Ribose Group Inc. All rights reserved.`,
366
- },
367
-
368
- editLink: {
369
- pattern: "https://github.com/fontist/fontisan/edit/main/docs/:path",
370
- text: "Edit this page on GitHub",
371
- },
372
- },
373
- });
460
+
461
+ };
462
+