= SVG
== svg-path-editor
该工具可在浏览器中直接创建和编辑 SVG Path。
=== 安装使用方法
[source,bash]
----
# 下载源码
git clone https://github.com/Yqnn/svg-path-editor.git
# 构建 docker 镜像
docker build -t svg-path-editor .
# 启动 docker 容器
docker run \
--name svg-path-editor \
-d \
-p 4200:4200 \
svg-path-editor
----
启动成功后,访问 http://localhost:4200
== SVGEdit
SVGEdit is a fast, web-based, JavaScript-driven SVG drawing editor that works in any modern browser.
SVGEdit is based on a powerful SVG canvas @svgedit/svgcanvas
源码地址: https://github.com/SVG-Edit/svgedit.git
== svg-text-to-path
Convert svg nodes to vector font-free elements.
源码地址: https://github.com/paulzi/svg-text-to-path.git
== 通过 GIMP 提取 svg 中的 path
打开 svg 文件:
image::9999-appendix/tools/svg/001.png[,20%]
调整文件大小,并选择"导入路径"及"合并导入的路径"选项:
image::9999-appendix/tools/svg/002.png[,80%]
导出路径文件(导出的文件仍然是 .svg):
image::9999-appendix/tools/svg/003.png[,80%]
打开导出的文件,查找其中的 path,对比前后两个文件内容:
[cols="1,1"]
|===
| 原 svg 文件(CN.svg)
| 导出的 Path 文件 (CN_PATH.svg)
a|
[source,xml]
----
----
a|
[source,xml]
----
----
|===
== country-flag-icons
该图标集包含各个国家的图标 svg 文件, 包含长宽 1:1 和 3:2 两种比例的图标。
源码地址: https://gitlab.com/catamphetamine/country-flag-icons
npm 包地址: https://www.npmjs.com/package/country-flag-icons