mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-21 07:14:11 +00:00
[API] Allow canvas font customisation (#987)
Allows customisation of fonts via `LiteGraph` global var: ```ts LiteGraph.NODE_FONT = "wingdings" ``` 
This commit is contained in:
@@ -198,11 +198,11 @@ export class LGraphNode implements Positionable, IPinnable, IColorable {
|
||||
* The font style used to render the node's title text.
|
||||
*/
|
||||
get titleFontStyle(): string {
|
||||
return `${LiteGraph.NODE_TEXT_SIZE}px Arial`
|
||||
return `${LiteGraph.NODE_TEXT_SIZE}px ${LiteGraph.NODE_FONT}`
|
||||
}
|
||||
|
||||
get innerFontStyle(): string {
|
||||
return `normal ${LiteGraph.NODE_SUBTEXT_SIZE}px Arial`
|
||||
return `normal ${LiteGraph.NODE_SUBTEXT_SIZE}px ${LiteGraph.NODE_FONT}`
|
||||
}
|
||||
|
||||
graph: LGraph | null = null
|
||||
|
||||
Reference in New Issue
Block a user