fontisan 0.2.14 → 0.2.16
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.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +79 -4
- data/docs/.gitignore +17 -0
- data/docs/.vitepress/config.ts +317 -0
- data/docs/.vitepress/theme/components/ApiMethod.vue +127 -0
- data/docs/.vitepress/theme/components/Badge.vue +51 -0
- data/docs/.vitepress/theme/components/FeatureComparison.vue +87 -0
- data/docs/.vitepress/theme/components/HeroCodeBlock.vue +98 -0
- data/docs/.vitepress/theme/components/WithinHero.vue +30 -0
- data/docs/.vitepress/theme/index.ts +22 -0
- data/docs/.vitepress/theme/style.css +330 -0
- data/docs/api/conversion-options.md +141 -0
- data/docs/api/converters/curve-converter.md +34 -0
- data/docs/api/converters/hint-converter.md +34 -0
- data/docs/api/converters/outline-converter.md +27 -0
- data/docs/api/font-loader.md +111 -0
- data/docs/api/font-writer.md +103 -0
- data/docs/api/index.md +79 -0
- data/docs/api/models/glyph-accessor.md +43 -0
- data/docs/api/models/glyph.md +40 -0
- data/docs/api/models/table-analyzer.md +35 -0
- data/docs/api/sfnt-font.md +53 -0
- data/docs/api/type1-font.md +43 -0
- data/docs/api/validators/font-validator.md +31 -0
- data/docs/api/validators/helper.md +36 -0
- data/docs/api/validators/profile.md +39 -0
- data/docs/cli/convert.md +87 -0
- data/docs/cli/dump-table.md +110 -0
- data/docs/cli/export.md +176 -0
- data/docs/cli/features.md +124 -0
- data/docs/cli/glyphs.md +90 -0
- data/docs/cli/index.md +208 -0
- data/docs/cli/info.md +254 -0
- data/docs/cli/instance.md +122 -0
- data/docs/cli/ls.md +95 -0
- data/docs/cli/optical-size.md +94 -0
- data/docs/cli/pack.md +125 -0
- data/docs/cli/scripts.md +105 -0
- data/docs/cli/subset.md +39 -0
- data/docs/cli/tables.md +84 -0
- data/docs/cli/unicode.md +101 -0
- data/docs/cli/validate.md +48 -0
- data/docs/cli/variable.md +126 -0
- data/docs/cli/version.md +46 -0
- data/docs/guide/cli/convert.md +108 -0
- data/docs/guide/cli/export.md +138 -0
- data/docs/guide/cli/index.md +99 -0
- data/docs/guide/cli/info.md +144 -0
- data/docs/guide/cli/pack.md +155 -0
- data/docs/guide/cli/subset.md +118 -0
- data/docs/guide/cli/validate.md +139 -0
- data/docs/guide/color-fonts/bitmaps.md +177 -0
- data/docs/guide/color-fonts/colr-cpal.md +175 -0
- data/docs/guide/color-fonts/index.md +140 -0
- data/docs/guide/color-fonts/svg.md +154 -0
- data/docs/guide/color.md +51 -0
- data/docs/guide/comparisons/font-validator.md +222 -0
- data/docs/guide/comparisons/fonttools.md +200 -0
- data/docs/guide/comparisons/index.md +83 -0
- data/docs/guide/comparisons/lcdf-typetools.md +205 -0
- data/docs/guide/contributing.md +279 -0
- data/docs/guide/conversion/collections.md +251 -0
- data/docs/guide/conversion/curves.md +246 -0
- data/docs/guide/conversion/index.md +157 -0
- data/docs/guide/conversion/options.md +251 -0
- data/docs/guide/conversion/ttf-otf.md +184 -0
- data/docs/guide/conversion/type1.md +208 -0
- data/docs/guide/conversion/web.md +240 -0
- data/docs/guide/conversion.md +39 -0
- data/docs/guide/formats/collections.md +147 -0
- data/docs/guide/formats/dfont.md +99 -0
- data/docs/guide/formats/index.md +65 -0
- data/docs/guide/formats/otf.md +103 -0
- data/docs/guide/formats/svg.md +97 -0
- data/docs/guide/formats/ttf.md +105 -0
- data/docs/guide/formats/type1.md +118 -0
- data/docs/guide/formats/woff.md +115 -0
- data/docs/guide/hinting/autohint.md +141 -0
- data/docs/guide/hinting/conversion.md +161 -0
- data/docs/guide/hinting/index.md +86 -0
- data/docs/guide/hinting/postscript.md +149 -0
- data/docs/guide/hinting/truetype.md +135 -0
- data/docs/guide/hinting.md +44 -0
- data/docs/guide/index.md +152 -0
- data/docs/guide/installation.md +116 -0
- data/docs/guide/migrations/extract-ttc.md +549 -0
- data/docs/guide/migrations/font-validator.md +260 -0
- data/docs/guide/migrations/fonttools.md +208 -0
- data/docs/guide/migrations/index.md +64 -0
- data/docs/guide/migrations/otfinfo.md +197 -0
- data/docs/guide/quick-start.md +204 -0
- data/docs/guide/type1.md +58 -0
- data/docs/guide/universal-outline.md +151 -0
- data/docs/guide/validation/custom.md +195 -0
- data/docs/guide/validation/helpers.md +188 -0
- data/docs/guide/validation/index.md +132 -0
- data/docs/guide/validation/profiles.md +156 -0
- data/docs/guide/validation.md +47 -0
- data/docs/guide/variable-fonts/advanced.md +231 -0
- data/docs/guide/variable-fonts/axes.md +209 -0
- data/docs/guide/variable-fonts/conversion.md +197 -0
- data/docs/guide/variable-fonts/index.md +84 -0
- data/docs/guide/variable-fonts/instances.md +187 -0
- data/docs/guide/variable-fonts/named-instances.md +194 -0
- data/docs/guide/variable-fonts/static.md +168 -0
- data/docs/guide/variable.md +58 -0
- data/docs/guide/woff.md +59 -0
- data/docs/index.md +136 -0
- data/docs/lychee.toml +37 -0
- data/docs/package-lock.json +2560 -0
- data/docs/package.json +15 -0
- data/docs/public/apple-touch-icon.png +0 -0
- data/docs/public/favicon-96x96.png +0 -0
- data/docs/public/favicon.ico +0 -0
- data/docs/public/favicon.svg +1 -0
- data/docs/public/logo-full.svg +1 -0
- data/docs/public/logo.svg +1 -0
- data/docs/public/site.webmanifest +21 -0
- data/docs/public/web-app-manifest-192x192.png +0 -0
- data/docs/public/web-app-manifest-512x512.png +0 -0
- data/fontisan.gemspec +1 -1
- data/lib/fontisan/commands/features_command.rb +0 -1
- data/lib/fontisan/commands/scripts_command.rb +0 -1
- data/lib/fontisan/loading_modes.rb +0 -2
- data/lib/fontisan/sfnt_font.rb +4 -3
- data/lib/fontisan/tables/glyf/compound_glyph.rb +0 -1
- data/lib/fontisan/variable/delta_applicator.rb +3 -3
- data/lib/fontisan/variation/optimizer.rb +0 -1
- data/lib/fontisan/version.rb +1 -1
- data/lib/fontisan.rb +3 -2
- metadata +122 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 356bd0157b272462910d8822c6b77a6c768e12a45f4c56b2646d6bc683413239
|
|
4
|
+
data.tar.gz: 981dca0c122d3d3e2dab683c6a7962bc2bcc1be35fb5c0818857d6c55ff7bbbf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: '0852e6bc36559c125cab91cf4fe4d65256628df2e8c873bc52b4f291b2adc944126ed2a0e26d6daafbe7d568934a9788677cb47c8b70982097320addbc93365a'
|
|
7
|
+
data.tar.gz: dc9d8fdacf95fc0761bb62cfec0f56e7a7da1a78986915db76243461cf2434d3f8142a0547e153d6746e242aa4a3a5dc33b5b505e8ac073e467e9b9c269d97bf
|
data/.rubocop_todo.yml
CHANGED
|
@@ -1,16 +1,47 @@
|
|
|
1
1
|
# This configuration was generated by
|
|
2
2
|
# `rubocop --auto-gen-config`
|
|
3
|
-
# on 2026-02
|
|
3
|
+
# on 2026-05-02 04:07:39 UTC using RuboCop version 1.86.1.
|
|
4
4
|
# The point is for the user to remove these configuration records
|
|
5
5
|
# one by one as the offenses are removed from the code base.
|
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
|
8
8
|
|
|
9
9
|
# Offense count: 1
|
|
10
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
11
|
+
Gemspec/RequireMFA:
|
|
12
|
+
Exclude:
|
|
13
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
14
|
+
|
|
15
|
+
# Offense count: 2
|
|
10
16
|
Gemspec/RequiredRubyVersion:
|
|
11
17
|
Exclude:
|
|
18
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
12
19
|
- 'fontisan.gemspec'
|
|
13
20
|
|
|
21
|
+
# Offense count: 1
|
|
22
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
23
|
+
Layout/EmptyLines:
|
|
24
|
+
Exclude:
|
|
25
|
+
- 'lib/fontisan/loading_modes.rb'
|
|
26
|
+
|
|
27
|
+
# Offense count: 4
|
|
28
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
29
|
+
# Configuration parameters: AllowForAlignment, AllowBeforeTrailingComments, ForceEqualSignAlignment.
|
|
30
|
+
Layout/ExtraSpacing:
|
|
31
|
+
Exclude:
|
|
32
|
+
- 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
|
|
33
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
34
|
+
|
|
35
|
+
# Offense count: 1
|
|
36
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
37
|
+
# Configuration parameters: AllowMultipleStyles, EnforcedHashRocketStyle, EnforcedColonStyle, EnforcedLastArgumentHashStyle.
|
|
38
|
+
# SupportedHashRocketStyles: key, separator, table
|
|
39
|
+
# SupportedColonStyles: key, separator, table
|
|
40
|
+
# SupportedLastArgumentHashStyles: always_inspect, always_ignore, ignore_implicit, ignore_explicit
|
|
41
|
+
Layout/HashAlignment:
|
|
42
|
+
Exclude:
|
|
43
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
44
|
+
|
|
14
45
|
# Offense count: 1585
|
|
15
46
|
# This cop supports safe autocorrection (--autocorrect).
|
|
16
47
|
# Configuration parameters: Max, AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, AllowRBSInlineAnnotation, AllowCopDirectives, AllowedPatterns, SplitStrings.
|
|
@@ -18,6 +49,16 @@ Gemspec/RequiredRubyVersion:
|
|
|
18
49
|
Layout/LineLength:
|
|
19
50
|
Enabled: false
|
|
20
51
|
|
|
52
|
+
# Offense count: 5
|
|
53
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
54
|
+
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
|
|
55
|
+
# SupportedStylesForExponentOperator: space, no_space
|
|
56
|
+
# SupportedStylesForRationalLiterals: space, no_space
|
|
57
|
+
Layout/SpaceAroundOperators:
|
|
58
|
+
Exclude:
|
|
59
|
+
- 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
|
|
60
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
61
|
+
|
|
21
62
|
# Offense count: 3
|
|
22
63
|
Lint/CopDirectiveSyntax:
|
|
23
64
|
Exclude:
|
|
@@ -73,6 +114,15 @@ Lint/MissingSuper:
|
|
|
73
114
|
- 'lib/fontisan/commands/validate_command.rb'
|
|
74
115
|
- 'lib/fontisan/tables/cff2/table_builder.rb'
|
|
75
116
|
|
|
117
|
+
# Offense count: 4
|
|
118
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
119
|
+
Lint/RedundantRequireStatement:
|
|
120
|
+
Exclude:
|
|
121
|
+
- 'lib/fontisan/commands/features_command.rb'
|
|
122
|
+
- 'lib/fontisan/commands/scripts_command.rb'
|
|
123
|
+
- 'lib/fontisan/loading_modes.rb'
|
|
124
|
+
- 'lib/fontisan/variation/optimizer.rb'
|
|
125
|
+
|
|
76
126
|
# Offense count: 1
|
|
77
127
|
Lint/StructNewOverride:
|
|
78
128
|
Exclude:
|
|
@@ -126,7 +176,7 @@ Metrics/CollectionLiteralLength:
|
|
|
126
176
|
Metrics/CyclomaticComplexity:
|
|
127
177
|
Enabled: false
|
|
128
178
|
|
|
129
|
-
# Offense count:
|
|
179
|
+
# Offense count: 842
|
|
130
180
|
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
|
|
131
181
|
Metrics/MethodLength:
|
|
132
182
|
Max: 135
|
|
@@ -157,7 +207,7 @@ Naming/MethodParameterName:
|
|
|
157
207
|
# Offense count: 13
|
|
158
208
|
# Configuration parameters: Mode, AllowedMethods, AllowedPatterns, AllowBangMethods, WaywardPredicates.
|
|
159
209
|
# AllowedMethods: call
|
|
160
|
-
# WaywardPredicates: nonzero?
|
|
210
|
+
# WaywardPredicates: infinite?, nonzero?
|
|
161
211
|
Naming/PredicateMethod:
|
|
162
212
|
Exclude:
|
|
163
213
|
- 'lib/fontisan/collection/builder.rb'
|
|
@@ -180,7 +230,7 @@ Naming/PredicateMethod:
|
|
|
180
230
|
# MethodDefinitionMacros: define_method, define_singleton_method
|
|
181
231
|
Naming/PredicatePrefix:
|
|
182
232
|
Exclude:
|
|
183
|
-
- '
|
|
233
|
+
- 'spec/**/*'
|
|
184
234
|
- 'lib/fontisan/type1/afm_generator.rb'
|
|
185
235
|
|
|
186
236
|
# Offense count: 21
|
|
@@ -392,6 +442,13 @@ Style/EmptyElse:
|
|
|
392
442
|
Exclude:
|
|
393
443
|
- 'lib/fontisan/type1/seac_expander.rb'
|
|
394
444
|
|
|
445
|
+
# Offense count: 2
|
|
446
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
447
|
+
Style/ExpandPathArguments:
|
|
448
|
+
Exclude:
|
|
449
|
+
- 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
|
|
450
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
|
451
|
+
|
|
395
452
|
# Offense count: 11
|
|
396
453
|
# This cop supports safe autocorrection (--autocorrect).
|
|
397
454
|
# Configuration parameters: EnforcedStyle, MaxUnannotatedPlaceholdersAllowed, Mode, AllowedMethods, AllowedPatterns.
|
|
@@ -409,9 +466,27 @@ Style/HashLikeCase:
|
|
|
409
466
|
- 'lib/fontisan/commands/unpack_command.rb'
|
|
410
467
|
- 'lib/fontisan/models/validation_report.rb'
|
|
411
468
|
|
|
469
|
+
# Offense count: 1
|
|
470
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
471
|
+
# Configuration parameters: EnforcedStyle, EnforcedShorthandSyntax, UseHashRocketsWithSymbolValues, PreferHashRocketsForNonAlnumEndingSymbols.
|
|
472
|
+
# SupportedStyles: ruby19, hash_rockets, no_mixed_keys, ruby19_no_mixed_keys
|
|
473
|
+
# SupportedShorthandSyntax: always, never, either, consistent, either_consistent
|
|
474
|
+
Style/HashSyntax:
|
|
475
|
+
Exclude:
|
|
476
|
+
- 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
|
|
477
|
+
|
|
412
478
|
# Offense count: 1
|
|
413
479
|
# Configuration parameters: AllowedMethods.
|
|
414
480
|
# AllowedMethods: respond_to_missing?
|
|
415
481
|
Style/OptionalBooleanParameter:
|
|
416
482
|
Exclude:
|
|
417
483
|
- 'lib/fontisan/conversion_options.rb'
|
|
484
|
+
|
|
485
|
+
# Offense count: 7
|
|
486
|
+
# This cop supports safe autocorrection (--autocorrect).
|
|
487
|
+
# Configuration parameters: EnforcedStyle, ConsistentQuotesInMultiline.
|
|
488
|
+
# SupportedStyles: single_quotes, double_quotes
|
|
489
|
+
Style/StringLiterals:
|
|
490
|
+
Exclude:
|
|
491
|
+
- 'docs/node_modules/speakingurl/lib/speakingurl-rails.rb'
|
|
492
|
+
- 'docs/node_modules/speakingurl/speakingurl-rails.gemspec'
|
data/docs/.gitignore
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
1
|
+
import { defineConfig } from "vitepress";
|
|
2
|
+
|
|
3
|
+
// https://vitepress.dev/reference/site-config
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
lang: "en-US",
|
|
6
|
+
|
|
7
|
+
// https://vitepress.dev/guide/routing#generating-clean-url
|
|
8
|
+
cleanUrls: true,
|
|
9
|
+
|
|
10
|
+
title: "Fontisan",
|
|
11
|
+
description:
|
|
12
|
+
"The most comprehensive font processing library for Ruby — 100% Pure Ruby, no Python, no C++, no C# dependencies.",
|
|
13
|
+
|
|
14
|
+
lastUpdated: true,
|
|
15
|
+
|
|
16
|
+
// Base path for deployment (e.g., /fontisan/ for fontist.org/fontisan/)
|
|
17
|
+
base: process.env.BASE_PATH || "/fontisan/",
|
|
18
|
+
|
|
19
|
+
head: [
|
|
20
|
+
[
|
|
21
|
+
"link",
|
|
22
|
+
{ rel: "icon", type: "image/png", href: "/favicon-96x96.png", sizes: "96x96" },
|
|
23
|
+
],
|
|
24
|
+
["link", { rel: "icon", type: "image/svg+xml", href: "/favicon.svg" }],
|
|
25
|
+
["link", { rel: "shortcut icon", href: "/favicon.ico" }],
|
|
26
|
+
[
|
|
27
|
+
"link",
|
|
28
|
+
{ rel: "apple-touch-icon", sizes: "180x180", href: "/apple-touch-icon.png" },
|
|
29
|
+
],
|
|
30
|
+
["link", { rel: "manifest", href: "/site.webmanifest" }],
|
|
31
|
+
["meta", { property: "og:type", content: "website" }],
|
|
32
|
+
["meta", { property: "og:title", content: "Fontisan" }],
|
|
33
|
+
[
|
|
34
|
+
"meta",
|
|
35
|
+
{
|
|
36
|
+
property: "og:description",
|
|
37
|
+
content:
|
|
38
|
+
"The most comprehensive font processing library for Ruby — 100% Pure Ruby.",
|
|
39
|
+
},
|
|
40
|
+
],
|
|
41
|
+
["meta", { property: "og:image", content: "/logo-full.svg" }],
|
|
42
|
+
["meta", { name: "twitter:card", content: "summary_large_image" }],
|
|
43
|
+
],
|
|
44
|
+
|
|
45
|
+
// https://vitepress.dev/reference/default-theme-config
|
|
46
|
+
themeConfig: {
|
|
47
|
+
logo: "/logo-full.svg",
|
|
48
|
+
siteTitle: false,
|
|
49
|
+
|
|
50
|
+
// Local search with MiniSearch
|
|
51
|
+
search: {
|
|
52
|
+
provider: "local",
|
|
53
|
+
options: {
|
|
54
|
+
detailedView: true,
|
|
55
|
+
miniSearch: {
|
|
56
|
+
searchOptions: {
|
|
57
|
+
fuzzy: 0.2,
|
|
58
|
+
prefix: true,
|
|
59
|
+
boost: { title: 4, text: 2, titles: 1 },
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
// Top navigation (minimal: 4 items)
|
|
66
|
+
nav: [
|
|
67
|
+
{ text: "← Fontist.org", link: "https://www.fontist.org" },
|
|
68
|
+
{ text: "Guide", link: "/guide/" },
|
|
69
|
+
{ text: "CLI", link: "/cli/" },
|
|
70
|
+
{ text: "API", link: "/api/" },
|
|
71
|
+
{ text: "Fontist", link: "https://www.fontist.org/fontist/", target: "_self" },
|
|
72
|
+
{ text: "Formulas", link: "https://www.fontist.org/formulas/", target: "_self" },
|
|
73
|
+
],
|
|
74
|
+
|
|
75
|
+
// Sidebar configuration
|
|
76
|
+
sidebar: {
|
|
77
|
+
"/guide/": [
|
|
78
|
+
{
|
|
79
|
+
text: "Getting Started",
|
|
80
|
+
items: [
|
|
81
|
+
{ text: "Introduction", link: "/guide/" },
|
|
82
|
+
{ text: "Installation", link: "/guide/installation" },
|
|
83
|
+
{ text: "Quick Start", link: "/guide/quick-start" },
|
|
84
|
+
],
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
text: "CLI Reference",
|
|
88
|
+
collapsed: true,
|
|
89
|
+
items: [
|
|
90
|
+
{ text: "Overview", link: "/guide/cli/" },
|
|
91
|
+
{ text: "convert", link: "/guide/cli/convert" },
|
|
92
|
+
{ text: "info", link: "/guide/cli/info" },
|
|
93
|
+
{ text: "validate", link: "/guide/cli/validate" },
|
|
94
|
+
{ text: "subset", link: "/guide/cli/subset" },
|
|
95
|
+
{ text: "pack/unpack", link: "/guide/cli/pack" },
|
|
96
|
+
{ text: "export", link: "/guide/cli/export" },
|
|
97
|
+
],
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
text: "Font Formats",
|
|
101
|
+
collapsed: true,
|
|
102
|
+
items: [
|
|
103
|
+
{ text: "Overview", link: "/guide/formats/" },
|
|
104
|
+
{ text: "TrueType (TTF)", link: "/guide/formats/ttf" },
|
|
105
|
+
{ text: "OpenType (OTF)", link: "/guide/formats/otf" },
|
|
106
|
+
{ text: "Type 1 (PFB/PFA)", link: "/guide/formats/type1" },
|
|
107
|
+
{ text: "WOFF & WOFF2", link: "/guide/formats/woff" },
|
|
108
|
+
{ text: "Collections (TTC/OTC)", link: "/guide/formats/collections" },
|
|
109
|
+
{ text: "Apple dfont", link: "/guide/formats/dfont" },
|
|
110
|
+
{ text: "SVG Fonts", link: "/guide/formats/svg" },
|
|
111
|
+
],
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
text: "Conversion Guide",
|
|
115
|
+
collapsed: true,
|
|
116
|
+
items: [
|
|
117
|
+
{ text: "Overview", link: "/guide/conversion/" },
|
|
118
|
+
{ text: "TTF ↔ OTF", link: "/guide/conversion/ttf-otf" },
|
|
119
|
+
{ text: "Type 1 → Modern", link: "/guide/conversion/type1" },
|
|
120
|
+
{ text: "Web Formats", link: "/guide/conversion/web" },
|
|
121
|
+
{ text: "Collections", link: "/guide/conversion/collections" },
|
|
122
|
+
{ text: "Curve Conversion", link: "/guide/conversion/curves" },
|
|
123
|
+
{ text: "Options Reference", link: "/guide/conversion/options" },
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
text: "Validation",
|
|
128
|
+
collapsed: true,
|
|
129
|
+
items: [
|
|
130
|
+
{ text: "Overview", link: "/guide/validation/" },
|
|
131
|
+
{ text: "Validation Profiles", link: "/guide/validation/profiles" },
|
|
132
|
+
{ text: "Validation Helpers", link: "/guide/validation/helpers" },
|
|
133
|
+
{ text: "Custom Validators", link: "/guide/validation/custom" },
|
|
134
|
+
],
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
text: "Variable Fonts",
|
|
138
|
+
collapsed: true,
|
|
139
|
+
items: [
|
|
140
|
+
{ text: "Overview", link: "/guide/variable-fonts/" },
|
|
141
|
+
{ text: "Axes & Instances", link: "/guide/variable-fonts/axes" },
|
|
142
|
+
{ text: "Instance Generation", link: "/guide/variable-fonts/instances" },
|
|
143
|
+
{ text: "Format Conversion", link: "/guide/variable-fonts/conversion" },
|
|
144
|
+
{ text: "Named Instances", link: "/guide/variable-fonts/named-instances" },
|
|
145
|
+
{ text: "Static Fonts", link: "/guide/variable-fonts/static" },
|
|
146
|
+
{ text: "Advanced Topics", link: "/guide/variable-fonts/advanced" },
|
|
147
|
+
],
|
|
148
|
+
},
|
|
149
|
+
{
|
|
150
|
+
text: "Font Hinting",
|
|
151
|
+
collapsed: true,
|
|
152
|
+
items: [
|
|
153
|
+
{ text: "Overview", link: "/guide/hinting/" },
|
|
154
|
+
{ text: "TrueType Hinting", link: "/guide/hinting/truetype" },
|
|
155
|
+
{ text: "PostScript Hinting", link: "/guide/hinting/postscript" },
|
|
156
|
+
{ text: "Hint Conversion", link: "/guide/hinting/conversion" },
|
|
157
|
+
{ text: "Autohint", link: "/guide/hinting/autohint" },
|
|
158
|
+
],
|
|
159
|
+
},
|
|
160
|
+
{
|
|
161
|
+
text: "Color Fonts",
|
|
162
|
+
collapsed: true,
|
|
163
|
+
items: [
|
|
164
|
+
{ text: "Overview", link: "/guide/color-fonts/" },
|
|
165
|
+
{ text: "COLR/CPAL", link: "/guide/color-fonts/colr-cpal" },
|
|
166
|
+
{ text: "sbix & CBDT", link: "/guide/color-fonts/bitmaps" },
|
|
167
|
+
{ text: "SVG Color", link: "/guide/color-fonts/svg" },
|
|
168
|
+
],
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
text: "Migration Guides",
|
|
172
|
+
collapsed: true,
|
|
173
|
+
items: [
|
|
174
|
+
{ text: "Overview", link: "/guide/migrations/" },
|
|
175
|
+
{ text: "From fonttools (Python)", link: "/guide/migrations/fonttools" },
|
|
176
|
+
{ text: "From extract_ttc", link: "/guide/migrations/extract-ttc" },
|
|
177
|
+
{ text: "From otfinfo", link: "/guide/migrations/otfinfo" },
|
|
178
|
+
{ text: "From Font-Validator", link: "/guide/migrations/font-validator" },
|
|
179
|
+
],
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
text: "Feature Comparisons",
|
|
183
|
+
collapsed: true,
|
|
184
|
+
items: [
|
|
185
|
+
{ text: "Overview", link: "/guide/comparisons/" },
|
|
186
|
+
{ text: "vs fonttools", link: "/guide/comparisons/fonttools" },
|
|
187
|
+
{ text: "vs lcdf-typetools", link: "/guide/comparisons/lcdf-typetools" },
|
|
188
|
+
{ text: "vs Font-Validator", link: "/guide/comparisons/font-validator" },
|
|
189
|
+
],
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
text: "Advanced Topics",
|
|
193
|
+
collapsed: true,
|
|
194
|
+
items: [
|
|
195
|
+
{ text: "Universal Outline Model", link: "/guide/universal-outline" },
|
|
196
|
+
],
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
text: "Contributing",
|
|
200
|
+
collapsed: true,
|
|
201
|
+
items: [
|
|
202
|
+
{ text: "Contributing Guide", link: "/guide/contributing" },
|
|
203
|
+
],
|
|
204
|
+
},
|
|
205
|
+
],
|
|
206
|
+
"/cli/": [
|
|
207
|
+
{
|
|
208
|
+
text: "CLI Reference",
|
|
209
|
+
items: [
|
|
210
|
+
{ text: "Overview", link: "/cli/" },
|
|
211
|
+
],
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
text: "Font Information",
|
|
215
|
+
collapsed: true,
|
|
216
|
+
items: [
|
|
217
|
+
{ text: "info", link: "/cli/info" },
|
|
218
|
+
{ text: "ls", link: "/cli/ls" },
|
|
219
|
+
{ text: "tables", link: "/cli/tables" },
|
|
220
|
+
{ text: "glyphs", link: "/cli/glyphs" },
|
|
221
|
+
{ text: "unicode", link: "/cli/unicode" },
|
|
222
|
+
{ text: "scripts", link: "/cli/scripts" },
|
|
223
|
+
{ text: "features", link: "/cli/features" },
|
|
224
|
+
{ text: "variable", link: "/cli/variable" },
|
|
225
|
+
{ text: "optical-size", link: "/cli/optical-size" },
|
|
226
|
+
],
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
text: "Font Operations",
|
|
230
|
+
collapsed: true,
|
|
231
|
+
items: [
|
|
232
|
+
{ text: "convert", link: "/cli/convert" },
|
|
233
|
+
{ text: "subset", link: "/cli/subset" },
|
|
234
|
+
{ text: "validate", link: "/cli/validate" },
|
|
235
|
+
{ text: "instance", link: "/cli/instance" },
|
|
236
|
+
{ text: "export", link: "/cli/export" },
|
|
237
|
+
{ text: "dump-table", link: "/cli/dump-table" },
|
|
238
|
+
],
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
text: "Collection Operations",
|
|
242
|
+
collapsed: true,
|
|
243
|
+
items: [
|
|
244
|
+
{ text: "pack/unpack", link: "/cli/pack" },
|
|
245
|
+
],
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
text: "Utilities",
|
|
249
|
+
collapsed: true,
|
|
250
|
+
items: [
|
|
251
|
+
{ text: "version", link: "/cli/version" },
|
|
252
|
+
],
|
|
253
|
+
},
|
|
254
|
+
],
|
|
255
|
+
"/api/": [
|
|
256
|
+
{
|
|
257
|
+
text: "API Reference",
|
|
258
|
+
items: [
|
|
259
|
+
{ text: "Overview", link: "/api/" },
|
|
260
|
+
],
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
text: "Core Classes",
|
|
264
|
+
collapsed: true,
|
|
265
|
+
items: [
|
|
266
|
+
{ text: "FontLoader", link: "/api/font-loader" },
|
|
267
|
+
{ text: "FontWriter", link: "/api/font-writer" },
|
|
268
|
+
{ text: "ConversionOptions", link: "/api/conversion-options" },
|
|
269
|
+
{ text: "SfntFont", link: "/api/sfnt-font" },
|
|
270
|
+
{ text: "Type1Font", link: "/api/type1-font" },
|
|
271
|
+
],
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
text: "Converters",
|
|
275
|
+
collapsed: true,
|
|
276
|
+
items: [
|
|
277
|
+
{ text: "OutlineConverter", link: "/api/converters/outline-converter" },
|
|
278
|
+
{ text: "CurveConverter", link: "/api/converters/curve-converter" },
|
|
279
|
+
{ text: "HintConverter", link: "/api/converters/hint-converter" },
|
|
280
|
+
],
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
text: "Validators",
|
|
284
|
+
collapsed: true,
|
|
285
|
+
items: [
|
|
286
|
+
{ text: "FontValidator", link: "/api/validators/font-validator" },
|
|
287
|
+
{ text: "ValidationProfile", link: "/api/validators/profile" },
|
|
288
|
+
{ text: "ValidationHelper", link: "/api/validators/helper" },
|
|
289
|
+
],
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
text: "Models",
|
|
293
|
+
collapsed: true,
|
|
294
|
+
items: [
|
|
295
|
+
{ text: "Glyph", link: "/api/models/glyph" },
|
|
296
|
+
{ text: "GlyphAccessor", link: "/api/models/glyph-accessor" },
|
|
297
|
+
{ text: "TableAnalyzer", link: "/api/models/table-analyzer" },
|
|
298
|
+
],
|
|
299
|
+
},
|
|
300
|
+
],
|
|
301
|
+
},
|
|
302
|
+
|
|
303
|
+
socialLinks: [
|
|
304
|
+
{ icon: "github", link: "https://github.com/fontist/fontisan" },
|
|
305
|
+
],
|
|
306
|
+
|
|
307
|
+
footer: {
|
|
308
|
+
message: 'Fontisan is a [Ribose](https://open.ribose.com/) project',
|
|
309
|
+
copyright: `Copyright © 2026 Ribose Group Inc. All rights reserved.`,
|
|
310
|
+
},
|
|
311
|
+
|
|
312
|
+
editLink: {
|
|
313
|
+
pattern: "https://github.com/fontist/fontisan/edit/main/docs/:path",
|
|
314
|
+
text: "Edit this page on GitHub",
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
});
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="api-method">
|
|
3
|
+
<div class="method-header">
|
|
4
|
+
<code class="method-signature">
|
|
5
|
+
<span class="method-name">{{ name }}</span
|
|
6
|
+
><span class="method-params"
|
|
7
|
+
>({{ params.map((p) => p.name).join(", ") }})</span
|
|
8
|
+
>
|
|
9
|
+
</code>
|
|
10
|
+
<span v-if="returns" class="method-returns"> → {{ returns }}</span>
|
|
11
|
+
</div>
|
|
12
|
+
<p v-if="description" class="method-description">{{ description }}</p>
|
|
13
|
+
<div v-if="params.length" class="method-params-list">
|
|
14
|
+
<h4>Parameters</h4>
|
|
15
|
+
<ul>
|
|
16
|
+
<li v-for="param in params" :key="param.name">
|
|
17
|
+
<code>{{ param.name }}</code>
|
|
18
|
+
<span v-if="param.type" class="param-type">: {{ param.type }}</span>
|
|
19
|
+
<span v-if="param.required" class="param-required">*</span>
|
|
20
|
+
<span v-if="param.description" class="param-desc"
|
|
21
|
+
>— {{ param.description }}</span
|
|
22
|
+
>
|
|
23
|
+
</li>
|
|
24
|
+
</ul>
|
|
25
|
+
</div>
|
|
26
|
+
<div v-if="example" class="method-example">
|
|
27
|
+
<h4>Example</h4>
|
|
28
|
+
<pre><code :class="`language-${exampleLang}`">{{ example }}</code></pre>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</template>
|
|
32
|
+
|
|
33
|
+
<script setup lang="ts">
|
|
34
|
+
interface Param {
|
|
35
|
+
name: string;
|
|
36
|
+
type?: string;
|
|
37
|
+
required?: boolean;
|
|
38
|
+
description?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
defineProps<{
|
|
42
|
+
name: string;
|
|
43
|
+
params?: Param[];
|
|
44
|
+
returns?: string;
|
|
45
|
+
description?: string;
|
|
46
|
+
example?: string;
|
|
47
|
+
exampleLang?: string;
|
|
48
|
+
}>();
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<style scoped>
|
|
52
|
+
.api-method {
|
|
53
|
+
margin: 1.5rem 0;
|
|
54
|
+
padding: 1rem;
|
|
55
|
+
border: 1px solid var(--vp-c-divider);
|
|
56
|
+
border-radius: 8px;
|
|
57
|
+
background: var(--vp-c-bg-soft);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.method-header {
|
|
61
|
+
display: flex;
|
|
62
|
+
align-items: center;
|
|
63
|
+
gap: 0.5rem;
|
|
64
|
+
flex-wrap: wrap;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.method-signature {
|
|
68
|
+
font-size: 1rem;
|
|
69
|
+
font-weight: 500;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.method-name {
|
|
73
|
+
color: var(--vp-c-brand-1);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.method-params {
|
|
77
|
+
color: var(--vp-c-text-2);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.method-returns {
|
|
81
|
+
color: var(--vp-c-text-2);
|
|
82
|
+
font-size: 0.9rem;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.method-description {
|
|
86
|
+
margin: 0.75rem 0 0;
|
|
87
|
+
color: var(--vp-c-text-2);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.method-params-list h4,
|
|
91
|
+
.method-example h4 {
|
|
92
|
+
margin: 1rem 0 0.5rem;
|
|
93
|
+
font-size: 0.85rem;
|
|
94
|
+
font-weight: 600;
|
|
95
|
+
color: var(--vp-c-text-1);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.method-params-list ul {
|
|
99
|
+
margin: 0;
|
|
100
|
+
padding-left: 1.5rem;
|
|
101
|
+
list-style: disc;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.method-params-list li {
|
|
105
|
+
margin: 0.25rem 0;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.param-type {
|
|
109
|
+
color: var(--vp-c-text-3);
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.param-required {
|
|
113
|
+
color: var(--vp-c-danger-1);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.param-desc {
|
|
117
|
+
color: var(--vp-c-text-2);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.method-example pre {
|
|
121
|
+
margin: 0.5rem 0;
|
|
122
|
+
padding: 1rem;
|
|
123
|
+
background: var(--vp-c-bg-alt);
|
|
124
|
+
border-radius: 6px;
|
|
125
|
+
overflow-x: auto;
|
|
126
|
+
}
|
|
127
|
+
</style>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span :class="['badge', type]">
|
|
3
|
+
<slot />
|
|
4
|
+
</span>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script setup lang="ts">
|
|
8
|
+
defineProps<{
|
|
9
|
+
type?: "tip" | "warning" | "danger" | "info" | "pure-ruby";
|
|
10
|
+
}>();
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<style scoped>
|
|
14
|
+
.badge {
|
|
15
|
+
display: inline-flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
padding: 0.125rem 0.5rem;
|
|
18
|
+
border-radius: 9999px;
|
|
19
|
+
font-size: 0.75rem;
|
|
20
|
+
font-weight: 600;
|
|
21
|
+
line-height: 1.25rem;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.tip {
|
|
25
|
+
background-color: var(--vp-c-brand-soft);
|
|
26
|
+
color: var(--vp-c-brand-1);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.warning {
|
|
30
|
+
background-color: rgba(255, 197, 61, 0.14);
|
|
31
|
+
color: var(--vp-c-warning-1);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.danger {
|
|
35
|
+
background-color: rgba(244, 63, 94, 0.14);
|
|
36
|
+
color: var(--vp-c-danger-1);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.info {
|
|
40
|
+
background-color: rgba(96, 165, 250, 0.14);
|
|
41
|
+
color: var(--vp-c-info-1);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.pure-ruby {
|
|
45
|
+
background: linear-gradient(135deg, var(--fontist-rose), #d4718a);
|
|
46
|
+
color: white;
|
|
47
|
+
font-weight: 700;
|
|
48
|
+
text-transform: uppercase;
|
|
49
|
+
letter-spacing: 0.05em;
|
|
50
|
+
}
|
|
51
|
+
</style>
|