FontForge 調整字型在 Windows 的安裝顯示名稱

Posted in :

預設在 FontForge 裡 TTF 檔的 info 裡是 US 的 tag 不能輸入中文字,原來是要按 <new> ,就可以新增出 chinese(Taiwan) 的 tag ,即可在繁體中文的台灣正常預覽中文字。

雖然FontForge裡不能輸入中文字,但是可以先在其他編輯器裡輸入好中文字後,再回到FontForge裡做貼上。

沒有增加 chinese(Taiwan) 的 tag 字型檔案,會被作業系統當成英文字型。

在一個一個tag 在FontForge 裡按 <new> 新增,終於完成了某一個地區所需要的Tag 之後,想要處理其他地區,使用外部的文字編輯器會方便和有效率一些,使用方法是:

  • 1:另存字型檔案為「資料夾格式」(存檔時,Directory 那個地方打勾)。
  • 2:有了資料夾格式的FontForge 專案檔,使用文字編輯器也可以直接修改 FontForge 的字型資料夾裡的 font.props,複製原本第一個完成的地區,再直接修改地區的代碼,會比使用FontForge 的 GUI 界面加入來的快。

修改好的範例:

LangName: 1033 "" "" "" "FontForge : JasonHandwriting3 Regular : 16-2-2020" "" "Version 1.24.10" "" "" "" "" "" "" "" "Copyright (c) 2020, Chun yu Yao (),+AAoA-with Reserved Font Name JasonHandwriting3.+AAoACgAA-This Font Software is licensed under the SIL Open Font License, Version 1.1.+AAoA-This license is copied below, and is also available with a FAQ at:+AAoA-http://scripts.sil.org/OFL+AAoACgAK------------------------------------------------------------+AAoA-SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+AAoA------------------------------------------------------------+AAoACgAA-PREAMBLE+AAoA-The goals of the Open Font License (OFL) are to stimulate worldwide+AAoA-development of collaborative font projects, to support the font creation+AAoA-efforts of academic and linguistic communities, and to provide a free and+AAoA-open framework in which fonts may be shared and improved in partnership+AAoA-with others.+AAoACgAA-The OFL allows the licensed fonts to be used, studied, modified and+AAoA-redistributed freely as long as they are not sold by themselves. The+AAoA-fonts, including any derivative works, can be bundled, embedded, +AAoA-redistributed and/or sold with any software provided that any reserved+AAoA-names are not used by derivative works. The fonts and derivatives,+AAoA-however, cannot be released under any other type of license. The+AAoA-requirement for fonts to remain under this license does not apply+AAoA-to any document created using the fonts or their derivatives.+AAoACgAA-DEFINITIONS+AAoAIgAA-Font Software+ACIA refers to the set of files released by the Copyright+AAoA-Holder(s) under this license and clearly marked as such. This may+AAoA-include source files, build scripts and documentation.+AAoACgAi-Reserved Font Name+ACIA refers to any names specified as such after the+AAoA-copyright statement(s).+AAoACgAi-Original Version+ACIA refers to the collection of Font Software components as+AAoA-distributed by the Copyright Holder(s).+AAoACgAi-Modified Version+ACIA refers to any derivative made by adding to, deleting,+AAoA-or substituting -- in part or in whole -- any of the components of the+AAoA-Original Version, by changing formats or by porting the Font Software to a+AAoA-new environment.+AAoACgAi-Author+ACIA refers to any designer, engineer, programmer, technical+AAoA-writer or other person who contributed to the Font Software.+AAoACgAA-PERMISSION & CONDITIONS+AAoA-Permission is hereby granted, free of charge, to any person obtaining+AAoA-a copy of the Font Software, to use, study, copy, merge, embed, modify,+AAoA-redistribute, and sell modified and unmodified copies of the Font+AAoA-Software, subject to the following conditions:+AAoACgAA-1) Neither the Font Software nor any of its individual components,+AAoA-in Original or Modified Versions, may be sold by itself.+AAoACgAA-3) Original or Modified Versions of the Font Software may be bundled,+AAoA-redistributed and/or sold with any software, provided that each copy+AAoA-contains the above copyright notice and this license. These can be+AAoA-included either as stand-alone text files, human-readable headers or+AAoA-in the appropriate machine-readable metadata fields within text or+AAoA-binary files as long as those fields can be easily viewed by the user.+AAoACgAA-3) No Modified Version of the Font Software may use the Reserved Font+AAoA-Name(s) unless explicit written permission is granted by the corresponding+AAoA-Copyright Holder. This restriction only applies to the primary font name as+AAoA-presented to the users.+AAoACgAA-4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+AAoA-Software shall not be used to promote, endorse or advertise any+AAoA-Modified Version, except to acknowledge the contribution(s) of the+AAoA-Copyright Holder(s) and the Author(s) or with their explicit written+AAoA-permission.+AAoACgAA-5) The Font Software, modified or unmodified, in part or in whole,+AAoA-must be distributed entirely under this license, and must not be+AAoA-distributed under any other license. The requirement for fonts to+AAoA-remain under this license does not apply to any document created+AAoA-using the Font Software.+AAoACgAA-TERMINATION+AAoA-This license becomes null and void if any of the above conditions are+AAoA-not met.+AAoACgAA-DISCLAIMER+AAoA-THE FONT SOFTWARE IS PROVIDED +ACIA-AS IS+ACIA, WITHOUT WARRANTY OF ANY KIND,+AAoA-EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+AAoA-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+AAoA-OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+AAoA-COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+AAoA-INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+AAoA-DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+AAoA-FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+AAoA-OTHER DEALINGS IN THE FONT SOFTWARE." "http://scripts.sil.org/OFL" "" "JasonHandwriting3" "Regular"
 LangName: 1028 "" "+bgVnfmJLW+ua1AAA-3-Regular" "Regular" "" "+bgVnfmJLW+ua1AAA-3-Regular" "Version 1.24.10" "" "" "" "" "" "" "" "" "" "" "+bgVnfmJLW+ua1AAA-3" "Regular"
 LangName: 2052 "" "+bgVnfmJLUZlPUwAA-3-Regular" "Regular" "" "+bgVnfmJLUZlPUwAA-3-Regular" "Version 1.24.10" "" "" "" "" "" "" "" "" "" "" "+bgVnfmJLUZlPUwAA-3" "Regular"
 LangName: 3076 "" "+bgVnfmJLW+ua1AAA-3-Regular" "Regular" "" "+bgVnfmJLW+ua1AAA-3-Regular" "Version 1.24.10" "" "" "" "" "" "" "" "" "" "" "+bgVnfmJLW+ua1AAA-3" "Regular"
 LangName: 5124 "" "+bgVnfmJLW+ua1AAA-3-Regular" "Regular" "" "+bgVnfmJLW+ua1AAA-3-Regular" "Version 1.24.10" "" "" "" "" "" "" "" "" "" "" "+bgVnfmJLW+ua1AAA-3" "Regular"

