- Preparing search index...
- The search index is not available
feng3d
Constructors
constructor
- new Font(data): Font
-
Properties
Private charGeometryCache
charGeometryCache: any
data
data: FontData
isCCW
isCCW: boolean
Methods
calculateGeometry
- calculateGeometry(text, fontSize, lineHeight?, align?, textBaseline?, tabCharWidth?): {
indices: Uint32Array;
normals: Float32Array;
uvs: Float32Array;
vertices: Float32Array;
}
-
Parameters
-
text: string
-
fontSize: number
-
Optional lineHeight: number
-
Optional align: "center" | "left" | "right"
-
Optional textBaseline: "top" | "bottom" | "alphabetic" | "middle"
-
Optional tabCharWidth: number
Returns {
indices: Uint32Array;
normals: Float32Array;
uvs: Float32Array;
vertices: Float32Array;
}
-
indices: Uint32Array
-
normals: Float32Array
-
uvs: Float32Array
-
vertices: Float32Array
generateCharGeometry
- generateCharGeometry(char, geometry?): {
geometry: {
indices: number[];
points: number[];
};
width: number;
}
-
Parameters
-
char: string
-
Optional geometry: {
indices: number[];
points: number[];
}
-
indices: number[]
-
points: number[]
Returns {
geometry: {
indices: number[];
points: number[];
};
width: number;
}
-
geometry: {
indices: number[];
points: number[];
}
-
indices: number[]
-
points: number[]
-
width: number
generateShapes
- generateShapes(text, size, lineHeight?, align?): Shape2[]
-
Parameters
-
text: string
-
size: number
-
Optional lineHeight: number
-
Optional align: "center" | "left" | "right"