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
data/docs/package.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
{
|
|
2
|
+
"scripts": {
|
|
3
|
+
"dev": "vitepress dev",
|
|
4
|
+
"build": "vitepress build",
|
|
5
|
+
"preview": "vitepress preview",
|
|
6
|
+
"format": "prettier -w ."
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"devDependencies": {
|
|
10
|
+
"@types/node": "^25.4.0",
|
|
11
|
+
"prettier": "^3.8.1",
|
|
12
|
+
"typescript": "^5.9.3",
|
|
13
|
+
"vitepress": "^1.6.4"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" id="uuid-c6d7bb0b-ce20-4c4f-b0df-e25e79a561a7" viewBox="0 0 500 500" width="500" height="500"><path d="M64.43,140.29h67.44v13.2h-48.96v180h48.96v13.2h-67.44v-206.4Z" style="fill:#4d4b54;"></path><path d="M352.67,333.5h48.96v-180h-48.96v-13.2h67.44v206.4h-67.44v-13.2Z" style="fill:#4d4b54;"></path><path d="M237.77,169.8c4.32-20.16,8.64-39.6,16.92-54.36,9.36-16.92,24.12-33.48,55.08-33.48,21.96,0,34.2,10.8,34.2,26.28,0,10.44-6.84,15.84-14.4,15.84-9.72,0-13.32-6.48-14.4-14.04-1.44-9-2.16-17.64-10.8-17.64-18.36,0-27.36,21.24-32.76,51.84l-4.32,25.56h34.2l-2.16,14.76h-33.84l-20.52,122.76c-5.04,30.96-21.6,111.6-70.92,111.6-23.04,0-32.04-13.32-32.04-25.92,0-10.08,5.04-17.64,14.4-17.64,21.6,0,9.72,32.04,23.4,32.04,19.08,0,28.44-59.04,32.4-82.8l23.4-140.04h-30.24l1.44-14.76h30.96Z" style="fill:#bf4e6a;"></path></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><svg id="uuid-5b0c2658-028c-4702-accc-5ed4e2e91676" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2100.48 500"><path d="M257.61,451.33c-14.44,6.96-31.78,5.55-41.96-7.84L67.48,248.75c-5.62-7.38-6.35-18.76-.56-25.73l75.41-90.8c3.17-3.82,7.58-5.34,12.06-7.47l160.97-76.62c14.33-6.82,30.68-3.53,42.04,7.07l105.12,142.11c2.69,5.58,5.13,10.27,8.53,15.28l55.82,82.24c5.37,7.91,6.05,23.69-4.06,28.56l-265.21,127.93ZM287.03,310.96l161.6-76.96c11.16-5.32,21.54-22.67,13.21-34.01l-105.49-143.66c-11.5-10.31-27.05-13.14-41.14-6.4l-166.89,79.87c-13.23,6.33-14.59,25.94-6.48,36.81l97.77,131.09c11.25,15.09,29.74,21.66,47.42,13.24ZM232.38,452.15c6.57,2.92,14.18,2.5,21.22-.89l267.88-128.95c8.75-4.21,9.43-18.42,4.56-25.6l-59.66-88.07c-1.3,13.05-7.4,22.31-18.52,27.6l-157.65,75.1c-9.63,4.59-18.53,5.83-29.47,4.16-6.26-3.25-13.52-5.43-18.2-11.67l-100.41-133.93c-6.12-8.16-7.99-15.97-6.35-27.06l-67.77,81.52c-5.01,6.03-4.38,16.57.54,23.04l148.59,195.3c3.88,5.09,9.36,7.96,15.25,9.45Z" style="fill:#676565;"/><path d="M287.03,310.96c-17.68,8.42-36.17,1.85-47.42-13.24l-97.77-131.09c-8.11-10.88-6.75-30.48,6.48-36.81l166.89-79.87c14.09-6.74,29.64-3.91,41.14,6.4l105.49,143.66c8.33,11.34-2.05,28.69-13.21,34.01l-161.6,76.96Z" style="fill:#e1dfd2;"/><path d="M232.38,452.15c1.96-4.82,3.23-9.57,4.66-15.14l27.96-108.44c1.32-5.12-3.24-8.92-4.26-13.08,10.94,1.67,19.84.42,29.47-4.16l157.65-75.1c11.12-5.3,17.22-14.55,18.52-27.6l59.66,88.07c4.87,7.19,4.2,21.39-4.56,25.6l-267.88,128.95c-7.05,3.39-14.65,3.81-21.22.89Z" style="fill:#bebbac;"/><path d="M260.74,315.5c1.02,4.16,5.58,7.95,4.26,13.08l-27.96,108.44c-1.44,5.57-2.71,10.31-4.66,15.14-5.89-1.49-11.37-4.36-15.25-9.45L68.54,247.4c-4.92-6.47-5.55-17.01-.54-23.04l67.77-81.52c-1.64,11.09.23,18.9,6.35,27.06l100.41,133.93c4.68,6.24,11.94,8.42,18.2,11.67Z" style="fill:#dddac8;"/><polygon points="282.54 238.11 289.49 249.09 263.7 260.65 194.99 159.94 222.35 148.43 228.68 158.31 214.22 164.38 269.97 243.75 282.54 238.11" style="fill:#4d4b54;"/><polygon points="369.09 198.8 383.44 192.08 329.33 114.13 315.75 120.26 309.88 111.47 336 98.94 403.17 194.97 375.96 207.94 369.09 198.8" style="fill:#4d4b54;"/><path d="M292.11,160.41c9.03,15.98,17.59,31.55,25.28,48.2,7.43,16.09,16.44,39,4.36,54.53-5.6,7.2-13.93,10.74-22.32,9.15-3.42-.65-5.8-2.78-5.93-5.92-.12-2.78,1.59-5.75,4.93-6.61,2.7-.69,6.2-.29,8.92.64,5.17,1.76,9.75-.71,11.18-6.18,1.14-4.4.26-9.46-1.57-13.97-4.76-11.73-10.73-22.33-17-33.4l-21.8-38.5c-.25-.44-6.36-11.42-6.36-11.42-2.87-6.21-16.16-25.52-5.57-44.8,5.23-9.53,15.89-15.13,26.35-12.59,3.15.76,5.82,3.09,6.27,5.63.57,3.22-1.12,6.43-4.3,7.81-8,3.48-12.19-4.65-17.66-2.08-7.12,3.35-3.91,13.49-1.03,19.02l10.48,20.15c2.29,4.41,1.97,3.58,5.79,10.33Z" style="fill:#bf4e6a;"/><polygon points="266.05 179.81 260.64 171.75 310.91 148.47 315.92 155.96 266.05 179.81" style="fill:#bf4e6a;"/><path d="M703.28,220.77v144.67h-27.95v-144.67h-31.82v-24.08h31.99v-20.92c0-38.32,24.43-61.35,63.11-61.35,15.12,0,24.79,4.22,27.77,5.45l-3.34,22.68c-4.75-2.11-13.54-4.22-23.2-4.22-21.45,0-36.91,10.55-36.91,39.38v18.98h52.38v24.08h-52.03Z" style="fill:#bf4e6a;"/><path d="M863.6,193.17c51.33,0,89.65,38.5,89.65,87.89s-38.32,87.89-89.65,87.89-89.65-38.5-89.65-87.89,38.32-87.89,89.65-87.89ZM863.6,342.94c35.51,0,61.7-27.07,61.7-61.88s-26.19-61.88-61.7-61.88-61.7,27.07-61.7,61.88,26.19,61.88,61.7,61.88Z" style="fill:#bf4e6a;"/><path d="M1154.16,262.78v102.66h-27.77v-95.8c0-32.87-17.23-50.1-47.81-50.1-28.83,0-52.21,19.86-52.21,50.62v95.27h-27.95v-168.75h28.12v25.31c9.49-15.64,29.53-28.83,56.43-28.83,44.47,0,71.19,26.19,71.19,69.61Z" style="fill:#bf4e6a;"/><path d="M1246.27,220.77v91.23c0,22.15,11.95,31.82,29.18,31.82,9.14,0,20.74-1.76,28.83-4.75l3.69,24.08c-7.21,3.16-21.8,5.8-35.51,5.8-32.52,0-54.14-17.93-54.14-52.38v-95.8h-31.11v-24.08h31.29v-54.14h27.6v54.14h53.96v24.08h-53.79Z" style="fill:#bf4e6a;"/><path d="M1339.26,140.09c0-10.2,7.03-17.23,17.23-17.23s17.58,7.03,17.58,17.23-7.38,17.4-17.58,17.4-17.23-7.21-17.23-17.4ZM1342.6,196.69h27.95v168.75h-27.95v-168.75Z" style="fill:#4d4b54;"/><path d="M1496.76,270.34c33.57,6.68,51.33,21.8,51.33,48.16,0,32.87-26.19,50.45-67.15,50.45-23.91,0-47.46-4.75-63.28-12.66l3.87-24.96c15.47,7.91,37.09,12.66,57.48,12.66,27.07,0,41.66-8.44,41.66-24.08s-13.01-21.45-36.74-26.02l-21.97-4.39c-27.95-5.45-45.88-20.21-45.88-46.23,0-30.06,26.54-50.1,68.55-50.1,20.39,0,40.96,3.87,54.14,9.32l-3.52,24.43c-13.71-5.45-32.34-8.96-48.87-8.96-27.42,0-42.54,9.14-42.54,24.61,0,14.59,11.6,19.69,35.33,24.26l17.58,3.52Z" style="fill:#4d4b54;"/><path d="M1757.09,365.44h-27.95v-27.77c-12.66,18.11-34.8,31.29-65.04,31.29-48.34,0-85.08-37.62-85.08-88.42s36.74-87.36,85.08-87.36c30.23,0,52.38,13.01,65.04,31.11v-27.6h27.95v168.75ZM1606.8,280.54c0,34.98,24.96,63.11,60.12,63.11s62.58-28.12,62.58-63.11-26.54-62.05-62.58-62.05-60.12,27.25-60.12,62.05Z" style="fill:#4d4b54;"/><path d="M1971.19,262.78v102.66h-27.77v-95.8c0-32.87-17.23-50.1-47.81-50.1-28.83,0-52.21,19.86-52.21,50.62v95.27h-27.95v-168.75h28.12v25.31c9.49-15.64,29.53-28.83,56.43-28.83,44.47,0,71.19,26.19,71.19,69.61Z" style="fill:#4d4b54;"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?><svg id="uuid-bbbd5b2f-b286-4c12-becd-414fca1ebde9" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 500 500"><path d="M210.8,451.33c-14.44,6.96-31.78,5.55-41.96-7.84L20.67,248.75c-5.62-7.38-6.35-18.76-.56-25.73l75.41-90.8c3.17-3.82,7.58-5.34,12.06-7.47l160.97-76.62c14.33-6.82,30.68-3.53,42.04,7.07l105.12,142.11c2.69,5.58,5.13,10.27,8.53,15.28l55.82,82.24c5.37,7.91,6.05,23.69-4.06,28.56l-265.21,127.93ZM240.21,310.96l161.6-76.96c11.16-5.32,21.54-22.67,13.21-34.01l-105.49-143.66c-11.5-10.31-27.05-13.14-41.14-6.4l-166.89,79.87c-13.23,6.33-14.59,25.94-6.48,36.81l97.77,131.09c11.25,15.09,29.74,21.66,47.42,13.24ZM185.57,452.15c6.57,2.92,14.18,2.5,21.22-.89l267.88-128.95c8.75-4.21,9.43-18.42,4.56-25.6l-59.66-88.07c-1.3,13.05-7.4,22.31-18.52,27.6l-157.65,75.1c-9.63,4.59-18.53,5.83-29.47,4.16-6.26-3.25-13.52-5.43-18.2-11.67l-100.41-133.93c-6.12-8.16-7.99-15.97-6.35-27.06L21.19,224.36c-5.01,6.03-4.38,16.57.54,23.04l148.59,195.3c3.88,5.09,9.36,7.96,15.25,9.45Z" style="fill:#676565;"/><path d="M240.21,310.96c-17.68,8.42-36.17,1.85-47.42-13.24l-97.77-131.09c-8.11-10.88-6.75-30.48,6.48-36.81l166.89-79.87c14.09-6.74,29.64-3.91,41.14,6.4l105.49,143.66c8.33,11.34-2.05,28.69-13.21,34.01l-161.6,76.96Z" style="fill:#e1dfd2;"/><path d="M185.57,452.15c1.96-4.82,3.23-9.57,4.66-15.14l27.96-108.44c1.32-5.12-3.24-8.92-4.26-13.08,10.94,1.67,19.84.42,29.47-4.16l157.65-75.1c11.12-5.3,17.22-14.55,18.52-27.6l59.66,88.07c4.87,7.19,4.2,21.39-4.56,25.6l-267.88,128.95c-7.05,3.39-14.65,3.81-21.22.89Z" style="fill:#bebbac;"/><path d="M213.93,315.5c1.02,4.16,5.58,7.95,4.26,13.08l-27.96,108.44c-1.44,5.57-2.71,10.31-4.66,15.14-5.89-1.49-11.37-4.36-15.25-9.45L21.73,247.4c-4.92-6.47-5.55-17.01-.54-23.04l67.77-81.52c-1.64,11.09.23,18.9,6.35,27.06l100.41,133.93c4.68,6.24,11.94,8.42,18.2,11.67Z" style="fill:#dddac8;"/><polygon points="235.73 238.11 242.68 249.09 216.89 260.65 148.18 159.94 175.53 148.43 181.86 158.31 167.41 164.38 223.16 243.75 235.73 238.11" style="fill:#4d4b54;"/><polygon points="322.28 198.8 336.63 192.08 282.52 114.13 268.93 120.26 263.07 111.47 289.19 98.94 356.36 194.97 329.15 207.94 322.28 198.8" style="fill:#4d4b54;"/><path d="M245.3,160.41c9.03,15.98,17.59,31.55,25.28,48.2,7.43,16.09,16.44,39,4.36,54.53-5.6,7.2-13.93,10.74-22.32,9.15-3.42-.65-5.8-2.78-5.93-5.92-.12-2.78,1.59-5.75,4.93-6.61,2.7-.69,6.2-.29,8.92.64,5.17,1.76,9.75-.71,11.18-6.18,1.14-4.4.26-9.46-1.57-13.97-4.76-11.73-10.73-22.33-17-33.4l-21.8-38.5c-.25-.44-6.36-11.42-6.36-11.42-2.87-6.21-16.16-25.52-5.57-44.8,5.23-9.53,15.89-15.13,26.35-12.59,3.15.76,5.82,3.09,6.27,5.63.57,3.22-1.12,6.43-4.3,7.81-8,3.48-12.19-4.65-17.66-2.08-7.12,3.35-3.91,13.49-1.03,19.02l10.48,20.15c2.29,4.41,1.97,3.58,5.79,10.33Z" style="fill:#bf4e6a;"/><polygon points="219.23 179.81 213.82 171.75 264.09 148.47 269.11 155.96 219.23 179.81" style="fill:#bf4e6a;"/></svg>
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "MyWebSite",
|
|
3
|
+
"short_name": "MySite",
|
|
4
|
+
"icons": [
|
|
5
|
+
{
|
|
6
|
+
"src": "/web-app-manifest-192x192.png",
|
|
7
|
+
"sizes": "192x192",
|
|
8
|
+
"type": "image/png",
|
|
9
|
+
"purpose": "maskable"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"src": "/web-app-manifest-512x512.png",
|
|
13
|
+
"sizes": "512x512",
|
|
14
|
+
"type": "image/png",
|
|
15
|
+
"purpose": "maskable"
|
|
16
|
+
}
|
|
17
|
+
],
|
|
18
|
+
"theme_color": "#ffffff",
|
|
19
|
+
"background_color": "#ffffff",
|
|
20
|
+
"display": "standalone"
|
|
21
|
+
}
|
|
Binary file
|
|
Binary file
|
data/fontisan.gemspec
CHANGED
|
@@ -41,7 +41,7 @@ Gem::Specification.new do |spec|
|
|
|
41
41
|
spec.add_dependency "base64"
|
|
42
42
|
spec.add_dependency "bindata", "~> 2.5"
|
|
43
43
|
spec.add_dependency "brotli", "~> 0.5"
|
|
44
|
-
spec.add_dependency "lutaml-model", "~> 0.
|
|
44
|
+
spec.add_dependency "lutaml-model", "~> 0.8"
|
|
45
45
|
spec.add_dependency "nokogiri", "~> 1.16"
|
|
46
46
|
spec.add_dependency "thor", "~> 1.3"
|
|
47
47
|
end
|
data/lib/fontisan/sfnt_font.rb
CHANGED
|
@@ -169,7 +169,10 @@ module Fontisan
|
|
|
169
169
|
# @param font [SfntFont] Font instance to populate
|
|
170
170
|
# @return [SfntFont] The populated font instance
|
|
171
171
|
def self.load_lazy(path, font)
|
|
172
|
+
# rubocop:disable Security/Open -- Intentionally kept open for lazy loading
|
|
173
|
+
# Finalizer handles cleanup when object is GC'd
|
|
172
174
|
font.io_source = File.open(path, "rb")
|
|
175
|
+
# rubocop:enable Security/Open
|
|
173
176
|
font.setup_finalizer
|
|
174
177
|
font.io_source.rewind
|
|
175
178
|
font.read(font.io_source)
|
|
@@ -440,9 +443,7 @@ module Fontisan
|
|
|
440
443
|
#
|
|
441
444
|
# @return [Hash<String, SfntTable>] Hash mapping tag => SfntTable instance
|
|
442
445
|
def all_sfnt_tables
|
|
443
|
-
table_names.
|
|
444
|
-
hash[tag] = sfnt_table(tag)
|
|
445
|
-
end
|
|
446
|
+
table_names.to_h { |tag| [tag, sfnt_table(tag)] }
|
|
446
447
|
end
|
|
447
448
|
|
|
448
449
|
# Get parsed table instance
|
|
@@ -136,13 +136,13 @@ module Fontisan
|
|
|
136
136
|
normalized_coords = @axis_normalizer.normalize(user_coords)
|
|
137
137
|
region_scalars = @region_matcher.match(normalized_coords)
|
|
138
138
|
|
|
139
|
-
glyph_ids.
|
|
140
|
-
|
|
139
|
+
glyph_ids.to_h do |glyph_id|
|
|
140
|
+
[glyph_id, {
|
|
141
141
|
outline_deltas: @glyph_delta_processor&.apply_deltas(glyph_id,
|
|
142
142
|
region_scalars),
|
|
143
143
|
metric_deltas: @metric_delta_processor.apply_deltas(glyph_id,
|
|
144
144
|
region_scalars),
|
|
145
|
-
}
|
|
145
|
+
}]
|
|
146
146
|
end
|
|
147
147
|
end
|
|
148
148
|
|
data/lib/fontisan/version.rb
CHANGED
data/lib/fontisan.rb
CHANGED
|
@@ -33,10 +33,11 @@ require "bindata"
|
|
|
33
33
|
require "zlib"
|
|
34
34
|
require "stringio"
|
|
35
35
|
require "lutaml/model"
|
|
36
|
-
require "lutaml/model/xml_adapter/nokogiri_adapter"
|
|
37
36
|
|
|
38
37
|
# Configure lutaml-model to use Nokogiri adapter for XML serialization
|
|
39
|
-
Lutaml::Model::Config.
|
|
38
|
+
Lutaml::Model::Config.configure do |config|
|
|
39
|
+
config.xml_adapter_type = :nokogiri
|
|
40
|
+
end
|
|
40
41
|
|
|
41
42
|
# Core
|
|
42
43
|
require_relative "fontisan/version"
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fontisan
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.16
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ribose Inc.
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-02
|
|
11
|
+
date: 2026-05-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: base64
|
|
@@ -58,14 +58,14 @@ dependencies:
|
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: '0.
|
|
61
|
+
version: '0.8'
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: '0.
|
|
68
|
+
version: '0.8'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
70
|
name: nokogiri
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -117,6 +117,15 @@ files:
|
|
|
117
117
|
- README.adoc
|
|
118
118
|
- Rakefile
|
|
119
119
|
- benchmark/variation_quick_bench.rb
|
|
120
|
+
- docs/.gitignore
|
|
121
|
+
- docs/.vitepress/config.ts
|
|
122
|
+
- docs/.vitepress/theme/components/ApiMethod.vue
|
|
123
|
+
- docs/.vitepress/theme/components/Badge.vue
|
|
124
|
+
- docs/.vitepress/theme/components/FeatureComparison.vue
|
|
125
|
+
- docs/.vitepress/theme/components/HeroCodeBlock.vue
|
|
126
|
+
- docs/.vitepress/theme/components/WithinHero.vue
|
|
127
|
+
- docs/.vitepress/theme/index.ts
|
|
128
|
+
- docs/.vitepress/theme/style.css
|
|
120
129
|
- docs/APPLE_LEGACY_FONTS.adoc
|
|
121
130
|
- docs/COLLECTION_VALIDATION.adoc
|
|
122
131
|
- docs/COLOR_FONTS.adoc
|
|
@@ -127,6 +136,115 @@ files:
|
|
|
127
136
|
- docs/VALIDATION.adoc
|
|
128
137
|
- docs/VARIABLE_FONT_OPERATIONS.adoc
|
|
129
138
|
- docs/WOFF_WOFF2_FORMATS.adoc
|
|
139
|
+
- docs/api/conversion-options.md
|
|
140
|
+
- docs/api/converters/curve-converter.md
|
|
141
|
+
- docs/api/converters/hint-converter.md
|
|
142
|
+
- docs/api/converters/outline-converter.md
|
|
143
|
+
- docs/api/font-loader.md
|
|
144
|
+
- docs/api/font-writer.md
|
|
145
|
+
- docs/api/index.md
|
|
146
|
+
- docs/api/models/glyph-accessor.md
|
|
147
|
+
- docs/api/models/glyph.md
|
|
148
|
+
- docs/api/models/table-analyzer.md
|
|
149
|
+
- docs/api/sfnt-font.md
|
|
150
|
+
- docs/api/type1-font.md
|
|
151
|
+
- docs/api/validators/font-validator.md
|
|
152
|
+
- docs/api/validators/helper.md
|
|
153
|
+
- docs/api/validators/profile.md
|
|
154
|
+
- docs/cli/convert.md
|
|
155
|
+
- docs/cli/dump-table.md
|
|
156
|
+
- docs/cli/export.md
|
|
157
|
+
- docs/cli/features.md
|
|
158
|
+
- docs/cli/glyphs.md
|
|
159
|
+
- docs/cli/index.md
|
|
160
|
+
- docs/cli/info.md
|
|
161
|
+
- docs/cli/instance.md
|
|
162
|
+
- docs/cli/ls.md
|
|
163
|
+
- docs/cli/optical-size.md
|
|
164
|
+
- docs/cli/pack.md
|
|
165
|
+
- docs/cli/scripts.md
|
|
166
|
+
- docs/cli/subset.md
|
|
167
|
+
- docs/cli/tables.md
|
|
168
|
+
- docs/cli/unicode.md
|
|
169
|
+
- docs/cli/validate.md
|
|
170
|
+
- docs/cli/variable.md
|
|
171
|
+
- docs/cli/version.md
|
|
172
|
+
- docs/guide/cli/convert.md
|
|
173
|
+
- docs/guide/cli/export.md
|
|
174
|
+
- docs/guide/cli/index.md
|
|
175
|
+
- docs/guide/cli/info.md
|
|
176
|
+
- docs/guide/cli/pack.md
|
|
177
|
+
- docs/guide/cli/subset.md
|
|
178
|
+
- docs/guide/cli/validate.md
|
|
179
|
+
- docs/guide/color-fonts/bitmaps.md
|
|
180
|
+
- docs/guide/color-fonts/colr-cpal.md
|
|
181
|
+
- docs/guide/color-fonts/index.md
|
|
182
|
+
- docs/guide/color-fonts/svg.md
|
|
183
|
+
- docs/guide/color.md
|
|
184
|
+
- docs/guide/comparisons/font-validator.md
|
|
185
|
+
- docs/guide/comparisons/fonttools.md
|
|
186
|
+
- docs/guide/comparisons/index.md
|
|
187
|
+
- docs/guide/comparisons/lcdf-typetools.md
|
|
188
|
+
- docs/guide/contributing.md
|
|
189
|
+
- docs/guide/conversion.md
|
|
190
|
+
- docs/guide/conversion/collections.md
|
|
191
|
+
- docs/guide/conversion/curves.md
|
|
192
|
+
- docs/guide/conversion/index.md
|
|
193
|
+
- docs/guide/conversion/options.md
|
|
194
|
+
- docs/guide/conversion/ttf-otf.md
|
|
195
|
+
- docs/guide/conversion/type1.md
|
|
196
|
+
- docs/guide/conversion/web.md
|
|
197
|
+
- docs/guide/formats/collections.md
|
|
198
|
+
- docs/guide/formats/dfont.md
|
|
199
|
+
- docs/guide/formats/index.md
|
|
200
|
+
- docs/guide/formats/otf.md
|
|
201
|
+
- docs/guide/formats/svg.md
|
|
202
|
+
- docs/guide/formats/ttf.md
|
|
203
|
+
- docs/guide/formats/type1.md
|
|
204
|
+
- docs/guide/formats/woff.md
|
|
205
|
+
- docs/guide/hinting.md
|
|
206
|
+
- docs/guide/hinting/autohint.md
|
|
207
|
+
- docs/guide/hinting/conversion.md
|
|
208
|
+
- docs/guide/hinting/index.md
|
|
209
|
+
- docs/guide/hinting/postscript.md
|
|
210
|
+
- docs/guide/hinting/truetype.md
|
|
211
|
+
- docs/guide/index.md
|
|
212
|
+
- docs/guide/installation.md
|
|
213
|
+
- docs/guide/migrations/extract-ttc.md
|
|
214
|
+
- docs/guide/migrations/font-validator.md
|
|
215
|
+
- docs/guide/migrations/fonttools.md
|
|
216
|
+
- docs/guide/migrations/index.md
|
|
217
|
+
- docs/guide/migrations/otfinfo.md
|
|
218
|
+
- docs/guide/quick-start.md
|
|
219
|
+
- docs/guide/type1.md
|
|
220
|
+
- docs/guide/universal-outline.md
|
|
221
|
+
- docs/guide/validation.md
|
|
222
|
+
- docs/guide/validation/custom.md
|
|
223
|
+
- docs/guide/validation/helpers.md
|
|
224
|
+
- docs/guide/validation/index.md
|
|
225
|
+
- docs/guide/validation/profiles.md
|
|
226
|
+
- docs/guide/variable-fonts/advanced.md
|
|
227
|
+
- docs/guide/variable-fonts/axes.md
|
|
228
|
+
- docs/guide/variable-fonts/conversion.md
|
|
229
|
+
- docs/guide/variable-fonts/index.md
|
|
230
|
+
- docs/guide/variable-fonts/instances.md
|
|
231
|
+
- docs/guide/variable-fonts/named-instances.md
|
|
232
|
+
- docs/guide/variable-fonts/static.md
|
|
233
|
+
- docs/guide/variable.md
|
|
234
|
+
- docs/guide/woff.md
|
|
235
|
+
- docs/index.md
|
|
236
|
+
- docs/lychee.toml
|
|
237
|
+
- docs/package-lock.json
|
|
238
|
+
- docs/package.json
|
|
239
|
+
- docs/public/apple-touch-icon.png
|
|
240
|
+
- docs/public/favicon-96x96.png
|
|
241
|
+
- docs/public/favicon.ico
|
|
242
|
+
- docs/public/favicon.svg
|
|
243
|
+
- docs/public/logo-full.svg
|
|
244
|
+
- docs/public/logo.svg
|
|
245
|
+
- docs/public/site.webmanifest
|
|
246
|
+
- docs/public/web-app-manifest-192x192.png
|
|
247
|
+
- docs/public/web-app-manifest-512x512.png
|
|
130
248
|
- exe/fontisan
|
|
131
249
|
- fontisan.gemspec
|
|
132
250
|
- lib/fontisan.rb
|