範例說明:

  • 台灣的 language code 是 1028;
  • 香港的 language code 是3076;
  • 中國大陸簡中的 language code是 2052;
  • 上面是修改 FontForge 的 font.props 為 Semi-Bold 的範例如。

 FontForge 修改字型的 Font info (主選單 >> Element >> Font info…)

GUI 修改 Font Info… 的畫面:

只要增加 Family + Fullname 這 2個 tag 就可以了,但似乎有些電腦還會顯示成英文字型,建議再增加 Version + Style 這2個 tag。

如果同一個字型只有一個風格的話,Family 和 fullname 會設的一樣,如果有多個風格,記得讓 Family 放在同一個名字。

最後匯出的檔案在繁中的Win7看的到預覽:


在修改為不同字重後,字型檔案的 Family 和 Fullname 的 2個 tag 修可能需要分別修改為不同的名稱,以避免在Windows 的情況下無法被作業系統識別,建議這2個tag 依照不同的語言別,填入適當的值:淡(Light)、標準(Regular)、適中(Medium)、半黑(Semi-Bold)。

套用上面的設定值後,在Windows 裡字體就可以正常顯示,而且也有自己的字體家族:


附註:本文所使用的字型均為測試用,各字型版權皆屬各字型公司所有,使用前請事先取得字型的合法授權。因為很重要,所以標註為紅色字。

後記:還是常常會出問題,強烈建議 English(US) 和其他語言都使用 “Preferred Family” + “Preferred Styles” 欄,才不會有字體消失的問題。

設定的「不夠完整」在遇到多個 style 在同一個 family 裡會出錯,建議「完整」的設定方式如下:

為了避免多個 style 擠在同一個 family 裡時,設定錯誤會造成其他style字體無法顯示和被選取,對照上圖的解法是:

  • 所有的語系的 Family Name + Fullname Name請都使用一樣的值,使用較長的版本,例如字體名稱+風格。
  • 所有的語系都有要 Preferred Family 與 Preferred Styles 欄位。

2 thoughts on “FontForge 調整字型在 Windows 的安裝顯示名稱

  1. 你好,請問修改 FontForge 的字型資料夾裡的 font.props ,是指甚麼位置?

發佈回覆給「CCC」的留言 取消回覆

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *