-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error compiling tests/httpget #153
Comments
This fixed the compilation: diff --git a/src/fidget/openglbackend.nim b/src/fidget/openglbackend.nim
index 635573b..10cb340 100644
--- a/src/fidget/openglbackend.nim
+++ b/src/fidget/openglbackend.nim
@@ -78,7 +78,7 @@ proc unFocus*(keyboard: Keyboard, node: Node) =
keyboard.focusNode = nil
proc drawText(node: Node) =
- if node.textStyle.fontFamily notin fonts:
+ if node.textStyle.fontFamily notin common.fonts:
quit &"font not found: {node.textStyle.fontFamily}"
var font = fonts[node.textStyle.fontFamily] But the example still didn't work for me (as I said, I haven't done any UI devel, and so I don't have this openGL library):
Update: I needed to just create this wrapper HTML <html>
<body>
<script type="text/javascript" src="httpget.js"></script>
</body>
</html> The httpget example worked after the above compilation fix. |
kaushalmodi
added a commit
to kaushalmodi-forks/fidget
that referenced
this issue
May 17, 2021
This commit fixes this compilation error when trying to compile one of the tests: tests/httpget: src/fidget/openglbackend.nim(81, 38) Error: ambiguous identifier: 'fonts' -- use one of the following: common.fonts: Table[system.string, font.Font] @m..@s..@s..@s..@s..@s.nimble@spkgs@spixie-1.2.0@spixie@sfonts.nim.fonts: Fixes treeform#153 .
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I followed these steps:
nimble install fidget
-> Installed fidget 0.7.7httpget
example with the font and the.nims
. And then I cd'd to that directory.nim r httpget.nim
That gave me this error:
--
PS; I have no experience with UI related code, but I thought of trying out this example after watching your NimConf 2020 video.
I hope this is a quick fix; may be this regression happened after you recently introduced the
pixie
package?The text was updated successfully, but these errors were encountered: