Eclipse字体首选项

时间:2017-12-20 08:21:32

标签: eclipse workbench user-preferences

尝试在Eclipse 3.7中将字体大小设置为低于8我在

中找到了一行
.metadata\.plugins\org.eclipse.core.runtime\.settings\org.eclipse.ui.workbench.prefs

<小时/> 这是一行:

org.eclipse.jface.textfont=1|Envy Code R|7.75|0|WINDOWS|1|-11|0|0|0|400|0|0|0|0|3|2|1|49|Envy Code R;

有人知道各个部分(由|分开)意味着什么?

2 个答案:

答案 0 :(得分:1)

该值是if (NativeMethods.OpenPrinter(szPrinterName.Normalize(), out hPrinter, IntPtr.Zero)) { if (NativeMethods.StartDocPrinter(hPrinter, 1, ref di)) //My problem is here { if (NativeMethods.StartPagePrinter(hPrinter)) { bSuccess = NativeMethods.WritePrinter(hPrinter, pBytes, dwCount, out dwWritten); NativeMethods.EndPagePrinter(hPrinter); } NativeMethods.EndDocPrinter(hPrinter); } NativeMethods.ClosePrinter(hPrinter); } toString()方法返回的字符串。此值是特定于平台的,您必须检查平台的FontData源代码,以确切地确定其含义。

FontData类提供了将org.eclipse.jface.preference.PreferenceConverter转换为此字符串的各种方法。

答案 1 :(得分:1)

感谢Greg输入,这就是字符串的形成方式。 第一部分似乎是平台独立的。

1      |Envy Code R|7.75  |0
version|name       |height|style

其余部分取决于平台。

WINDOWS |1       |-11     |0      |0           |0            |400     |0       |0          |0          |0        |3             |2              |1        |49             
platform|version2|lfHeight|lfWidth|lfEscapement|lfOrientation|lfWeight|lfItalic|lfUnderline|lfStrikeOut|lfCharSet|lfOutPrecision|lfClipPrecision|lfQuality|lfPitchAndFamily

在Windows中由Class

表示
public abstract class LOGFONT {
    public int lfHeight;
    public int lfWidth;
    public int lfEscapement;
    public int lfOrientation;
    public int lfWeight;
    public byte lfItalic;
    public byte lfUnderline;
    public byte lfStrikeOut;
    public byte lfCharSet;
    public byte lfOutPrecision;
    public byte lfClipPrecision;
    public byte lfQuality;
    public byte lfPitchAndFamily;
    public static final int sizeof = OS.IsUnicode ? OS.LOGFONTW_sizeof () : OS.LOGFONTA_sizeof ();
}

这显然是一个&#34;副本&#34; C结构:

typedef struct tagLOGFONT {
  LONG  lfHeight;
  LONG  lfWidth;
  LONG  lfEscapement;
  LONG  lfOrientation;
  LONG  lfWeight;
  BYTE  lfItalic;
  BYTE  lfUnderline;
  BYTE  lfStrikeOut;
  BYTE  lfCharSet;
  BYTE  lfOutPrecision;
  BYTE  lfClipPrecision;
  BYTE  lfQuality;
  BYTE  lfPitchAndFamily;
  TCHAR lfFaceName[LF_FACESIZE];
} LOGFONT, *PLOGFONT;