fontconv 0.0.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.
Files changed (355) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +71 -0
  3. package/esm/_dnt.shims.d.ts +5 -0
  4. package/esm/_dnt.shims.js +61 -0
  5. package/esm/deps/deno.land/std@0.221.0/assert/assert.d.ts +12 -0
  6. package/esm/deps/deno.land/std@0.221.0/assert/assert.js +18 -0
  7. package/esm/deps/deno.land/std@0.221.0/assert/assertion_error.d.ts +14 -0
  8. package/esm/deps/deno.land/std@0.221.0/assert/assertion_error.js +18 -0
  9. package/esm/deps/deno.land/std@0.221.0/path/_common/assert_path.d.ts +1 -0
  10. package/esm/deps/deno.land/std@0.221.0/path/_common/assert_path.js +7 -0
  11. package/esm/deps/deno.land/std@0.221.0/path/_common/basename.d.ts +3 -0
  12. package/esm/deps/deno.land/std@0.221.0/path/_common/basename.js +40 -0
  13. package/esm/deps/deno.land/std@0.221.0/path/_common/common.d.ts +1 -0
  14. package/esm/deps/deno.land/std@0.221.0/path/_common/common.js +23 -0
  15. package/esm/deps/deno.land/std@0.221.0/path/_common/constants.d.ts +39 -0
  16. package/esm/deps/deno.land/std@0.221.0/path/_common/constants.js +46 -0
  17. package/esm/deps/deno.land/std@0.221.0/path/_common/dirname.d.ts +1 -0
  18. package/esm/deps/deno.land/std@0.221.0/path/_common/dirname.js +8 -0
  19. package/esm/deps/deno.land/std@0.221.0/path/_common/format.d.ts +3 -0
  20. package/esm/deps/deno.land/std@0.221.0/path/_common/format.js +19 -0
  21. package/esm/deps/deno.land/std@0.221.0/path/_common/from_file_url.d.ts +2 -0
  22. package/esm/deps/deno.land/std@0.221.0/path/_common/from_file_url.js +9 -0
  23. package/esm/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.d.ts +28 -0
  24. package/esm/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.js +237 -0
  25. package/esm/deps/deno.land/std@0.221.0/path/_common/normalize.d.ts +1 -0
  26. package/esm/deps/deno.land/std@0.221.0/path/_common/normalize.js +8 -0
  27. package/esm/deps/deno.land/std@0.221.0/path/_common/normalize_string.d.ts +1 -0
  28. package/esm/deps/deno.land/std@0.221.0/path/_common/normalize_string.js +77 -0
  29. package/esm/deps/deno.land/std@0.221.0/path/_common/relative.d.ts +1 -0
  30. package/esm/deps/deno.land/std@0.221.0/path/_common/relative.js +9 -0
  31. package/esm/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.d.ts +1 -0
  32. package/esm/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.js +19 -0
  33. package/esm/deps/deno.land/std@0.221.0/path/_common/to_file_url.d.ts +1 -0
  34. package/esm/deps/deno.land/std@0.221.0/path/_common/to_file_url.js +15 -0
  35. package/esm/deps/deno.land/std@0.221.0/path/_interface.d.ts +38 -0
  36. package/esm/deps/deno.land/std@0.221.0/path/_interface.js +3 -0
  37. package/esm/deps/deno.land/std@0.221.0/path/_os.d.ts +3 -0
  38. package/esm/deps/deno.land/std@0.221.0/path/_os.js +18 -0
  39. package/esm/deps/deno.land/std@0.221.0/path/basename.d.ts +17 -0
  40. package/esm/deps/deno.land/std@0.221.0/path/basename.js +26 -0
  41. package/esm/deps/deno.land/std@0.221.0/path/common.d.ts +13 -0
  42. package/esm/deps/deno.land/std@0.221.0/path/common.js +19 -0
  43. package/esm/deps/deno.land/std@0.221.0/path/constants.d.ts +3 -0
  44. package/esm/deps/deno.land/std@0.221.0/path/constants.js +6 -0
  45. package/esm/deps/deno.land/std@0.221.0/path/dirname.d.ts +5 -0
  46. package/esm/deps/deno.land/std@0.221.0/path/dirname.js +12 -0
  47. package/esm/deps/deno.land/std@0.221.0/path/extname.d.ts +6 -0
  48. package/esm/deps/deno.land/std@0.221.0/path/extname.js +13 -0
  49. package/esm/deps/deno.land/std@0.221.0/path/format.d.ts +8 -0
  50. package/esm/deps/deno.land/std@0.221.0/path/format.js +14 -0
  51. package/esm/deps/deno.land/std@0.221.0/path/from_file_url.d.ts +18 -0
  52. package/esm/deps/deno.land/std@0.221.0/path/from_file_url.js +24 -0
  53. package/esm/deps/deno.land/std@0.221.0/path/glob_to_regexp.d.ts +62 -0
  54. package/esm/deps/deno.land/std@0.221.0/path/glob_to_regexp.js +65 -0
  55. package/esm/deps/deno.land/std@0.221.0/path/is_absolute.d.ts +5 -0
  56. package/esm/deps/deno.land/std@0.221.0/path/is_absolute.js +12 -0
  57. package/esm/deps/deno.land/std@0.221.0/path/is_glob.d.ts +2 -0
  58. package/esm/deps/deno.land/std@0.221.0/path/is_glob.js +28 -0
  59. package/esm/deps/deno.land/std@0.221.0/path/join.d.ts +5 -0
  60. package/esm/deps/deno.land/std@0.221.0/path/join.js +12 -0
  61. package/esm/deps/deno.land/std@0.221.0/path/join_globs.d.ts +4 -0
  62. package/esm/deps/deno.land/std@0.221.0/path/join_globs.js +11 -0
  63. package/esm/deps/deno.land/std@0.221.0/path/mod.d.ts +56 -0
  64. package/esm/deps/deno.land/std@0.221.0/path/mod.js +60 -0
  65. package/esm/deps/deno.land/std@0.221.0/path/normalize.d.ts +7 -0
  66. package/esm/deps/deno.land/std@0.221.0/path/normalize.js +14 -0
  67. package/esm/deps/deno.land/std@0.221.0/path/normalize_glob.d.ts +4 -0
  68. package/esm/deps/deno.land/std@0.221.0/path/normalize_glob.js +11 -0
  69. package/esm/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
  70. package/esm/deps/deno.land/std@0.221.0/path/parse.js +24 -0
  71. package/esm/deps/deno.land/std@0.221.0/path/posix/_util.d.ts +1 -0
  72. package/esm/deps/deno.land/std@0.221.0/path/posix/_util.js +8 -0
  73. package/esm/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
  74. package/esm/deps/deno.land/std@0.221.0/path/posix/basename.js +27 -0
  75. package/esm/deps/deno.land/std@0.221.0/path/posix/common.d.ts +13 -0
  76. package/esm/deps/deno.land/std@0.221.0/path/posix/common.js +19 -0
  77. package/esm/deps/deno.land/std@0.221.0/path/posix/constants.d.ts +3 -0
  78. package/esm/deps/deno.land/std@0.221.0/path/posix/constants.js +5 -0
  79. package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
  80. package/esm/deps/deno.land/std@0.221.0/path/posix/dirname.js +45 -0
  81. package/esm/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
  82. package/esm/deps/deno.land/std@0.221.0/path/posix/extname.js +68 -0
  83. package/esm/deps/deno.land/std@0.221.0/path/posix/format.d.ts +6 -0
  84. package/esm/deps/deno.land/std@0.221.0/path/posix/format.js +11 -0
  85. package/esm/deps/deno.land/std@0.221.0/path/posix/from_file_url.d.ts +12 -0
  86. package/esm/deps/deno.land/std@0.221.0/path/posix/from_file_url.js +17 -0
  87. package/esm/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.d.ts +57 -0
  88. package/esm/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.js +69 -0
  89. package/esm/deps/deno.land/std@0.221.0/path/posix/is_absolute.d.ts +5 -0
  90. package/esm/deps/deno.land/std@0.221.0/path/posix/is_absolute.js +12 -0
  91. package/esm/deps/deno.land/std@0.221.0/path/posix/is_glob.d.ts +1 -0
  92. package/esm/deps/deno.land/std@0.221.0/path/posix/is_glob.js +3 -0
  93. package/esm/deps/deno.land/std@0.221.0/path/posix/join.d.ts +5 -0
  94. package/esm/deps/deno.land/std@0.221.0/path/posix/join.js +26 -0
  95. package/esm/deps/deno.land/std@0.221.0/path/posix/join_globs.d.ts +4 -0
  96. package/esm/deps/deno.land/std@0.221.0/path/posix/join_globs.js +26 -0
  97. package/esm/deps/deno.land/std@0.221.0/path/posix/mod.d.ts +38 -0
  98. package/esm/deps/deno.land/std@0.221.0/path/posix/mod.js +42 -0
  99. package/esm/deps/deno.land/std@0.221.0/path/posix/normalize.d.ts +7 -0
  100. package/esm/deps/deno.land/std@0.221.0/path/posix/normalize.js +25 -0
  101. package/esm/deps/deno.land/std@0.221.0/path/posix/normalize_glob.d.ts +4 -0
  102. package/esm/deps/deno.land/std@0.221.0/path/posix/normalize_glob.js +16 -0
  103. package/esm/deps/deno.land/std@0.221.0/path/posix/parse.d.ts +6 -0
  104. package/esm/deps/deno.land/std@0.221.0/path/posix/parse.js +98 -0
  105. package/esm/deps/deno.land/std@0.221.0/path/posix/relative.d.ts +7 -0
  106. package/esm/deps/deno.land/std@0.221.0/path/posix/relative.js +94 -0
  107. package/esm/deps/deno.land/std@0.221.0/path/posix/resolve.d.ts +5 -0
  108. package/esm/deps/deno.land/std@0.221.0/path/posix/resolve.js +48 -0
  109. package/esm/deps/deno.land/std@0.221.0/path/posix/to_file_url.d.ts +12 -0
  110. package/esm/deps/deno.land/std@0.221.0/path/posix/to_file_url.js +22 -0
  111. package/esm/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.d.ts +5 -0
  112. package/esm/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.js +10 -0
  113. package/esm/deps/deno.land/std@0.221.0/path/relative.d.ts +12 -0
  114. package/esm/deps/deno.land/std@0.221.0/path/relative.js +19 -0
  115. package/esm/deps/deno.land/std@0.221.0/path/resolve.d.ts +5 -0
  116. package/esm/deps/deno.land/std@0.221.0/path/resolve.js +14 -0
  117. package/esm/deps/deno.land/std@0.221.0/path/to_file_url.d.ts +18 -0
  118. package/esm/deps/deno.land/std@0.221.0/path/to_file_url.js +24 -0
  119. package/esm/deps/deno.land/std@0.221.0/path/to_namespaced_path.d.ts +5 -0
  120. package/esm/deps/deno.land/std@0.221.0/path/to_namespaced_path.js +14 -0
  121. package/esm/deps/deno.land/std@0.221.0/path/windows/_util.d.ts +3 -0
  122. package/esm/deps/deno.land/std@0.221.0/path/windows/_util.js +15 -0
  123. package/esm/deps/deno.land/std@0.221.0/path/windows/basename.d.ts +17 -0
  124. package/esm/deps/deno.land/std@0.221.0/path/windows/basename.js +39 -0
  125. package/esm/deps/deno.land/std@0.221.0/path/windows/common.d.ts +13 -0
  126. package/esm/deps/deno.land/std@0.221.0/path/windows/common.js +19 -0
  127. package/esm/deps/deno.land/std@0.221.0/path/windows/constants.d.ts +3 -0
  128. package/esm/deps/deno.land/std@0.221.0/path/windows/constants.js +5 -0
  129. package/esm/deps/deno.land/std@0.221.0/path/windows/dirname.d.ts +5 -0
  130. package/esm/deps/deno.land/std@0.221.0/path/windows/dirname.js +98 -0
  131. package/esm/deps/deno.land/std@0.221.0/path/windows/extname.d.ts +6 -0
  132. package/esm/deps/deno.land/std@0.221.0/path/windows/extname.js +68 -0
  133. package/esm/deps/deno.land/std@0.221.0/path/windows/format.d.ts +6 -0
  134. package/esm/deps/deno.land/std@0.221.0/path/windows/format.js +11 -0
  135. package/esm/deps/deno.land/std@0.221.0/path/windows/from_file_url.d.ts +14 -0
  136. package/esm/deps/deno.land/std@0.221.0/path/windows/from_file_url.js +26 -0
  137. package/esm/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.d.ts +57 -0
  138. package/esm/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.js +69 -0
  139. package/esm/deps/deno.land/std@0.221.0/path/windows/is_absolute.d.ts +5 -0
  140. package/esm/deps/deno.land/std@0.221.0/path/windows/is_absolute.js +27 -0
  141. package/esm/deps/deno.land/std@0.221.0/path/windows/is_glob.d.ts +1 -0
  142. package/esm/deps/deno.land/std@0.221.0/path/windows/is_glob.js +3 -0
  143. package/esm/deps/deno.land/std@0.221.0/path/windows/join.d.ts +5 -0
  144. package/esm/deps/deno.land/std@0.221.0/path/windows/join.js +72 -0
  145. package/esm/deps/deno.land/std@0.221.0/path/windows/join_globs.d.ts +4 -0
  146. package/esm/deps/deno.land/std@0.221.0/path/windows/join_globs.js +26 -0
  147. package/esm/deps/deno.land/std@0.221.0/path/windows/mod.d.ts +38 -0
  148. package/esm/deps/deno.land/std@0.221.0/path/windows/mod.js +42 -0
  149. package/esm/deps/deno.land/std@0.221.0/path/windows/normalize.d.ts +7 -0
  150. package/esm/deps/deno.land/std@0.221.0/path/windows/normalize.js +130 -0
  151. package/esm/deps/deno.land/std@0.221.0/path/windows/normalize_glob.d.ts +4 -0
  152. package/esm/deps/deno.land/std@0.221.0/path/windows/normalize_glob.js +16 -0
  153. package/esm/deps/deno.land/std@0.221.0/path/windows/parse.d.ts +6 -0
  154. package/esm/deps/deno.land/std@0.221.0/path/windows/parse.js +159 -0
  155. package/esm/deps/deno.land/std@0.221.0/path/windows/relative.d.ts +12 -0
  156. package/esm/deps/deno.land/std@0.221.0/path/windows/relative.js +121 -0
  157. package/esm/deps/deno.land/std@0.221.0/path/windows/resolve.d.ts +5 -0
  158. package/esm/deps/deno.land/std@0.221.0/path/windows/resolve.js +143 -0
  159. package/esm/deps/deno.land/std@0.221.0/path/windows/to_file_url.d.ts +14 -0
  160. package/esm/deps/deno.land/std@0.221.0/path/windows/to_file_url.js +31 -0
  161. package/esm/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.d.ts +5 -0
  162. package/esm/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.js +38 -0
  163. package/esm/fontconv/cli.d.ts +2 -0
  164. package/esm/fontconv/cli.js +36 -0
  165. package/esm/fontconv/mod.d.ts +10 -0
  166. package/esm/fontconv/mod.js +147 -0
  167. package/esm/fontconv/test.d.ts +1 -0
  168. package/esm/package.json +3 -0
  169. package/esm/test/bootstrap-icons.woff2 +0 -0
  170. package/esm/test/format-check.eot +0 -0
  171. package/esm/test/format-check.otf +0 -0
  172. package/esm/test/format-check.svg +25 -0
  173. package/esm/test/format-check.ttf +0 -0
  174. package/esm/test/format-check.woff +0 -0
  175. package/esm/test/format-check.woff2 +0 -0
  176. package/esm/test/material-icons.woff2 +0 -0
  177. package/esm/ttf2svg/mod.d.ts +9 -0
  178. package/esm/ttf2svg/mod.js +167 -0
  179. package/package.json +42 -0
  180. package/script/_dnt.shims.d.ts +5 -0
  181. package/script/_dnt.shims.js +65 -0
  182. package/script/deps/deno.land/std@0.221.0/assert/assert.d.ts +12 -0
  183. package/script/deps/deno.land/std@0.221.0/assert/assert.js +22 -0
  184. package/script/deps/deno.land/std@0.221.0/assert/assertion_error.d.ts +14 -0
  185. package/script/deps/deno.land/std@0.221.0/assert/assertion_error.js +22 -0
  186. package/script/deps/deno.land/std@0.221.0/path/_common/assert_path.d.ts +1 -0
  187. package/script/deps/deno.land/std@0.221.0/path/_common/assert_path.js +11 -0
  188. package/script/deps/deno.land/std@0.221.0/path/_common/basename.d.ts +3 -0
  189. package/script/deps/deno.land/std@0.221.0/path/_common/basename.js +46 -0
  190. package/script/deps/deno.land/std@0.221.0/path/_common/common.d.ts +1 -0
  191. package/script/deps/deno.land/std@0.221.0/path/_common/common.js +27 -0
  192. package/script/deps/deno.land/std@0.221.0/path/_common/constants.d.ts +39 -0
  193. package/script/deps/deno.land/std@0.221.0/path/_common/constants.js +49 -0
  194. package/script/deps/deno.land/std@0.221.0/path/_common/dirname.d.ts +1 -0
  195. package/script/deps/deno.land/std@0.221.0/path/_common/dirname.js +12 -0
  196. package/script/deps/deno.land/std@0.221.0/path/_common/format.d.ts +3 -0
  197. package/script/deps/deno.land/std@0.221.0/path/_common/format.js +24 -0
  198. package/script/deps/deno.land/std@0.221.0/path/_common/from_file_url.d.ts +2 -0
  199. package/script/deps/deno.land/std@0.221.0/path/_common/from_file_url.js +13 -0
  200. package/script/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.d.ts +28 -0
  201. package/script/deps/deno.land/std@0.221.0/path/_common/glob_to_reg_exp.js +241 -0
  202. package/script/deps/deno.land/std@0.221.0/path/_common/normalize.d.ts +1 -0
  203. package/script/deps/deno.land/std@0.221.0/path/_common/normalize.js +12 -0
  204. package/script/deps/deno.land/std@0.221.0/path/_common/normalize_string.d.ts +1 -0
  205. package/script/deps/deno.land/std@0.221.0/path/_common/normalize_string.js +81 -0
  206. package/script/deps/deno.land/std@0.221.0/path/_common/relative.d.ts +1 -0
  207. package/script/deps/deno.land/std@0.221.0/path/_common/relative.js +13 -0
  208. package/script/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.d.ts +1 -0
  209. package/script/deps/deno.land/std@0.221.0/path/_common/strip_trailing_separators.js +23 -0
  210. package/script/deps/deno.land/std@0.221.0/path/_common/to_file_url.d.ts +1 -0
  211. package/script/deps/deno.land/std@0.221.0/path/_common/to_file_url.js +19 -0
  212. package/script/deps/deno.land/std@0.221.0/path/_interface.d.ts +38 -0
  213. package/script/deps/deno.land/std@0.221.0/path/_interface.js +4 -0
  214. package/script/deps/deno.land/std@0.221.0/path/_os.d.ts +3 -0
  215. package/script/deps/deno.land/std@0.221.0/path/_os.js +44 -0
  216. package/script/deps/deno.land/std@0.221.0/path/basename.d.ts +17 -0
  217. package/script/deps/deno.land/std@0.221.0/path/basename.js +30 -0
  218. package/script/deps/deno.land/std@0.221.0/path/common.d.ts +13 -0
  219. package/script/deps/deno.land/std@0.221.0/path/common.js +23 -0
  220. package/script/deps/deno.land/std@0.221.0/path/constants.d.ts +3 -0
  221. package/script/deps/deno.land/std@0.221.0/path/constants.js +9 -0
  222. package/script/deps/deno.land/std@0.221.0/path/dirname.d.ts +5 -0
  223. package/script/deps/deno.land/std@0.221.0/path/dirname.js +16 -0
  224. package/script/deps/deno.land/std@0.221.0/path/extname.d.ts +6 -0
  225. package/script/deps/deno.land/std@0.221.0/path/extname.js +17 -0
  226. package/script/deps/deno.land/std@0.221.0/path/format.d.ts +8 -0
  227. package/script/deps/deno.land/std@0.221.0/path/format.js +18 -0
  228. package/script/deps/deno.land/std@0.221.0/path/from_file_url.d.ts +18 -0
  229. package/script/deps/deno.land/std@0.221.0/path/from_file_url.js +28 -0
  230. package/script/deps/deno.land/std@0.221.0/path/glob_to_regexp.d.ts +62 -0
  231. package/script/deps/deno.land/std@0.221.0/path/glob_to_regexp.js +69 -0
  232. package/script/deps/deno.land/std@0.221.0/path/is_absolute.d.ts +5 -0
  233. package/script/deps/deno.land/std@0.221.0/path/is_absolute.js +16 -0
  234. package/script/deps/deno.land/std@0.221.0/path/is_glob.d.ts +2 -0
  235. package/script/deps/deno.land/std@0.221.0/path/is_glob.js +32 -0
  236. package/script/deps/deno.land/std@0.221.0/path/join.d.ts +5 -0
  237. package/script/deps/deno.land/std@0.221.0/path/join.js +16 -0
  238. package/script/deps/deno.land/std@0.221.0/path/join_globs.d.ts +4 -0
  239. package/script/deps/deno.land/std@0.221.0/path/join_globs.js +15 -0
  240. package/script/deps/deno.land/std@0.221.0/path/mod.d.ts +56 -0
  241. package/script/deps/deno.land/std@0.221.0/path/mod.js +89 -0
  242. package/script/deps/deno.land/std@0.221.0/path/normalize.d.ts +7 -0
  243. package/script/deps/deno.land/std@0.221.0/path/normalize.js +18 -0
  244. package/script/deps/deno.land/std@0.221.0/path/normalize_glob.d.ts +4 -0
  245. package/script/deps/deno.land/std@0.221.0/path/normalize_glob.js +15 -0
  246. package/script/deps/deno.land/std@0.221.0/path/parse.d.ts +18 -0
  247. package/script/deps/deno.land/std@0.221.0/path/parse.js +28 -0
  248. package/script/deps/deno.land/std@0.221.0/path/posix/_util.d.ts +1 -0
  249. package/script/deps/deno.land/std@0.221.0/path/posix/_util.js +12 -0
  250. package/script/deps/deno.land/std@0.221.0/path/posix/basename.d.ts +17 -0
  251. package/script/deps/deno.land/std@0.221.0/path/posix/basename.js +31 -0
  252. package/script/deps/deno.land/std@0.221.0/path/posix/common.d.ts +13 -0
  253. package/script/deps/deno.land/std@0.221.0/path/posix/common.js +23 -0
  254. package/script/deps/deno.land/std@0.221.0/path/posix/constants.d.ts +3 -0
  255. package/script/deps/deno.land/std@0.221.0/path/posix/constants.js +8 -0
  256. package/script/deps/deno.land/std@0.221.0/path/posix/dirname.d.ts +14 -0
  257. package/script/deps/deno.land/std@0.221.0/path/posix/dirname.js +49 -0
  258. package/script/deps/deno.land/std@0.221.0/path/posix/extname.d.ts +15 -0
  259. package/script/deps/deno.land/std@0.221.0/path/posix/extname.js +72 -0
  260. package/script/deps/deno.land/std@0.221.0/path/posix/format.d.ts +6 -0
  261. package/script/deps/deno.land/std@0.221.0/path/posix/format.js +15 -0
  262. package/script/deps/deno.land/std@0.221.0/path/posix/from_file_url.d.ts +12 -0
  263. package/script/deps/deno.land/std@0.221.0/path/posix/from_file_url.js +21 -0
  264. package/script/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.d.ts +57 -0
  265. package/script/deps/deno.land/std@0.221.0/path/posix/glob_to_regexp.js +73 -0
  266. package/script/deps/deno.land/std@0.221.0/path/posix/is_absolute.d.ts +5 -0
  267. package/script/deps/deno.land/std@0.221.0/path/posix/is_absolute.js +16 -0
  268. package/script/deps/deno.land/std@0.221.0/path/posix/is_glob.d.ts +1 -0
  269. package/script/deps/deno.land/std@0.221.0/path/posix/is_glob.js +7 -0
  270. package/script/deps/deno.land/std@0.221.0/path/posix/join.d.ts +5 -0
  271. package/script/deps/deno.land/std@0.221.0/path/posix/join.js +30 -0
  272. package/script/deps/deno.land/std@0.221.0/path/posix/join_globs.d.ts +4 -0
  273. package/script/deps/deno.land/std@0.221.0/path/posix/join_globs.js +30 -0
  274. package/script/deps/deno.land/std@0.221.0/path/posix/mod.d.ts +38 -0
  275. package/script/deps/deno.land/std@0.221.0/path/posix/mod.js +58 -0
  276. package/script/deps/deno.land/std@0.221.0/path/posix/normalize.d.ts +7 -0
  277. package/script/deps/deno.land/std@0.221.0/path/posix/normalize.js +29 -0
  278. package/script/deps/deno.land/std@0.221.0/path/posix/normalize_glob.d.ts +4 -0
  279. package/script/deps/deno.land/std@0.221.0/path/posix/normalize_glob.js +20 -0
  280. package/script/deps/deno.land/std@0.221.0/path/posix/parse.d.ts +6 -0
  281. package/script/deps/deno.land/std@0.221.0/path/posix/parse.js +102 -0
  282. package/script/deps/deno.land/std@0.221.0/path/posix/relative.d.ts +7 -0
  283. package/script/deps/deno.land/std@0.221.0/path/posix/relative.js +98 -0
  284. package/script/deps/deno.land/std@0.221.0/path/posix/resolve.d.ts +5 -0
  285. package/script/deps/deno.land/std@0.221.0/path/posix/resolve.js +75 -0
  286. package/script/deps/deno.land/std@0.221.0/path/posix/to_file_url.d.ts +12 -0
  287. package/script/deps/deno.land/std@0.221.0/path/posix/to_file_url.js +26 -0
  288. package/script/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.d.ts +5 -0
  289. package/script/deps/deno.land/std@0.221.0/path/posix/to_namespaced_path.js +14 -0
  290. package/script/deps/deno.land/std@0.221.0/path/relative.d.ts +12 -0
  291. package/script/deps/deno.land/std@0.221.0/path/relative.js +23 -0
  292. package/script/deps/deno.land/std@0.221.0/path/resolve.d.ts +5 -0
  293. package/script/deps/deno.land/std@0.221.0/path/resolve.js +18 -0
  294. package/script/deps/deno.land/std@0.221.0/path/to_file_url.d.ts +18 -0
  295. package/script/deps/deno.land/std@0.221.0/path/to_file_url.js +28 -0
  296. package/script/deps/deno.land/std@0.221.0/path/to_namespaced_path.d.ts +5 -0
  297. package/script/deps/deno.land/std@0.221.0/path/to_namespaced_path.js +18 -0
  298. package/script/deps/deno.land/std@0.221.0/path/windows/_util.d.ts +3 -0
  299. package/script/deps/deno.land/std@0.221.0/path/windows/_util.js +21 -0
  300. package/script/deps/deno.land/std@0.221.0/path/windows/basename.d.ts +17 -0
  301. package/script/deps/deno.land/std@0.221.0/path/windows/basename.js +43 -0
  302. package/script/deps/deno.land/std@0.221.0/path/windows/common.d.ts +13 -0
  303. package/script/deps/deno.land/std@0.221.0/path/windows/common.js +23 -0
  304. package/script/deps/deno.land/std@0.221.0/path/windows/constants.d.ts +3 -0
  305. package/script/deps/deno.land/std@0.221.0/path/windows/constants.js +8 -0
  306. package/script/deps/deno.land/std@0.221.0/path/windows/dirname.d.ts +5 -0
  307. package/script/deps/deno.land/std@0.221.0/path/windows/dirname.js +102 -0
  308. package/script/deps/deno.land/std@0.221.0/path/windows/extname.d.ts +6 -0
  309. package/script/deps/deno.land/std@0.221.0/path/windows/extname.js +72 -0
  310. package/script/deps/deno.land/std@0.221.0/path/windows/format.d.ts +6 -0
  311. package/script/deps/deno.land/std@0.221.0/path/windows/format.js +15 -0
  312. package/script/deps/deno.land/std@0.221.0/path/windows/from_file_url.d.ts +14 -0
  313. package/script/deps/deno.land/std@0.221.0/path/windows/from_file_url.js +30 -0
  314. package/script/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.d.ts +57 -0
  315. package/script/deps/deno.land/std@0.221.0/path/windows/glob_to_regexp.js +73 -0
  316. package/script/deps/deno.land/std@0.221.0/path/windows/is_absolute.d.ts +5 -0
  317. package/script/deps/deno.land/std@0.221.0/path/windows/is_absolute.js +31 -0
  318. package/script/deps/deno.land/std@0.221.0/path/windows/is_glob.d.ts +1 -0
  319. package/script/deps/deno.land/std@0.221.0/path/windows/is_glob.js +7 -0
  320. package/script/deps/deno.land/std@0.221.0/path/windows/join.d.ts +5 -0
  321. package/script/deps/deno.land/std@0.221.0/path/windows/join.js +76 -0
  322. package/script/deps/deno.land/std@0.221.0/path/windows/join_globs.d.ts +4 -0
  323. package/script/deps/deno.land/std@0.221.0/path/windows/join_globs.js +30 -0
  324. package/script/deps/deno.land/std@0.221.0/path/windows/mod.d.ts +38 -0
  325. package/script/deps/deno.land/std@0.221.0/path/windows/mod.js +58 -0
  326. package/script/deps/deno.land/std@0.221.0/path/windows/normalize.d.ts +7 -0
  327. package/script/deps/deno.land/std@0.221.0/path/windows/normalize.js +134 -0
  328. package/script/deps/deno.land/std@0.221.0/path/windows/normalize_glob.d.ts +4 -0
  329. package/script/deps/deno.land/std@0.221.0/path/windows/normalize_glob.js +20 -0
  330. package/script/deps/deno.land/std@0.221.0/path/windows/parse.d.ts +6 -0
  331. package/script/deps/deno.land/std@0.221.0/path/windows/parse.js +163 -0
  332. package/script/deps/deno.land/std@0.221.0/path/windows/relative.d.ts +12 -0
  333. package/script/deps/deno.land/std@0.221.0/path/windows/relative.js +125 -0
  334. package/script/deps/deno.land/std@0.221.0/path/windows/resolve.d.ts +5 -0
  335. package/script/deps/deno.land/std@0.221.0/path/windows/resolve.js +170 -0
  336. package/script/deps/deno.land/std@0.221.0/path/windows/to_file_url.d.ts +14 -0
  337. package/script/deps/deno.land/std@0.221.0/path/windows/to_file_url.js +35 -0
  338. package/script/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.d.ts +5 -0
  339. package/script/deps/deno.land/std@0.221.0/path/windows/to_namespaced_path.js +42 -0
  340. package/script/fontconv/cli.d.ts +2 -0
  341. package/script/fontconv/cli.js +61 -0
  342. package/script/fontconv/mod.d.ts +10 -0
  343. package/script/fontconv/mod.js +186 -0
  344. package/script/fontconv/test.d.ts +1 -0
  345. package/script/package.json +3 -0
  346. package/script/test/bootstrap-icons.woff2 +0 -0
  347. package/script/test/format-check.eot +0 -0
  348. package/script/test/format-check.otf +0 -0
  349. package/script/test/format-check.svg +25 -0
  350. package/script/test/format-check.ttf +0 -0
  351. package/script/test/format-check.woff +0 -0
  352. package/script/test/format-check.woff2 +0 -0
  353. package/script/test/material-icons.woff2 +0 -0
  354. package/script/ttf2svg/mod.d.ts +9 -0
  355. package/script/ttf2svg/mod.js +204 -0
