<< Click to Display Table of Contents >>
new sg.symbols.Font(size_or_json, style, variant, weight, family)
Description
建立一個Font 物件。
Position
Symbol.js
Parameters
Parameter |
Type |
Description |
size_or_json |
Number |
字體大小 |
style |
String |
字體樣式 |
variant |
String |
字體變化 |
weight |
String |
字體粗細 |
family |
String |
字體名稱 |
Constants
Constants |
Description |
STYLE_ITALIC |
斜體。 |
STYLE_NORMAL |
正常字體。 |
SYTLE_OBLIQUE |
偽斜體。 |
VARIANT_NORMAL |
正常字體。 |
VARIANT_SMALLCAPS |
小型大寫字體。 |
WEIGHT_BOLD |
粗體。 |
WEIGHT_BOLDER |
更粗體。 |
WEIGHT_LIGHTER |
細字體。 |
WEIGHT_NORMAL |
正常字體。 |
Properties
Properties |
Type |
Description |
decoration |
String |
字型裝飾,"underline" | "line-through" | "none" |
family |
String |
字型名稱 |
size |
Number |
字型大小 |
style |
String |
字型樣式 (可使用Constants列舉的定義) |
variant |
String |
字型變化 (可使用Constants列舉的定義) |
weight |
Number |
字型粗細 (可使用Constants列舉的定義) |
Methods
Methods |
Type |
Description |
||||||
setDecoration(decoration) |
String |
定義字體裝飾。
|
||||||
setFamily(family) |
String |
定義字體字型。
|
||||||
setSize(size) |
Number |
定義字體大小。ex:
|
||||||
setStyle(style) |
String |
定義字體樣式。 (參考Constants列舉定義)
|
||||||
setVariant(variant) |
String |
定義字體變化。 (參考Constants列舉定義)
|
||||||
setWeight(weight) |
String |
定義字體粗細。 (參考Constants列舉定義)
|
Example
|
©2015 Supergeo Technologies Inc.