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

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

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

也可以直接修改 FontForge 的字型資料夾裡的 font.props 並加入下面這幾個tag,中文字被編碼了,會經常異動的話,用文字編輯器會比手動地到開啟 FontForge ,透過 GUI 界面加入來的快。

LangName: 1041 "+cCxiODBuMF4wfwAA" "+UYVtdzDVMKkw8zDI--Bold" "" "" "+UYVtdzDVMKkw8zDI--Bold" "Version 1.26"
 LangName: 1028 "+UWdtd1tXmtQA" "+UYVtdzDVMKkw8zDI--Bold" "" "" "+UYVtdzDVMKkw8zDI--Bold" "Version 1.26"
 LangName: 2052 "+UWdtd1tXmtQA" "+UYVtdzDVMKkw8zDI--Bold" "" "" "+UYVtdzDVMKkw8zDI--Bold" "Version 1.26"
 LangName: 5124 "+UWdtd1tXmtQA" "+UYVtdzDVMKkw8zDI--Bold" "" "" "+UYVtdzDVMKkw8zDI--Bold" "Version 1.26"
 LangName: 3076 "+UWdtd1tXmtQA" "+UYVtdzDVMKkw8zDI--Bold" "" "" "+UYVtdzDVMKkw8zDI--Bold" "Version 1.26"
 LangName: 1041 "+UWdtd1tXmtQA" "+UYVtdzDVMKkw8zDI--Bold" "" "" "+UYVtdzDVMKkw8zDI--Bold" "Version 1.26"

範例說明:

  • 台灣的 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” 欄,才不會有字體消失的問題。

還有 英文以外的 Family Name + Fullname 請都使用一樣的值,不要和英文版一樣使用較短的Family Name。意思是除了 English(US) 以外的 Family Name 要再加上他的Style Name 進去,不會會被系統吃掉該字體。然後在 Preferred Family 欄位使用較短的版本。

最後是使用下面的設定值:

LangName: 1028 "" "+bgVnfmJLW+ua1AAA-1-Regular" "Regular" "" "+bgVnfmJLW+ua1AAA-1-Regular" "Version 1.37.6" "" "" "" "" "" "" "" "" "" "" "+bgVnfmJLW+ua1AAA-1"
LangName: 2052 "" "+bgVnfmJLUZlPUwAA-1-Regular" "Regular" "" "+bgVnfmJLUZlPUwAA-1-Regular" "Version 1.37.6" "" "" "" "" "" "" "" "" "" "" "+bgVnfmJLUZlPUwAA-1"
LangName: 5124 "" "+bgVnfmJLW+ua1AAA-1-Regular" "Regular" "" "+bgVnfmJLW+ua1AAA-1-Regular" "Version 1.37.6" "" "" "" "" "" "" "" "" "" "" "+bgVnfmJLW+ua1AAA-1"
LangName: 3076 "" "+bgVnfmJLW+ua1AAA-1-Regular" "Regular" "" "+bgVnfmJLW+ua1AAA-1-Regular" "Version 1.37.6" "" "" "" "" "" "" "" "" "" "" "+bgVnfmJLW+ua1AAA-1"
LangName: 1033 "" "" "" "FontForge : JasonHandwriting1 Regular : 16-2-2020" "" "Version 1.37.6" "" "" "" "" "" "" "" "Copyright (c) 2020, Chun yu Yao (),+AAoA-with Reserved Font Name JasonHandwriting1.+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-2) 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" "" "JasonHandWriting1" "Regular"

相關文章

寫留言

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