跳轉到主要內容
此物件提供字型樣式的屬性。

屬性

,read-only

Returns theobject.

設定字型顏色的 RGB 值。

此屬性的值可以為 -1,表示顏色為透明。

int 值由 RGB 三元組依下列公式計算: (紅色值) + (256 x 綠色值) + (65536 x 藍色值) ,其中紅色值為三元組的第一個分量,綠色值為第二個分量,藍色值為第三個分量。例如,白色的 int 值為 16777215。

預設情況下,字型顏色為黑色,此屬性回傳 0。

Specifies whether the font is bold.

Specifies whether the font is italic.

Specifies whether the font is underlined.

Specifies whether the font is strikeout.

Specifies whether the font has “small caps” style. This means that the small characters are displayed as small capitals.

, read-only

Stores the name of the font. This property cannot be changed directly but via the SetFont method.

By default, this value is “Times New Roman”.

Specifies the height of the font in twips. Twip is 1/20 of point, and point is 1/72”.

Default value of this property corresponds to 10 points or 200 twips.

, read-only

Stores the type of the font. This property cannot be changed directly but via the SetFont method.

By default, this value is FT_Unknown.

設定字元相對於字串基線的偏移量 (以像素為單位) 。字串的基線由屬性定義。此屬性主要用於嵌入文字中的圖片。

以 1/1000 為單位儲存字型樣式的水平縮放比例。

此屬性的預設值為 1000,表示不進行縮放。

指定字元之間的額外間距 (以 twip 為單位) 。1 twip 等於 1/20 點,1 點等於 1/72 英寸。

此屬性的預設值為 0。

,唯讀

指定此字型樣式是否為段落樣式的基礎字型樣式。

,唯讀

描述此樣式中相對於段落基礎字型樣式所覆寫的樣式參數集合。此屬性為常數的 OR 疊加值。

方法

名稱說明
SetFont設定新的字型名稱與字型類型。
FontStyle 物件圖

另請參閱

ParagraphStyle 使用屬性