@@ -0,0 +1,163 @@
1
+ "use strict";
2
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
+ // This module is browser compatible.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.parse = void 0;
6
+ const constants_js_1 = require("../_common/constants.js");
7
+ const assert_path_js_1 = require("../_common/assert_path.js");
8
+ const _util_js_1 = require("./_util.js");
9
+ /**
10
+ * Return a `ParsedPath` object of the `path`.
11
+ * @param path to process
12
+ */
13
+ function parse(path) {
14
+ (0, assert_path_js_1.assertPath)(path);
15
+ const ret = { root: "", dir: "", base: "", ext: "", name: "" };
16
+ const len = path.length;
17
+ if (len === 0)
18
+ return ret;
19
+ let rootEnd = 0;
20
+ let code = path.charCodeAt(0);
21
+ // Try to match a root
22
+ if (len > 1) {
23
+ if ((0, _util_js_1.isPathSeparator)(code)) {
24
+ // Possible UNC root
25
+ rootEnd = 1;
26
+ if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(1))) {
27
+ // Matched double path separator at beginning
28
+ let j = 2;
29
+ let last = j;
30
+ // Match 1 or more non-path separators
31
+ for (; j < len; ++j) {
32
+ if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
33
+ break;
34
+ }
35
+ if (j < len && j !== last) {
36
+ // Matched!
37
+ last = j;
38
+ // Match 1 or more path separators
39
+ for (; j < len; ++j) {
40
+ if (!(0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
41
+ break;
42
+ }
43
+ if (j < len && j !== last) {
44
+ // Matched!
45
+ last = j;
46
+ // Match 1 or more non-path separators
47
+ for (; j < len; ++j) {
48
+ if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
49
+ break;
50
+ }
51
+ if (j === len) {
52
+ // We matched a UNC root only
53
+ rootEnd = j;
54
+ }
55
+ else if (j !== last) {
56
+ // We matched a UNC root with leftovers
57
+ rootEnd = j + 1;
58
+ }
59
+ }
60
+ }
61
+ }
62
+ }
63
+ else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
64
+ // Possible device root
65
+ if (path.charCodeAt(1) === constants_js_1.CHAR_COLON) {
66
+ rootEnd = 2;
67
+ if (len > 2) {
68
+ if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2))) {
69
+ if (len === 3) {
70
+ // `path` contains just a drive root, exit early to avoid
71
+ // unnecessary work
72
+ ret.root = ret.dir = path;
73
+ ret.base = "\\";
74
+ return ret;
75
+ }
76
+ rootEnd = 3;
77
+ }
78
+ }
79
+ else {
80
+ // `path` contains just a relative drive root, exit early to avoid
81
+ // unnecessary work
82
+ ret.root = ret.dir = path;
83
+ return ret;
84
+ }
85
+ }
86
+ }
87
+ }
88
+ else if ((0, _util_js_1.isPathSeparator)(code)) {
89
+ // `path` contains just a path separator, exit early to avoid
90
+ // unnecessary work
91
+ ret.root = ret.dir = path;
92
+ ret.base = "\\";
93
+ return ret;
94
+ }
95
+ if (rootEnd > 0)
96
+ ret.root = path.slice(0, rootEnd);
97
+ let startDot = -1;
98
+ let startPart = rootEnd;
99
+ let end = -1;
100
+ let matchedSlash = true;
101
+ let i = path.length - 1;
102
+ // Track the state of characters (if any) we see before our first dot and
103
+ // after any path separator we find
104
+ let preDotState = 0;
105
+ // Get non-dir info
106
+ for (; i >= rootEnd; --i) {
107
+ code = path.charCodeAt(i);
108
+ if ((0, _util_js_1.isPathSeparator)(code)) {
109
+ // If we reached a path separator that was not part of a set of path
110
+ // separators at the end of the string, stop now
111
+ if (!matchedSlash) {
112
+ startPart = i + 1;
113
+ break;
114
+ }
115
+ continue;
116
+ }
117
+ if (end === -1) {
118
+ // We saw the first non-path separator, mark this as the end of our
119
+ // extension
120
+ matchedSlash = false;
121
+ end = i + 1;
122
+ }
123
+ if (code === constants_js_1.CHAR_DOT) {
124
+ // If this is our first dot, mark it as the start of our extension
125
+ if (startDot === -1)
126
+ startDot = i;
127
+ else if (preDotState !== 1)
128
+ preDotState = 1;
129
+ }
130
+ else if (startDot !== -1) {
131
+ // We saw a non-dot and non-path separator before our dot, so we should
132
+ // have a good chance at having a non-empty extension
133
+ preDotState = -1;
134
+ }
135
+ }
136
+ if (startDot === -1 ||
137
+ end === -1 ||
138
+ // We saw a non-dot character immediately before the dot
139
+ preDotState === 0 ||
140
+ // The (right-most) trimmed path component is exactly '..'
141
+ (preDotState === 1 && startDot === end - 1 && startDot === startPart + 1)) {
142
+ if (end !== -1) {
143
+ ret.base = ret.name = path.slice(startPart, end);
144
+ }
145
+ }
146
+ else {
147
+ ret.name = path.slice(startPart, startDot);
148
+ ret.base = path.slice(startPart, end);
149
+ ret.ext = path.slice(startDot, end);
150
+ }
151
+ // Fallback to '\' in case there is no basename
152
+ ret.base = ret.base || "\\";
153
+ // If the directory is the root, use the entire root as the `dir` including
154
+ // the trailing slash if any (`C:\abc` -> `C:\`). Otherwise, strip out the
155
+ // trailing slash (`C:\abc\def` -> `C:\abc`).
156
+ if (startPart > 0 && startPart !== rootEnd) {
157
+ ret.dir = path.slice(0, startPart - 1);
158
+ }
159
+ else
160
+ ret.dir = ret.root;
161
+ return ret;
162
+ }
163
+ exports.parse = parse;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Return the relative path from `from` to `to` based on current working directory.
3
+ *
4
+ * An example in windws, for instance:
5
+ * from = 'C:\\orandea\\test\\aaa'
6
+ * to = 'C:\\orandea\\impl\\bbb'
7
+ * The output of the function should be: '..\\..\\impl\\bbb'
8
+ *
9
+ * @param from path in current working directory
10
+ * @param to path in current working directory
11
+ */
12
+ export declare function relative(from: string, to: string): string;
@@ -0,0 +1,125 @@
1
+ "use strict";
2
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
+ // This module is browser compatible.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.relative = void 0;
6
+ const constants_js_1 = require("../_common/constants.js");
7
+ const resolve_js_1 = require("./resolve.js");
8
+ const relative_js_1 = require("../_common/relative.js");
9
+ /**
10
+ * Return the relative path from `from` to `to` based on current working directory.
11
+ *
12
+ * An example in windws, for instance:
13
+ * from = 'C:\\orandea\\test\\aaa'
14
+ * to = 'C:\\orandea\\impl\\bbb'
15
+ * The output of the function should be: '..\\..\\impl\\bbb'
16
+ *
17
+ * @param from path in current working directory
18
+ * @param to path in current working directory
19
+ */
20
+ function relative(from, to) {
21
+ (0, relative_js_1.assertArgs)(from, to);
22
+ const fromOrig = (0, resolve_js_1.resolve)(from);
23
+ const toOrig = (0, resolve_js_1.resolve)(to);
24
+ if (fromOrig === toOrig)
25
+ return "";
26
+ from = fromOrig.toLowerCase();
27
+ to = toOrig.toLowerCase();
28
+ if (from === to)
29
+ return "";
30
+ // Trim any leading backslashes
31
+ let fromStart = 0;
32
+ let fromEnd = from.length;
33
+ for (; fromStart < fromEnd; ++fromStart) {
34
+ if (from.charCodeAt(fromStart) !== constants_js_1.CHAR_BACKWARD_SLASH)
35
+ break;
36
+ }
37
+ // Trim trailing backslashes (applicable to UNC paths only)
38
+ for (; fromEnd - 1 > fromStart; --fromEnd) {
39
+ if (from.charCodeAt(fromEnd - 1) !== constants_js_1.CHAR_BACKWARD_SLASH)
40
+ break;
41
+ }
42
+ const fromLen = fromEnd - fromStart;
43
+ // Trim any leading backslashes
44
+ let toStart = 0;
45
+ let toEnd = to.length;
46
+ for (; toStart < toEnd; ++toStart) {
47
+ if (to.charCodeAt(toStart) !== constants_js_1.CHAR_BACKWARD_SLASH)
48
+ break;
49
+ }
50
+ // Trim trailing backslashes (applicable to UNC paths only)
51
+ for (; toEnd - 1 > toStart; --toEnd) {
52
+ if (to.charCodeAt(toEnd - 1) !== constants_js_1.CHAR_BACKWARD_SLASH)
53
+ break;
54
+ }
55
+ const toLen = toEnd - toStart;
56
+ // Compare paths to find the longest common path from root
57
+ const length = fromLen < toLen ? fromLen : toLen;
58
+ let lastCommonSep = -1;
59
+ let i = 0;
60
+ for (; i <= length; ++i) {
61
+ if (i === length) {
62
+ if (toLen > length) {
63
+ if (to.charCodeAt(toStart + i) === constants_js_1.CHAR_BACKWARD_SLASH) {
64
+ // We get here if `from` is the exact base path for `to`.
65
+ // For example: from='C:\\foo\\bar'; to='C:\\foo\\bar\\baz'
66
+ return toOrig.slice(toStart + i + 1);
67
+ }
68
+ else if (i === 2) {
69
+ // We get here if `from` is the device root.
70
+ // For example: from='C:\\'; to='C:\\foo'
71
+ return toOrig.slice(toStart + i);
72
+ }
73
+ }
74
+ if (fromLen > length) {
75
+ if (from.charCodeAt(fromStart + i) === constants_js_1.CHAR_BACKWARD_SLASH) {
76
+ // We get here if `to` is the exact base path for `from`.
77
+ // For example: from='C:\\foo\\bar'; to='C:\\foo'
78
+ lastCommonSep = i;
79
+ }
80
+ else if (i === 2) {
81
+ // We get here if `to` is the device root.
82
+ // For example: from='C:\\foo\\bar'; to='C:\\'
83
+ lastCommonSep = 3;
84
+ }
85
+ }
86
+ break;
87
+ }
88
+ const fromCode = from.charCodeAt(fromStart + i);
89
+ const toCode = to.charCodeAt(toStart + i);
90
+ if (fromCode !== toCode)
91
+ break;
92
+ else if (fromCode === constants_js_1.CHAR_BACKWARD_SLASH)
93
+ lastCommonSep = i;
94
+ }
95
+ // We found a mismatch before the first common path separator was seen, so
96
+ // return the original `to`.
97
+ if (i !== length && lastCommonSep === -1) {
98
+ return toOrig;
99
+ }
100
+ let out = "";
101
+ if (lastCommonSep === -1)
102
+ lastCommonSep = 0;
103
+ // Generate the relative path based on the path difference between `to` and
104
+ // `from`
105
+ for (i = fromStart + lastCommonSep + 1; i <= fromEnd; ++i) {
106
+ if (i === fromEnd || from.charCodeAt(i) === constants_js_1.CHAR_BACKWARD_SLASH) {
107
+ if (out.length === 0)
108
+ out += "..";
109
+ else
110
+ out += "\\..";
111
+ }
112
+ }
113
+ // Lastly, append the rest of the destination (`to`) path that comes after
114
+ // the common path parts
115
+ if (out.length > 0) {
116
+ return out + toOrig.slice(toStart + lastCommonSep, toEnd);
117
+ }
118
+ else {
119
+ toStart += lastCommonSep;
120
+ if (toOrig.charCodeAt(toStart) === constants_js_1.CHAR_BACKWARD_SLASH)
121
+ ++toStart;
122
+ return toOrig.slice(toStart, toEnd);
123
+ }
124
+ }
125
+ exports.relative = relative;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Resolves path segments into a `path`
3
+ * @param pathSegments to process to path
4
+ */
5
+ export declare function resolve(...pathSegments: string[]): string;
@@ -0,0 +1,170 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.resolve = void 0;
27
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
28
+ // This module is browser compatible.
29
+ const dntShim = __importStar(require("../../../../../_dnt.shims.js"));
30
+ const constants_js_1 = require("../_common/constants.js");
31
+ const normalize_string_js_1 = require("../_common/normalize_string.js");
32
+ const assert_path_js_1 = require("../_common/assert_path.js");
33
+ const _util_js_1 = require("./_util.js");
34
+ /**
35
+ * Resolves path segments into a `path`
36
+ * @param pathSegments to process to path
37
+ */
38
+ function resolve(...pathSegments) {
39
+ let resolvedDevice = "";
40
+ let resolvedTail = "";
41
+ let resolvedAbsolute = false;
42
+ for (let i = pathSegments.length - 1; i >= -1; i--) {
43
+ let path;
44
+ // deno-lint-ignore no-explicit-any
45
+ const { Deno } = dntShim.dntGlobalThis;
46
+ if (i >= 0) {
47
+ path = pathSegments[i];
48
+ }
49
+ else if (!resolvedDevice) {
50
+ if (typeof Deno?.cwd !== "function") {
51
+ throw new TypeError("Resolved a drive-letter-less path without a CWD.");
52
+ }
53
+ path = Deno.cwd();
54
+ }
55
+ else {
56
+ if (typeof Deno?.env?.get !== "function" || typeof Deno?.cwd !== "function") {
57
+ throw new TypeError("Resolved a relative path without a CWD.");
58
+ }
59
+ path = Deno.cwd();
60
+ // Verify that a cwd was found and that it actually points
61
+ // to our drive. If not, default to the drive's root.
62
+ if (path === undefined ||
63
+ path.slice(0, 3).toLowerCase() !== `${resolvedDevice.toLowerCase()}\\`) {
64
+ path = `${resolvedDevice}\\`;
65
+ }
66
+ }
67
+ (0, assert_path_js_1.assertPath)(path);
68
+ const len = path.length;
69
+ // Skip empty entries
70
+ if (len === 0)
71
+ continue;
72
+ let rootEnd = 0;
73
+ let device = "";
74
+ let isAbsolute = false;
75
+ const code = path.charCodeAt(0);
76
+ // Try to match a root
77
+ if (len > 1) {
78
+ if ((0, _util_js_1.isPathSeparator)(code)) {
79
+ // Possible UNC root
80
+ // If we started with a separator, we know we at least have an
81
+ // absolute path of some kind (UNC or otherwise)
82
+ isAbsolute = true;
83
+ if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(1))) {
84
+ // Matched double path separator at beginning
85
+ let j = 2;
86
+ let last = j;
87
+ // Match 1 or more non-path separators
88
+ for (; j < len; ++j) {
89
+ if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
90
+ break;
91
+ }
92
+ if (j < len && j !== last) {
93
+ const firstPart = path.slice(last, j);
94
+ // Matched!
95
+ last = j;
96
+ // Match 1 or more path separators
97
+ for (; j < len; ++j) {
98
+ if (!(0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
99
+ break;
100
+ }
101
+ if (j < len && j !== last) {
102
+ // Matched!
103
+ last = j;
104
+ // Match 1 or more non-path separators
105
+ for (; j < len; ++j) {
106
+ if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(j)))
107
+ break;
108
+ }
109
+ if (j === len) {
110
+ // We matched a UNC root only
111
+ device = `\\\\${firstPart}\\${path.slice(last)}`;
112
+ rootEnd = j;
113
+ }
114
+ else if (j !== last) {
115
+ // We matched a UNC root with leftovers
116
+ device = `\\\\${firstPart}\\${path.slice(last, j)}`;
117
+ rootEnd = j;
118
+ }
119
+ }
120
+ }
121
+ }
122
+ else {
123
+ rootEnd = 1;
124
+ }
125
+ }
126
+ else if ((0, _util_js_1.isWindowsDeviceRoot)(code)) {
127
+ // Possible device root
128
+ if (path.charCodeAt(1) === constants_js_1.CHAR_COLON) {
129
+ device = path.slice(0, 2);
130
+ rootEnd = 2;
131
+ if (len > 2) {
132
+ if ((0, _util_js_1.isPathSeparator)(path.charCodeAt(2))) {
133
+ // Treat separator following drive name as an absolute path
134
+ // indicator
135
+ isAbsolute = true;
136
+ rootEnd = 3;
137
+ }
138
+ }
139
+ }
140
+ }
141
+ }
142
+ else if ((0, _util_js_1.isPathSeparator)(code)) {
143
+ // `path` contains just a path separator
144
+ rootEnd = 1;
145
+ isAbsolute = true;
146
+ }
147
+ if (device.length > 0 &&
148
+ resolvedDevice.length > 0 &&
149
+ device.toLowerCase() !== resolvedDevice.toLowerCase()) {
150
+ // This path points to another device so it is not applicable
151
+ continue;
152
+ }
153
+ if (resolvedDevice.length === 0 && device.length > 0) {
154
+ resolvedDevice = device;
155
+ }
156
+ if (!resolvedAbsolute) {
157
+ resolvedTail = `${path.slice(rootEnd)}\\${resolvedTail}`;
158
+ resolvedAbsolute = isAbsolute;
159
+ }
160
+ if (resolvedAbsolute && resolvedDevice.length > 0)
161
+ break;
162
+ }
163
+ // At this point the path should be resolved to a full absolute path,
164
+ // but handle relative paths to be safe (might happen when Deno.cwd()
165
+ // fails)
166
+ // Normalize the tail path
167
+ resolvedTail = (0, normalize_string_js_1.normalizeString)(resolvedTail, !resolvedAbsolute, "\\", _util_js_1.isPathSeparator);
168
+ return resolvedDevice + (resolvedAbsolute ? "\\" : "") + resolvedTail || ".";
169
+ }
170
+ exports.resolve = resolve;
@@ -0,0 +1,14 @@
1
+ /// <reference types="node" />
2
+ /**
3
+ * Converts a path string to a file URL.
4
+ *
5
+ * ```ts
6
+ * import { toFileUrl } from "https://deno.land/std@$STD_VERSION/path/windows/to_file_url.ts";
7
+ *
8
+ * toFileUrl("\\home\\foo"); // new URL("file:///home/foo")
9
+ * toFileUrl("C:\\Users\\foo"); // new URL("file:///C:/Users/foo")
10
+ * toFileUrl("\\\\127.0.0.1\\home\\foo"); // new URL("file://127.0.0.1/home/foo")
11
+ * ```
12
+ * @param path to convert to file URL
13
+ */
14
+ export declare function toFileUrl(path: string): URL;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
+ // This module is browser compatible.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.toFileUrl = void 0;
6
+ const to_file_url_js_1 = require("../_common/to_file_url.js");
7
+ const is_absolute_js_1 = require("./is_absolute.js");
8
+ /**
9
+ * Converts a path string to a file URL.
10
+ *
11
+ * ```ts
12
+ * import { toFileUrl } from "https://deno.land/std@$STD_VERSION/path/windows/to_file_url.ts";
13
+ *
14
+ * toFileUrl("\\home\\foo"); // new URL("file:///home/foo")
15
+ * toFileUrl("C:\\Users\\foo"); // new URL("file:///C:/Users/foo")
16
+ * toFileUrl("\\\\127.0.0.1\\home\\foo"); // new URL("file://127.0.0.1/home/foo")
17
+ * ```
18
+ * @param path to convert to file URL
19
+ */
20
+ function toFileUrl(path) {
21
+ if (!(0, is_absolute_js_1.isAbsolute)(path)) {
22
+ throw new TypeError("Must be an absolute path.");
23
+ }
24
+ const [, hostname, pathname] = path.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/);
25
+ const url = new URL("file:///");
26
+ url.pathname = (0, to_file_url_js_1.encodeWhitespace)(pathname.replace(/%/g, "%25"));
27
+ if (hostname !== undefined && hostname !== "localhost") {
28
+ url.hostname = hostname;
29
+ if (!url.hostname) {
30
+ throw new TypeError("Invalid hostname.");
31
+ }
32
+ }
33
+ return url;
34
+ }
35
+ exports.toFileUrl = toFileUrl;
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Resolves path to a namespace path
3
+ * @param path to resolve to namespace
4
+ */
5
+ export declare function toNamespacedPath(path: string): string;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ // Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
3
+ // This module is browser compatible.
4
+ Object.defineProperty(exports, "__esModule", { value: true });
5
+ exports.toNamespacedPath = void 0;
6
+ const constants_js_1 = require("../_common/constants.js");
7
+ const _util_js_1 = require("./_util.js");
8
+ const resolve_js_1 = require("./resolve.js");
9
+ /**
10
+ * Resolves path to a namespace path
11
+ * @param path to resolve to namespace
12
+ */
13
+ function toNamespacedPath(path) {
14
+ // Note: this will *probably* throw somewhere.
15
+ if (typeof path !== "string")
16
+ return path;
17
+ if (path.length === 0)
18
+ return "";
19
+ const resolvedPath = (0, resolve_js_1.resolve)(path);
20
+ if (resolvedPath.length >= 3) {
21
+ if (resolvedPath.charCodeAt(0) === constants_js_1.CHAR_BACKWARD_SLASH) {
22
+ // Possible UNC root
23
+ if (resolvedPath.charCodeAt(1) === constants_js_1.CHAR_BACKWARD_SLASH) {
24
+ const code = resolvedPath.charCodeAt(2);
25
+ if (code !== constants_js_1.CHAR_QUESTION_MARK && code !== constants_js_1.CHAR_DOT) {
26
+ // Matched non-long UNC root, convert the path to a long UNC path
27
+ return `\\\\?\\UNC\\${resolvedPath.slice(2)}`;
28
+ }
29
+ }
30
+ }
31
+ else if ((0, _util_js_1.isWindowsDeviceRoot)(resolvedPath.charCodeAt(0))) {
32
+ // Possible device root
33
+ if (resolvedPath.charCodeAt(1) === constants_js_1.CHAR_COLON &&
34
+ resolvedPath.charCodeAt(2) === constants_js_1.CHAR_BACKWARD_SLASH) {
35
+ // Matched device root, convert the path to a long UNC path
36
+ return `\\\\?\\${resolvedPath}`;
37
+ }
38
+ }
39
+ }
40
+ return path;
41
+ }
42
+ exports.toNamespacedPath = toNamespacedPath;
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ const dntShim = __importStar(require("../_dnt.shims.js"));
28
+ const mod_js_1 = require("../deps/deno.land/std@0.221.0/path/mod.js");
29
+ const commander_1 = require("commander");
30
+ const mod_js_2 = require("./mod.js");
31
+ const program = new commander_1.Command();
32
+ program
33
+ .name("fontconv")
34
+ .description("Convert and compress fonts (.ttf, .otf, .eot, .svg, .woff, .woff2).")
35
+ .version("0.0.1");
36
+ program
37
+ .argument("<input>", "Path of input font file")
38
+ .argument("<output>", "Path of output font file")
39
+ .option("--text <string>", "characters to compress")
40
+ .option("--text-file <path>", "Path of line separated character file to compress")
41
+ .option("--code <string>", "comma separated codepoints to compress")
42
+ .option("--code-file <path>", "Path of line separated codepoint file to compress");
43
+ program.parse();
44
+ const inPath = program.args[0];
45
+ const outPath = program.args[1];
46
+ const options = program.opts();
47
+ async function main() {
48
+ const inFormat = (0, mod_js_1.extname)(inPath);
49
+ const inFont = (inFormat === ".svg")
50
+ ? dntShim.Deno.readTextFileSync(inPath)
51
+ : dntShim.Deno.readFileSync(inPath);
52
+ const outFormat = (0, mod_js_1.extname)(outPath);
53
+ const outFont = await (0, mod_js_2.convert)(inFont, outFormat, options);
54
+ if (outFormat === ".svg") {
55
+ dntShim.Deno.writeTextFileSync(outPath, outFont);
56
+ }
57
+ else {
58
+ dntShim.Deno.writeFileSync(outPath, outFont);
59
+ }
60
+ }
61
+ main();
@@ -0,0 +1,10 @@
1
+ export function isOTF(uint8Array: any): boolean;
2
+ export function isTTF(uint8Array: any): boolean;
3
+ export function isEOT(uint8Array: any): boolean;
4
+ export function isSVG(object: any): boolean;
5
+ export function isWOFF(uint8Array: any): boolean;
6
+ export function isWOFF2(uint8Array: any): boolean;
7
+ export function otf2ttf(otf: any): any;
8
+ export function getFont(fontContent: any): Promise<any>;
9
+ export function filterGlyphs(font: any, options: any): any;
10
+ export function convert(fontContent: any, format: any, options: any): Promise<any>;