某些字體在 LabVIEW 中不能用

更新 Apr 28, 2024

產品資訊

軟體

  • LabVIEW
  • LabVIEW Base
  • LabVIEW Full
  • LabVIEW Professional

問題敘述

我安裝了一些字體要在 LabVIEW 中使用,可以從 LabVIEW 提供的字體下拉選單中選到安裝的字體,設定完之後,LabVIEW 仍然使用預設的應用程式字體而不是選擇的字體。

解決方案

某些字體在當地語系 OS 的 LabVIEW 中無法正常工作。問題似乎只發生在某些在地化的 Windows OS 上。您可以通過在 ini 檔案中手動指定字體的字碼頁(Code page)來防止強制執行到作業系統字碼頁(Code page)支援的字體。在 C:\Program Files (x86)\National Instruments\LabVIEW 201X\LabVIEW.ini 文件中增加一行句子,如下所示:
FontCodePageList=Font name,Code Page Identifier

如果要使用多種字體,按照以下方式將句子加到 ini 文件:
FontCodePageList=Font Name1,Code Page Identifier;Font Name2,Code Page Identifier;Font Name3,Code Page Identifier

下表定義了 Window 中可用的字碼頁識別項(Code page identifiers)。
Identifier.NET Name Additional Information
1250window-1250 ANSI Central European; Central European (Windows)
1251window-1251 ANSI Cyrillic; Cyrillic (Windows)
1252window-1252 ANSI Latin 1; Western European (Windows)
1253window-1253 ANSI Greek; Greek (Windows)
1254window-1254 ANSI Turkish; Turkish (Windows)
1255window-1255 ANSI Hebrew; Hebrew (Windows)
1256window-1256 ANSI Arabic; Arabic (Windows)
1257window-1257 ANSI Baltic; Baltic (Windows)
1258window-1258 ANSI/OEM Vietnamese; Vietnamese (Windows)

注意:Windows Code page 1252 (通常用於英語和其他西歐語言) 是基於美國國家標準協會 (ANSI) 草案。如果您想了解更多 code page identifiers,請參閱 External Link: MSDN: Code Page Identifiers

相關資訊

Code Pages

現今大多數應用程式主要使用 UTF-16 編碼將字元資料處理為Unicode。但是,許多舊版應用程式持續使用基於 碼頁(Code page)的字元集。甚至有些新的應用程式有時也必須使用字碼頁(Code page),常見原因如下:
  • 與舊版應用程式通訊。
  • 與不支援 Unicode 的老舊郵件和新聞伺服器通訊。
  • 與 Windows 控制台通訊。

注意:新的 Windows 應用程式應使用 Unicode 來避免各種字碼頁(Code page)的不一致,並且易於在地化。