Skip to content

Commit

Permalink
e2e with fonts
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusandra committed Jan 12, 2025
1 parent 745bca6 commit 94b3a84
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 6 deletions.
3 changes: 2 additions & 1 deletion e2e/frame.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@
"sentry": {
"frame_dsn": null
}
}
},
"assetsPath": "../frameos/assets/copied"
}
3 changes: 3 additions & 0 deletions e2e/generated/scene_renderTextPosition.nim
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ proc init*(sceneId: SceneId, frameConfig: FrameConfig, logger: Logger, persisted
text: "bananas",
fontSize: 24.0,
borderWidth: 2,
font: "ComicRelief.ttf",
inputImage: none(Image),
richText: "disabled",
position: "center",
Expand Down Expand Up @@ -248,6 +249,7 @@ proc init*(sceneId: SceneId, frameConfig: FrameConfig, logger: Logger, persisted
text: "ananas",
fontSize: 24.0,
borderWidth: 0,
font: "FiraGO-ExtraBold.ttf",
inputImage: none(Image),
richText: "disabled",
position: "center",
Expand Down Expand Up @@ -294,6 +296,7 @@ proc init*(sceneId: SceneId, frameConfig: FrameConfig, logger: Logger, persisted
text: "bananas",
fontSize: 24.0,
borderWidth: 2,
font: "FiraGO-ExtraBold.ttf",
inputImage: none(Image),
richText: "disabled",
position: "center",
Expand Down
2 changes: 1 addition & 1 deletion e2e/generated/scene_renderTextRich.nim
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ proc init*(sceneId: SceneId, frameConfig: FrameConfig, logger: Logger, persisted
var context = ExecutionContext(scene: scene, event: "init", payload: state, hasImage: false, loopIndex: 0, loopKey: ".")
scene.execNode = (proc(nodeId: NodeId, context: var ExecutionContext) = scene.runNode(nodeId, context))
scene.node1 = render_textApp.App(nodeName: "render/text", nodeId: 1.NodeId, scene: scene.FrameScene, frameConfig: scene.frameConfig, appConfig: render_textApp.AppConfig(
text: "^(64,#FFFF00)This is a great day\n^(32,#00FF00)\nBecause ^(underline)reasons^(no-underline)!",
text: "^(64,#FFFF00)This is a great day\n^(32,#00FF00)\n^(FiraGO-ExtraBold.ttf)Because ^(underline)reasons^(no-underline)!",
richText: "basic-caret",
borderColor: parseHtmlColor("#ffffff"),
fontColor: parseHtmlColor("#8a0a0a"),
Expand Down
9 changes: 6 additions & 3 deletions e2e/scenes/renderTextPosition.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@
"vAlign": "top",
"text": "bananas",
"fontSize": "24",
"borderWidth": "2"
"borderWidth": "2",
"font": "ComicRelief.ttf"
}
},
"type": "app",
Expand Down Expand Up @@ -203,7 +204,8 @@
"config": {
"text": "ananas",
"fontSize": "24",
"borderWidth": "0"
"borderWidth": "0",
"font": "FiraGO-ExtraBold.ttf"
}
},
"type": "app",
Expand Down Expand Up @@ -263,7 +265,8 @@
"vAlign": "bottom",
"text": "bananas",
"fontSize": "24",
"borderWidth": "2"
"borderWidth": "2",
"font": "FiraGO-ExtraBold.ttf"
}
},
"type": "app",
Expand Down
2 changes: 1 addition & 1 deletion e2e/scenes/renderTextRich.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"data": {
"keyword": "render/text",
"config": {
"text": "^(64,#FFFF00)This is a great day\n^(32,#00FF00)\nBecause ^(underline)reasons^(no-underline)!",
"text": "^(64,#FFFF00)This is a great day\n^(32,#00FF00)\n^(FiraGO-ExtraBold.ttf)Because ^(underline)reasons^(no-underline)!",
"richText": "basic-caret",
"borderColor": "#ffffff",
"fontColor": "#8a0a0a",
Expand Down
Binary file modified e2e/snapshots/renderTextPosition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified e2e/snapshots/renderTextRich.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 94b3a84

Please sign in to comment.