# 求助：怎样将字体文件中包含的文字提取出来？

**URL:** <https://forum.freemdict.com/t/topic/13676>\
**Category:** 词典及语言学习交流\
**Tags:** 字体, 求助\
**Created:** [2022 年6 月 19 日 02:36 UTC](https://forum.freemdict.com/t/topic/13676 "2022-06-19T02:36:36Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
**Post date:** [2022 年6 月 19 日 02:36 UTC](https://forum.freemdict.com/t/topic/13676/1 "2022-06-19T02:36:36Z")

</div>

![image](https://forumcdn.freemdict.com/uploads/default/original/3X/4/1/419eb1bdb42718e0d0498e7ce4380f3bed888403.png)

如上图，我在 FontCreator 中直接复制到记事本，出现的是一个个字的名称。

![image](https://forumcdn.freemdict.com/uploads/default/original/3X/7/4/743dbe3a76e38f2606cfbb312bca522b5b510357.png)

请教诸君：怎样将字体文件中包含的这些文字提取出来呢？

---

<div class="post-metadata">

**Author:** ![endnote](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/e/9de0a6/32.png) [@endnote](https://forum.freemdict.com/u/endnote)\
**Post date:** [2022 年6 月 19 日 02:50 UTC](https://forum.freemdict.com/t/topic/13676/2 "2022-06-19T02:50:49Z")

</div>

百度“提取字体子集”  
有一条信息供参考（我没用过）  
FontSmaller 字体文件子集化工具是一个免费的程序,它可以帮助用户从一个字体文件中抽出部分字符,再组成精减的字体文件,主要用于网页设计等

---

<div class="post-metadata">

**Author:** ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
**Post date:** [2022 年6 月 19 日 02:54 UTC](https://forum.freemdict.com/t/topic/13676/3 "2022-06-19T02:54:18Z")

</div>

感谢回复。字体子集化工具我用的是 Fontmin 。  
我不是要提取字体子集，是想提取字体中所含的文字。

---

<div class="post-metadata">

**Author:** ![hua](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/hua/32/11090_2.png) [@hua](https://forum.freemdict.com/u/hua)\
**Post date:** [2022 年6 月 19 日 03:00 UTC](https://forum.freemdict.com/t/topic/13676/4 "2022-06-19T03:00:38Z")

</div>

你是想提取 unicode 还是那些字的线条？后者就是一堆数字。

---

<div class="post-metadata">

**Author:** ![endnote](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/e/9de0a6/32.png) [@endnote](https://forum.freemdict.com/u/endnote)\
**Post date:** [2022 年6 月 19 日 03:03 UTC](https://forum.freemdict.com/t/topic/13676/5 "2022-06-19T03:03:55Z")

</div>

> [@alexpeng](#):
>
> 是想提取字体中所含的文字

这句话你要表达的意思不清晰哈。  
如果你对字体文件里头是什么不太了解，可参考

> **[小白也能学会的字体制作技术\_哔哩哔哩\_bilibili](https://www.bilibili.com/video/BV1kq4y1a7T2/)**
>
> 这套流程比较省事，基本不太容易出问题。, 视频播放量 1045、弹幕量 4、点赞数 43、投硬币枚数 25、收藏人数 26、转发人数 2, 视频作者 clerk\_ma, 作者简介 首席水煮牛肉品鉴师，相关视频：TeX Live 2022：不安装指南，暂时是iOS上地表最强的TeX编辑器，增加了语法高亮，鼠标支持，行号的Proto.py编辑器。，电脑C盘的这四个文件夹一定要清理，否则你的电脑将越用越卡! #程序员 #电脑小技巧 ...

> [@endnote](#):
>
> 帮助用户从一个字体文件中抽出部分字符,再组成精减的字体文件

大部分场景，提取字体中所含的文字是为了这个

如果你要的是位图，截图是最简单的办法

---

<div class="post-metadata">

**Author:** ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
**Post date:** [2022 年6 月 19 日 03:09 UTC](https://forum.freemdict.com/t/topic/13676/6 "2022-06-19T03:09:33Z")

</div>

@hua @endnote  
比如，我看到字体文件中有“上下”两个字，我将它们复制出来（或通过其它方法），粘贴到记事本中。记事本中出现的是“上下”两个文字，而不是一堆字母数字。

我以为这个操作很简单呢 😂

---

<div class="post-metadata">

**Author:** ![hua](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/hua/32/11090_2.png) [@hua](https://forum.freemdict.com/u/hua)\
**Post date:** [2022 年6 月 19 日 03:11 UTC](https://forum.freemdict.com/t/topic/13676/7 "2022-06-19T03:11:33Z")

</div>

你想复制线条，这是不可行的。你可以认为那些线条是图片，记事本怎么显示图片呢。

---

<div class="post-metadata">

**Author:** ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
**Post date:** [2022 年6 月 19 日 03:11 UTC](https://forum.freemdict.com/t/topic/13676/8 "2022-06-19T03:11:34Z")

</div>

> [@endnote](#):
>
> 大部分场景，提取字体中所含的文字是为了这个

是的。字体子集已提取，但现在少两个字……

---

<div class="post-metadata">

**Author:** ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
**Post date:** [2022 年6 月 19 日 03:13 UTC](https://forum.freemdict.com/t/topic/13676/9 "2022-06-19T03:13:31Z")

</div>

有其它方法吗，曲线救国？

---

<div class="post-metadata">

**Author:** ![hua](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/hua/32/11090_2.png) [@hua](https://forum.freemdict.com/u/hua)\
**Post date:** [2022 年6 月 19 日 03:16 UTC](https://forum.freemdict.com/t/topic/13676/10 "2022-06-19T03:16:15Z")

</div>

没有。不过你想解决的是差两个字，或许解决方法是将这两个字的字体子集拿出来？

---

<div class="post-metadata">

**Author:** ![endnote](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/e/9de0a6/32.png) [@endnote](https://forum.freemdict.com/u/endnote)\
**Post date:** [2022 年6 月 19 日 03:18 UTC](https://forum.freemdict.com/t/topic/13676/11 "2022-06-19T03:18:36Z")

</div>

> [@alexpeng](#):
>
> 记事本中出现的是“上下”两个文字

记事本不行，可考虑最简单的HTML网页，然后在CSS文件里指定原来那个字体文件（或提取后的子集文件）

---

<div class="post-metadata">

**Author:** ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
**Post date:** [2022 年6 月 19 日 03:21 UTC](https://forum.freemdict.com/t/topic/13676/12 "2022-06-19T03:21:25Z")

</div>

目前只知道少了两个字，但不知道是哪两个 😂  
我是想把文字都导出来和原来的文字比较比较。

---

<div class="post-metadata">

**Author:** ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
**Post date:** [2022 年6 月 19 日 03:22 UTC](https://forum.freemdict.com/t/topic/13676/13 "2022-06-19T03:22:09Z")

</div>

不错，此方法也许可行。

---

<div class="post-metadata">

**Author:** ![endnote](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/e/9de0a6/32.png) [@endnote](https://forum.freemdict.com/u/endnote)\
**Post date:** [2022 年6 月 19 日 03:24 UTC](https://forum.freemdict.com/t/topic/13676/14 "2022-06-19T03:24:03Z")

</div>

没事，慢慢摸索，不难。  
很多时候是因为对字体的背景知识不足，导致描述自己的需求不够精准。  
字体说简单也简单，说复杂可以牵扯到各个操作系统处理字体显示的流程和差异  
入门可参考

> **[让汉字进入电脑有多难？全世界都失败了，这群中国人成功了\_哔哩哔哩\_bilibili](https://www.bilibili.com/video/BV1VP4y1V7RC/)**
>
> 在汉字面临危机的时候，是这群人顶住压力，克服困难，把汉字送进了电脑，也把「汉字拉丁化」的言论扫进了垃圾堆。, 视频播放量 539022、弹幕量 3869、点赞数 62752、投硬币枚数 7998、收藏人数 13827、转发人数 959, 视频作者 量子位, 作者简介 վ'ᴗ' ի 追踪科技前沿，相关视频：【纪录片】汉字五千年01...

---

<div class="post-metadata">

**Author:** ![hua](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/hua/32/11090_2.png) [@hua](https://forum.freemdict.com/u/hua)\
**Post date:** [2022 年6 月 19 日 03:25 UTC](https://forum.freemdict.com/t/topic/13676/15 "2022-06-19T03:25:35Z")

</div>

你把glyph开头的从缺的字体中复制出来，再把全的复制出来，都放到 Excel 里面，查找右边有左边没有的。。

---

<div class="post-metadata">

**Author:** ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
**Post date:** [2022 年6 月 19 日 03:38 UTC](https://forum.freemdict.com/t/topic/13676/16 "2022-06-19T03:38:20Z")

</div>

感谢您的解答，我再想想。

---

<div class="post-metadata">

**Author:** ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
**Post date:** [2022 年6 月 19 日 04:12 UTC](https://forum.freemdict.com/t/topic/13676/17 "2022-06-19T04:12:23Z")

</div>

> [@hua](#):
>
> 想提取 unicode

再请教一下，怎样提取 unicode 呢？只想要这些字码点。

![image](https://forumcdn.freemdict.com/uploads/default/original/3X/8/6/860a784d37b9f11021e44bcba3eecd8030c83cc3.png)

---

<div class="post-metadata">

**Author:** ![hua](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/hua/32/11090_2.png) [@hua](https://forum.freemdict.com/u/hua)\
**Post date:** [2022 年6 月 19 日 04:27 UTC](https://forum.freemdict.com/t/topic/13676/18 "2022-06-19T04:27:22Z")

</div>

我刚才试了，感觉 fontcreator 无法批量提取字码点。。这个字码点就是 unicode。不过我可以用 python 给你提。

---

<div class="post-metadata">

**Author:** ![alexpeng](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/alexpeng/32/19592_2.png) [@alexpeng](https://forum.freemdict.com/u/alexpeng)\
**Post date:** [2022 年6 月 19 日 04:30 UTC](https://forum.freemdict.com/t/topic/13676/19 "2022-06-19T04:30:58Z")

</div>

太麻烦您了 ❤  
[minifont.rar](https://forum.freemdict.com/uploads/short-url/GxjegIDbrisXP3fSUlpWnnAWZJ.rar) (1.4 MB)

---

<div class="post-metadata">

**Author:** ![hua](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/hua/32/11090_2.png) [@hua](https://forum.freemdict.com/u/hua)\
**Post date:** [2022 年6 月 19 日 04:46 UTC](https://forum.freemdict.com/t/topic/13676/20 "2022-06-19T04:46:37Z")

</div>

[屏显臻宋\_mini.woff.codepoints.txt](https://forum.freemdict.com/uploads/short-url/ZnQqctt5gcEhDazkbNTaSYJpJe.txt) (19.4 KB)  
[eduSong\_mini.woff.codepoints.txt](https://forum.freemdict.com/uploads/short-url/71wHBjRonHRUUrh2QNnBGMmpEXT.txt) (19.6 KB)

[下一页](https://forum.freemdict.com/t/topic/13676.md?page=2)
